ci: cache Bazel repository + disk caches to speed up runs - #59
Merged
Conversation
Mount actions/cache over Bazel's repository cache (downloaded external deps) and disk cache (compiled action outputs), passed via --repository_cache / --disk_cache. Runs reuse prior fetch+compile instead of starting cold, and dependency downloads stop being a flaky single point of failure (cf. the recent 500 on a release tarball). Key is per os/config plus a lockfile+bazelversion hash, suffixed with github.sha so each run saves a fresh entry; restore-keys fall back to the newest prior cache for the same os/config.
This was referenced Jun 22, 2026
helly25
added a commit
that referenced
this pull request
Jun 24, 2026
…t style (config phase E1) (#110) Invoked through a `find`-named alias (symlink/copy), xff defaults to the strict find style; invoked as `xff` (or any other name) it defaults to the modern xff style. An explicit --config still overrides. - config::DefaultStyleForProgram(argv0): basename "find" -> "find", else "xff". - main.cc prepends that style to the --config selectors as the lowest-precedence base, before discovery, so ActiveStyle's last-wins lets an explicit --config override it, and find:/xff: .xffrc lines gate on it too. This is the headline of the argv[0]-dispatch task (#59): `ln -s xff find && find . -println` now errors (strict find), while `xff . -println` runs (modern), with no flag. Per the settled "find stays loose" decision, the find style still rejects only xff expression primaries; xff globals pass. Tests: config_test (DefaultStyleForProgram - basename extraction, exact-name match, non-find -> xff), style_test bashtest (a `find`-named symlink rejects -println with exit 2; invoked as xff, -println runs). Green in both configs; clang-format + em-dash clean.
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
CI recompiles and re-fetches everything on every run. This mounts
actions/cacheover Bazel's two caches so runs reuse prior work:--repository_cache— downloaded external deps (abseil, re2, mbo, the hermetic LLVM toolchain). Also removes the flaky single point of failure where a release-tarball download 500'd and aborted a job.--disk_cache— compiled action outputs, so unchanged sources aren't recompiled across runs.Key:
bazel-<os>-<config>-<hash(MODULE.bazel.lock,.bazelversion)>-<github.sha>. Thegithub.shasuffix makes each run save a fresh entry (so the cache grows), whilerestore-keysfall back to the newest prior cache for the same os/config; the lockfile hash busts it when deps change. Per-configkeys keepdefaultandclang-asanartifacts separate.Test plan
runfootgun).--disk_cache/--repository_cacheflags verified locally on Bazel 9.1.1 (registry_testpopulated a 42 MB disk cache).