Skip to content

Commit

Permalink
Merge new CI stuff to live (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkova authored May 30, 2023
2 parents 16dad3c + 0823aea commit b458275
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
matrix:
include:
# GitHub doesn't provide AArch64 Linux machines, so we self-host a
# runner instead.
- { target: linux-aarch64, runner: [self-hosted, Linux, ARM64] }
# runner with BuildJet instead.
- { target: linux-aarch64, runner: buildjet-4vcpu-ubuntu-2204-arm }
- { target: linux-x86_64, runner: ubuntu-22.04 }
# GitHub doesn't provide M1 macOS machines, so we self-host a runner
# instead.
# GitHub doesn't provide macOS machines with Apple Silicon, so we
# self-host a runner with MacStadium instead.
- { target: macos-aarch64, runner: [self-hosted, macos, ARM64] }
- { target: macos-x86_64, runner: macos-12 }

Expand Down Expand Up @@ -76,6 +76,37 @@ jobs:
/private/var/tmp/_bazel_$(whoami)
# Cache musl libc toolchains.
/usr/local/*-musl
- name: Install bazel
if: ${{ matrix.target == 'linux-aarch64' }}
run: |
version="6.2.0"
platform="linux-arm64"
base_url="https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}"
# download bazel from github releases
curl -L -O "${base_url}"
# make bazel executable
chmod +x bazel-${version}-${platform}
# verify the binary has a good checksum
curl -L -O "${base_url}.sha256"
if [[ "$(sha256sum bazel-${version}-${platform})" == "$(cat bazel-${version}-${platform}.sha256)" ]]; then
echo "Checksum matches"
else
echo "Checksum does not match"
exit 1
fi
# download and import the public key
curl -L -O https://bazel.build/bazel-release.pub.gpg
gpg --import bazel-release.pub.gpg
# verify the binary has a good signature
curl -L -O "${base_url}.sig"
if [[ `gpg --verify bazel-${version}-${platform}.sig` -eq 0 ]]; then
echo "Good signature from bazel"
sudo mv bazel-${version}-${platform} /usr/local/bin/bazel
else
echo "Bad signature from bazel"
exit 1
fi
- name: Install toolchains
run: |
Expand Down
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ config_setting(
# Version flag for clang.
string_flag(
name = "clang_version",
# macOS uses `clang-14.0.0` by default.
build_setting_default = "14.0.0",
# macOS uses `clang-14.0.3` by default.
build_setting_default = "14.0.3",
visibility = ["//visibility:public"],
)

Expand Down

0 comments on commit b458275

Please sign in to comment.