ci(pr-checks): cache cargo with rust-cache so the cache stops growing #45
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/ci-self-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
The CI runners are filling up. Runner 65 (
ubuntu-latest) is out of disk right now: every recenttask it took died at checkout with
No space left on device.This repo's PR gate cached
~/.cargo/registry,~/.cargo/gitand the wholetarget/withactions/cache, keyed onCargo.lockwith a prefixrestore-keys. WhenCargo.lockchanged, thejob restored the previous
target/through the prefix, built on top of it, and saved everythingunder the new key. So every entry carried every older build, and the runner's cache store grew
without bound.
The step is now
Swatinem/rust-cache@v2. It caches the same things, but before saving it stripsthis crate's own artifacts and anything stale from
target/, and it saves only on a cache miss.Each entry stays about the size of the dependency builds. The fmt / clippy / test gates are unchanged.
Companion PRs: link / installer / Rust-Link (this same change), website and runicgateway.com
(docker build clean-up), docs.
How it was tested
PR Checksrun is the live test: the first run is a miss and saves; a re-runshould restore from the cache.
Checklist
AI-assisted contributions (required)
Claude Code (Claude Opus 5.5). I have reviewed and understandevery change, and take responsibility for it. AI-authored commits are
marked with a
Co-Authored-By/Assisted-Bytrailer.License
(GNU GPL v3.0 or later), and I have the right to contribute it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY