Files
ironclaw/.github
Illia Polosukhin b93098d48f ci: save rust-cache only on main/staging pushes (#2609)
Swatinem/rust-cache was saving the multi-GB target/ directory at the
end of every CI job — including PR jobs that will never be read from
again by a different PR. The post-cache step was adding 5+ minutes of
wall clock to each Clippy and Tests matrix leg, on top of the actual
compile time.

This change:

- Adds save-if gating to every rust-cache step in code_style.yml and
  test.yml so the cache is only written when github.ref is refs/heads/main
  or refs/heads/staging. PR jobs still restore, they just skip the
  upload.
- Adds push triggers on main and staging to code_style.yml so those
  pushes actually exercise each matrix leg and refresh the cache entry
  that PRs will restore from next. Without this, the cache would never
  be refreshed after the one-time manual warm-up.
- Gates no-panics on pull_request events since it diffs against
  github.event.pull_request.base.sha, which is empty on push events.

Expected impact on PR wall clock: ~5 minutes saved per Clippy / Tests
matrix leg, no change to cache hit rate for subsequent PRs.
2026-04-18 14:07:06 +09:00
..