Repository navigation
ci: save caches only on main, restore-only on PRs - #356
Merged
Merged
Conversation
There was a problem hiding this comment.
LGTM. This is a small CI cache config change and it matches what the PR describes.
What was reviewed:
- All four rust-cache steps (clippy, cargo check, cargo test, decode-tx) now have
save-ifset togithub.ref == 'refs/heads/main'. The workflows run on push to main, pull_request and merge_group, so caches are saved only on main pushes and other runs still restore. - The setup-foundry
cachetoggle turns the Foundry cache off completely on non-main refs. That's fine here becausetests/decode-tx.shhas no RPC or fork usage, so there is nothing for that cache to speed up.
Extended reasoning...
The change touches only .github/workflows/lint.yml and .github/workflows/test.yml. It adds a save-if input to the existing SHA-pinned rust-cache steps and a cache input to one setup-foundry step. Job permissions, triggers and action pins are unchanged, and there is no security-sensitive surface. The repo has no CODEOWNERS file, the PR has no other reviewer activity, and the bug hunt finished on dry_streak with no findings.
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.
Rust caches (Swatinem/rust-cache) in the lint and test workflows now save only on main via
save-if, so PR and merge-queue runs restore without saving; the decode-tx job's setup-foundry RPC cache (unused, since decode-tx makes no RPC calls) is likewise enabled only on main. PR-run cache saves push the repo over GitHub's 10 GB cache limit (currently 10.1 GB, 37% from PR refs), so LRU eviction drops the caches built on main and most runs end up uncached.Investigated in https://pyramid.tehq.net/threads/3ece5de5-7dee-40ba-84d1-648994454750