Skip to content

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Oct 17, 2025

Before

image

After

image

Notice the minor jobs on the left are a lot faster. This is because sccache is slower on average for small crates due to having to calculate a hash of all arguments, input/output files etc. and having to download the cached artifacts.
But it is more granular (per-compiler invocation instead of per-workspace), meaning we still have a lot of cache hits when the rust-cache action would recompile from scratch.

We still keep sccache since the GHA cache will likely be evicted often so we have a backup, and the rust-cache action does not cache the workspace by default.

See sccache debug logs here https://github.com/foundry-rs/foundry/actions/runs/18598664791/job/53031467273?pr=12154#step:8:1

I think by having both we get the best of both worlds.

@DaniPopes DaniPopes marked this pull request as ready for review October 17, 2025 17:23
@DaniPopes DaniPopes enabled auto-merge October 17, 2025 17:42
@DaniPopes DaniPopes added this pull request to the merge queue Oct 17, 2025
Merged via the queue into master with commit 28a9a5e Oct 17, 2025
16 checks passed
@DaniPopes DaniPopes deleted the dani/rust-cache-again branch October 17, 2025 18:12
@github-project-automation github-project-automation bot moved this to Done in Foundry Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants