Skip to content

fix(ci): release-plz cargo package fails — disable sccache wrapper#380

Merged
githubrobbi merged 1 commit into
mainfrom
fix/release-plz-sccache-wrapper
Jun 9, 2026
Merged

fix(ci): release-plz cargo package fails — disable sccache wrapper#380
githubrobbi merged 1 commit into
mainfrom
fix/release-plz-sccache-wrapper

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

Problem

The R4-activated release-plz workflow failed on its first real run (run 27239208318) after PR #379 merged:

cargo package failed: could not execute process `sccache .../rustc -vV` (never executed)
Caused by: No such file or directory (os error 2)

Root cause

.cargo/config.toml sets rustc-wrapper = "sccache" repo-wide for local-dev caching. release-plz spawns cargo package in per-tag worktrees, which inherits the wrapper — but GitHub-hosted runners don't have sccache installed.

This is the same class of bug already solved in pr-fast.yml:63 (RUSTC_WRAPPER: ""); release-plz.yml simply never got the guard because it was manual-only until R4.

Fix

  • Add workflow-level RUSTC_WRAPPER: "" + CARGO_INCREMENTAL: 0 env, mirroring pr-fast.yml. Defeats the config value without touching .cargo/config.toml (preserves local dev UX).
  • Replace the R7 OIDC job's actionlint-flagged if: false with a repo-variable gate (vars.ENABLE_CRATES_IO_PUBLISH == 'true') — keeps the job dormant, satisfies actionlint, makes R8 activation a Settings toggle.

Verification

  • actionlint .github/workflows/release-plz.yml: ✅ 0 warnings
  • lint-pre-push (all gates): ✅

The R4-activated release-plz workflow failed on its first real run:

  cargo package failed: could not execute process `sccache rustc -vV`

  (never executed) — No such file or directory (os error 2)

Root cause: .cargo/config.toml sets `rustc-wrapper = "sccache"` repo-

wide for local-dev caching. release-plz spawns `cargo package` in

per-tag worktrees, which inherits the wrapper, but GitHub-hosted

runners don't have sccache installed.

Fix: add workflow-level `RUSTC_WRAPPER: ""` + `CARGO_INCREMENTAL: 0`,

mirroring the identical guard already in pr-fast.yml (line 63). This

defeats the config value without touching .cargo/config.toml (which

would degrade local dev UX).

Also: replace the R7 OIDC job's actionlint-flagged `if: false` with a

repo-variable gate (`vars.ENABLE_CRATES_IO_PUBLISH == 'true'`) — keeps

the job dormant, satisfies actionlint, and makes R8 activation a Settings

toggle instead of a workflow edit.
@githubrobbi githubrobbi enabled auto-merge (squash) June 9, 2026 22:20
@githubrobbi githubrobbi merged commit 609f7e6 into main Jun 9, 2026
19 checks passed
@githubrobbi githubrobbi deleted the fix/release-plz-sccache-wrapper branch June 9, 2026 22:34
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