Use Bazel for the sanitizer CI jobs - #293
Merged
Merged
Conversation
philipcraig
force-pushed
the
bazel-sanitizers-292
branch
from
September 2, 2026 17:16
c869a8c to
90dffbd
Compare
Towards #292. Adds asan, ubsan, and tsan configs to .bazelrc, the matching --asan/--ubsan/--tsan flags to scripts/bazel.sh, and a build_system dimension to the sanitizers workflow matrix. The CMake jobs stay until the Bazel jobs have proven themselves. .bazelignore also ignores .claude, where Claude Code keeps agent worktrees whose build/ directories otherwise make bazel test //... fail to load.
A matrix job skipped by its job-level `if:` never expands its matrix and
reports one check under the unexpanded name, e.g.
"${{ matrix.settings.name }} ${{ matrix.configuration }}". Keep the jobs
running and gate every step on the change-detection output instead, so the
expanded names always report.
philipcraig
force-pushed
the
bazel-sanitizers-292
branch
from
September 3, 2026 05:43
f6ee365 to
6dc4e5f
Compare
philipcraig
marked this pull request as ready for review
September 3, 2026 06:01
This was referenced Sep 3, 2026
Four runs of this branch showed the Bazel jobs matching the CMake ones cold and beating them warm, with the same flags and googletest instrumented too.
jbcoe
approved these changes
Sep 3, 2026
jbcoe
left a comment
Owner
There was a problem hiding this comment.
Thanks for this. Everything will be a little bit faster to do now.
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.
Closes #292.
The sanitizer CI jobs now build and test with Bazel instead of CMake. The branch first ran both side by side to compare them; the findings are below.
.bazelrcgainsasan,ubsan, andtsanconfigs with the same flagscmake/sanitizers.cmakeapplies. They use--coptso googletest is instrumented too, and--compilation_mode=dbgso reports carry symbolised stack traces.scripts/bazel.shtakes--asan,--ubsan, and--tsan, mirroringscripts/cmake.sh;--asanwith--tsanis rejected. The CMake flags stay for local use.sanitizers.ymlsets up Bazel with a per-sanitizer disk cache and runs./scripts/bazel.sh --asan --ubsanand./scripts/bazel.sh --tsan. Its paths filters track the Bazel inputs instead of the CMake ones.cmake.yml,bazel.yml, andsanitizers.yml, so skipped matrix jobs no longer report under the unexpanded name${{ matrix.settings.name }} ${{ matrix.configuration }}..bazelignorealso ignores.claude, where Claude Code keeps agent worktrees whosebuild/directories otherwise makebazel test //...fail to load.The
asan,tsan, andsanitizerscheck names are unchanged, so the required-check ruleset needs no change.Findings from four runs with both build systems
Build-and-test step, seconds:
protocol.hhmkheaderspostinst) dominates both; Cache the installed GCC trunk tree in CI #297 tracks caching it.