Building a great CI w/ Bazel
summary
Built a CI that runs Bazel across Linux, macOS and Windows using Buildkite, adds sharding because RBE lacks macOS so Macs were the bottleneck, and cuts clone time with a prebuilt bare Git mirror. Uses bazel-remote for local caching (works on macOS CI), extracts failed-test logs from the BEP JSON to upload as artifacts, retries flaky tests with --flaky_test_attempts, and pins Bazel with bazelisk (repo-checked VERSION file) so upgrades are testable and reproducible.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 1:50Early CI challenges
- 5:38Feature requests and diversity
- 7:25Developer-friendly CI
- 9:10Network and repo handling
- 10:56Sharding tests
- 12:41Remote caching
- 14:05Cache correctness
- 15:51Bazel UI in CI
- 17:16Flaky tests and failures
- 18:18CI scripts structure
- 19:24Parsing Bazel logs
- 20:50Build Event Protocol
- 21:31Build performance analysis
- 22:38Managing flaky tests
- 23:21Optimizing keep_going
- 24:45SikbBus sandboxing
- 26:32Incompatible Bazel flags
- 27:57Xcode versions in CI
- 29:00Pinning Bazel versions
- 30:03Summary








