ci(bazel): run the Bazel presubmit on macOS as well as Linux - #410
Merged
Conversation
The Bazel presubmit only ran on ubuntu-latest, so nothing guarded the Darwin-specific paths in the build. The macOS coverage in test.yml exercises the Cargo build, not Bazel. macOS is pinned to the declared .bazelversion rather than crossed with the whole Bazel matrix: compiling ICU from source dominates the job, and the Linux entries already cover the 8.7.0/9.2.0 spread. Expands to ubuntu-latest/8.7.0, ubuntu-latest/9.2.0, macos-latest/9.2.0. Closes google#405. This commit was created by an automated coding assistant, with human supervision.
bazel.yml was the only workflow still checking out with the default `persist-credentials: true`, which leaves the job's token in `.git/config` for later steps to read. The presubmit only builds and tests, so it has no use for it. test.yml and buildenv.yml were fixed in 6102b80; bazel.yml landed a day earlier and was missed. This commit was created by an automated coding assistant, with human supervision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #409, which fixed the Bazel build on macOS. Nothing currently
stops those fixes regressing, because the Bazel presubmit only ever runs on
ubuntu-latest.Adds a macOS entry to the matrix, and fixes a missed
persist-credentialssetting in the same file. Two commits, separable.
Why macOS coverage looked like it already existed
It does exist, but for the other build system.
test.yml'stest-static-linkingjob runs a[ubuntu-latest, macos-latest]matrix andcalls
make macos-teston the Mac, which isbrew install icu4c+cargo test. That is green and says nothing about Bazel.bazel.ymlhas no macOSentry at all, which is how four independent breakages accumulated there
unnoticed until #409.
Matrix shape
macOS is pinned to the
.bazelversionthis repo already declares, ratherthan crossed with the whole Bazel matrix:
Compiling ICU from source dominates the job, the Linux entries already cover
the 8.7.0/9.2.0 spread, and 9.2.0 is what macOS contributors run locally.
Widening to the full cross-product is a two-line change if the wall time
turns out to be cheap — the first green run will tell us, which is a number
nobody has yet.
fail-fast: falsewas already set, so a macOS failure willnot cancel the Linux jobs.
Second commit
bazel.ymlwas the only workflow still checking out with the defaultpersist-credentials: true.test.ymlandbuildenv.ymlwere fixed in6102b80;
bazel.ymllanded a day earlier and was missed. Happy to drop thiscommit if you would rather keep the PR to one concern.
Verification
Locally on macOS 26.5 / arm64 at Bazel 9.2.0,
bazel test --jobs=1 --test_env=RUST_TEST_THREADS=1 //...passes 26 of 26 tests. The real checkis this PR's own presubmit — the macOS job here is the first time it runs on
a GitHub runner.
Closes #405.
This commit was created by an automated coding assistant, with human
supervision.