Skip to content

Start using sccache in CI#5192

Open
graydon wants to merge 1 commit intostellar:masterfrom
graydon:sccache-in-ci
Open

Start using sccache in CI#5192
graydon wants to merge 1 commit intostellar:masterfrom
graydon:sccache-in-ci

Conversation

@graydon
Copy link
Contributor

@graydon graydon commented Mar 20, 2026

This switches us over from using cache volumes for build artifacts to using sccache for build artifacts. We still use cache volumes for ~/.cargo contents but that ought not to interfere with anything.

Rationale:

  • Using cache volumes is possibly more-expensive than sccache? (maybe? or at least billed at coarser granularity?)
  • Sccache will give better cache hit rates across all builds (including PRs and even dev workstation builds if you use it right)
  • Cache volume management logic is a bit fragile on its own, we get to delete a bunch of code
  • Most importantly: using cache volumes amplifies a bug in Makefile.am to into a cross-CI-session artifact reuse; sccache is a more trustworthy source of cache-logic than our own Makefile hacking (this has happened: see Fix stale Soroban host rebuild invalidation. #5187)

Copilot AI review requested due to automatic review settings March 20, 2026 20:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches CI build artifact caching from Namespace cache volumes (persisting build directories) to remote compilation caching via sccache (configured through nsc), while still caching ~/.cargo contents.

Changes:

  • Update ci-build.sh to configure builds with --enable-nsc-sccache and remove ccache/cargo sweep logic.
  • Update GitHub Actions workflows to authenticate to Namespace Cloud, install sccache, and stop caching build output directories.
  • Move “already tested commit” marker to a home-directory file that can be cached independently of build directories.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
ci-build.sh Switch build configuration from ccache to nsc-configured sccache and simplify cache purging/reporting.
.github/workflows/build.yml Add Namespace Cloud auth/permissions, install sccache, adjust cached paths, and update “last tested commit” storage.

@graydon graydon force-pushed the sccache-in-ci branch 12 times, most recently from f82af3f to 42c0c64 Compare March 21, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants