Repository navigation
ci: trial zccache in place of rust-cache - #395
AbysmalBiscuit wants to merge 2 commits into
Conversation
Windows test jobs spend about 3 minutes compiling workspace crates even with rust-cache restoring dependencies. zccache caches each rustc invocation, workspace crates included, plus a target/ snapshot, so a warm run may skip most of that. The clippy and test jobs use zccache 1.15.4 with its target snapshot and restore fallbacks on. Saves are forced, since the action skips them on pull_request runs by default, and only the first partition per OS saves. CARGO_INCREMENTAL=0 matches what rust-cache set. Timeouts are raised so a cold run finishes and can be measured. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1250c89c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| zccache-version: 1.15.4 | ||
| shared-key: test | ||
| cache-target: true | ||
| target-restore-fallback: true |
There was a problem hiding this comment.
Disable target fallback for the CI test gate
When a PR run can restore a target snapshot from an earlier source tree, Cargo may accept the restored fingerprints and run stale test binaries instead of rebuilding changed crates, allowing nextest and the similarly configured clippy job to report false success. The action's restore policy explicitly disables this fallback by default because stale Cargo fingerprints and build-script outputs can make a PR merge ref appear fresh; retain exact target restores or disable cache-target, but do not enable target-restore-fallback on these required checks.
AGENTS.md reference: AGENTS.md:L8-L14
Useful? React with 👍 / 👎.
On Windows the action's RUSTC_WRAPPER install probe starts the daemon before the compilation cache is restored, so a warm run hit 0% of the restored entries while Linux and macOS hit 100%. Restarting the daemon after setup tests whether it then serves the restored cache. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Trial measured: zccache matches rust-cache on Windows test jobs (about 6m either way, even at a 100% hit rate) and slows Windows clippy from 1m36 to 3m28. The uncacheable rustc calls and test-binary linking dominate, and the target/ snapshot exceeds the 2 GiB cache cap. Not adopting. |
Agent summary
Trial, not for merging. Measures whether zccache cuts compile time in CI, mainly in the Windows test jobs, which spend about 3 minutes compiling workspace crates even with rust-cache restoring dependencies.
The
clippyandtestjobs swapSwatinem/rust-cache@v2forzackees/zccache@1.15.4(binary pinned to 1.15.4), with the cargo registry, compilation and target/ snapshot caches on and both restore fallbacks enabled, as zccache recommends for fast developer CI. Its cleanup action runs withif: always()to save the caches.postgresis unchanged.For the measurement:
pull_requestruns by default;CARGO_INCREMENTAL=0, as rust-cache set it;The first CI run is the cold one; an empty commit follows for the warm one. Each job's total time and compile time (first
Compilingline to first nextestPASS, or end of clippy) are compared with run 38927774308.Proof
yq '.jobs.test.steps[].uses' .github/workflows/ci.ymllistszackees/zccache@1.15.4after the toolchain andzackees/zccache/action/cleanup@1.15.4last; the clippy job has the same pair.🤖 Generated with Claude Opus 5.5 via Claude Code