ci: cache Rust compilation with sccache - #1354
Draft
pjb157 wants to merge 1 commit into
Draft
Conversation
Deploying control-layer with
|
| Latest commit: |
845e449
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b37dcdb6.control-layer.pages.dev |
| Branch Preview URL: | https://peter-sccache-depot-cache.control-layer.pages.dev |
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
dwctlcoverage builds through sccache on Depot runnersSwatinem/rust-cachefor Cargo dependencies/tools while disabling its target cache to avoid caching build outputs twiceResult: not recommended for merge
This reproduces the Depot article's configuration successfully, but it does not improve this repository's existing sharded coverage build. Even with a 100% sccache hit rate, fetching hundreds of individual compiler objects is slower here than restoring the existing compressed Rust target cache and compiling the remaining work locally on a 16-core Depot runner.
Against the existing workflow, the two warm attempts consistently regressed median Cargo compilation by 7.6%, the measured compile/test step by 6.8%, and the complete shard job by about 3.1%. The empty-cache attempt was substantially slower, as expected.
The first warm attempt had one failure in
test_flush_emits_single_notification_for_multiple_depletions; the second identical warm attempt passed the complete workflow. The timing regression was the same in both attempts, so it is independent of that test flake.Runs
Validation
bash .github/scripts/test-rust-ci-matrix.shruby scripts/tests/preview_workflow_test.rb(4 runs, 63 assertions)shellcheck .github/scripts/test-rust-ci-matrix.shactionlint -ignore 'label "depot-' -ignore 'shellcheck reported issue' .github/workflows/ci.yamlThis PR is intentionally left as a draft experiment. Based on the measurements above, I recommend closing it rather than merging the implementation.