Skip to content

ci: export ACTIONS_CACHE_SERVICE_V2 so sccache uses the current cache API - #81

Merged
iamalwaysuncomfortable merged 1 commit into
masterfrom
ci/sccache-cache-service-v2
Oct 22, 2026
Merged

iamalwaysuncomfortable merged 1 commit into
masterfrom
ci/sccache-cache-service-v2

Conversation

@iamalwaysuncomfortable

Copy link
Copy Markdown
Member

Follow-up to #80's best-effort sccache start on the native runners.

sccache's GitHub Actions backend selects the current (v2) cache API only when ACTIONS_CACHE_SERVICE_V2 is set (opendal ghac backend, core/services/ghac/src/core.rs). The github-script step in #80 exported only ACTIONS_RESULTS_URL and ACTIONS_RUNTIME_TOKEN, as sccache's docs show, so sccache fell back to the retired v1 endpoint: run 39757585375 built build (macos-aarch64) with 0 cache hits and 675 write errors (8 minutes against 3.5 with hits). The build still passed, which is what #80 set out to guarantee, but the cache no longer did anything on macOS and Windows.

This exports ACTIONS_CACHE_SERVICE_V2 and ACTIONS_CACHE_URL alongside the other two. Expected effect: hit rates back to what maturin-action's own sccache input produced, with the startup failure still non-fatal.

Verification: actionlint clean; the first run on this branch is a cold write, the second run shows the hits.

… API

Without it the GHA backend falls back to the retired v1 endpoint: run
39757585375 built with 0 hits and 675 write errors on macOS.
@iamalwaysuncomfortable
iamalwaysuncomfortable merged commit de787dc into master Oct 22, 2026
24 checks passed
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.

1 participant