Cache cargo with rust-cache so target/ stops growing
CI / test (push) Failing after 1s

The cargo- restore key carried every old artifact into the next save,
so the cache reached 1.2 GB and run #40 filled the shared runner's
disk. rust-cache keeps compiled dependencies only and prunes stale
files before saving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mateusz PstruchaandClaude Opus 5.5 committed 2026-11-24 20:21:54 +01:00
1 parent 1ff73f8b20
commit 546d629d36
1 file changed
+6 -8
+6 -8
View File
@@ -36,15 +36,13 @@ jobs:
with:
components: rustfmt, clippy
# rust-cache, not a plain actions/cache of target/: that one restored
# through the cargo- prefix and saved everything back, so stale
# artifacts piled up (1.2 GB by v0.8.4) and run #40 filled the shared
# runner's disk. rust-cache keeps only compiled dependencies, drops our
# own crate and stale files before saving, and turns off incremental.
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check