Skip to content

ci(bazel): run the Bazel presubmit on macOS as well as Linux - #410

Merged
filmil merged 2 commits into
google:mainfrom
clydegerber:ci/bazel-macos-presubmit
Aug 20, 2026
Merged

ci(bazel): run the Bazel presubmit on macOS as well as Linux#410
filmil merged 2 commits into
google:mainfrom
clydegerber:ci/bazel-macos-presubmit

Conversation

@clydegerber

Copy link
Copy Markdown
Contributor

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-credentials
setting 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's
test-static-linking job runs a [ubuntu-latest, macos-latest] matrix and
calls make macos-test on the Mac, which is brew install icu4c + cargo test. That is green and says nothing about Bazel. bazel.yml has no macOS
entry at all, which is how four independent breakages accumulated there
unnoticed until #409.

Matrix shape

macOS is pinned to the .bazelversion this repo already declares, rather
than crossed with the whole Bazel matrix:

ubuntu-latest / 8.7.0
ubuntu-latest / 9.2.0
macos-latest  / 9.2.0

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: false was already set, so a macOS failure will
not cancel the Linux jobs.

Second commit

bazel.yml was the only workflow still checking out with the default
persist-credentials: true. test.yml and buildenv.yml were fixed in
6102b80; bazel.yml landed a day earlier and was missed. Happy to drop this
commit 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 check
is 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.

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.
@filmil
filmil merged commit 7176c49 into google:main Aug 20, 2026
22 checks passed
@clydegerber
clydegerber deleted the ci/bazel-macos-presubmit branch August 21, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure the bazel build workflow to build and test for both Linux and Mac

2 participants