forked from BigfootDev/flatbuffers
* [swift] Add bazel configuration for Swift This change adds a simple bazel BUILD file for consuming the Swift support. This also bumps the platforms bazel repo to fix support for M1s and bazel 5.1+ https://github.com/bazelbuild/bazel/issues/15099#issuecomment-1075368289 The rules_swift inclusion here must happen before gRPC to ensure we don't pull in an older version. * Add CC=clang which is a requirement for Swift on Linux * Add Swift to PATH
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
buildifier: latest
|
|
platforms:
|
|
ubuntu1804:
|
|
environment:
|
|
CC: clang
|
|
SWIFT_VERSION: "5.5.3"
|
|
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
|
|
PATH: "$PATH:$SWIFT_HOME/usr/bin"
|
|
shell_commands:
|
|
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
|
|
- "mkdir $SWIFT_HOME"
|
|
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu1804/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu18.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
|
|
build_targets:
|
|
- "//..."
|
|
test_targets:
|
|
- "//..."
|
|
ubuntu2004:
|
|
environment:
|
|
CC: clang
|
|
SWIFT_VERSION: "5.5.3"
|
|
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
|
|
PATH: "$PATH:$SWIFT_HOME/usr/bin"
|
|
shell_commands:
|
|
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
|
|
- "mkdir $SWIFT_HOME"
|
|
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
|
|
build_targets:
|
|
- "//..."
|
|
test_targets:
|
|
- "//..."
|
|
macos:
|
|
build_targets:
|
|
- "//..."
|
|
test_targets:
|
|
- "//..."
|