Give the test job its own scoped target/ cache
All checks were successful
CI / fmt (pull_request) Successful in 13s
CI / clippy-native (pull_request) Successful in 3m31s
CI / clippy-server (pull_request) Successful in 3m46s
CI / clippy-web (pull_request) Successful in 3m23s
CI / clippy-desktop (pull_request) Successful in 4m27s
CI / test (pull_request) Successful in 7m48s
CI / audit (pull_request) Successful in 25s
All checks were successful
CI / fmt (pull_request) Successful in 13s
CI / clippy-native (pull_request) Successful in 3m31s
CI / clippy-server (pull_request) Successful in 3m46s
CI / clippy-web (pull_request) Successful in 3m23s
CI / clippy-desktop (pull_request) Successful in 4m27s
CI / test (pull_request) Successful in 7m48s
CI / audit (pull_request) Successful in 25s
test's own compiled objects are worth reusing across runs — it's the only job needing full codegen, so it can't share anything with the clippy jobs' check-only builds regardless of key. Scoping it to a key the clippy jobs don't touch avoids the contention/collision problem that came from all 5 jobs previously sharing one target/ cache key, and since it excludes feedsignal-web, its target/ stays much smaller than the combined cache removed earlier. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
9429ca100a
commit
04f628b70e
1 changed files with 14 additions and 0 deletions
|
|
@ -144,6 +144,20 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
cargo-${{ runner.os }}-
|
cargo-${{ runner.os }}-
|
||||||
|
|
||||||
|
# Own key, not shared with the clippy jobs above: this job is the
|
||||||
|
# only one that needs full codegen (clippy's check-only builds
|
||||||
|
# produce metadata, not the linkable artifacts `cargo test` needs,
|
||||||
|
# so there's nothing to share either way), and it never touches
|
||||||
|
# feedsignal-web, so its target/ stays far smaller than a build
|
||||||
|
# covering every crate's feature set.
|
||||||
|
- name: Cache test target directory
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: target-test-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
target-test-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Cache sccache compilation objects
|
- name: Cache sccache compilation objects
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue