Skip to content

ci: disable rust-cache cache-bin on macOS-touching jobs#345

Merged
kevinswiber merged 1 commit into
mainfrom
fix/macos-ci-cargo-path
May 15, 2026
Merged

ci: disable rust-cache cache-bin on macOS-touching jobs#345
kevinswiber merged 1 commit into
mainfrom
fix/macos-ci-cargo-path

Conversation

@kevinswiber
Copy link
Copy Markdown
Owner

@kevinswiber kevinswiber commented May 15, 2026

Summary

Supersedes the PATH-append approach (which didn't actually work) and the prior action-swap (#342) (also didn't actually work). Real root cause traced via actions/runner-images#14099Swatinem/rust-cache#341.

The macos-15 and macos-15-arm64 runner images rolled out around 2026-05-11 ship a pre-populated rustup state. Swatinem/rust-cache@v2 caches ~/.cargo/bin by default since v2.8 (PR #325). On the new image, the cache restore step overwrites the freshly-installed rustup proxies with stale binaries that run in installer mode rather than proxy mode. Subsequent cargo build calls land on a rustup-init shim and exit with unexpected argument 'build'. Retries only pass when the runner pool happens to assign an older image generation — which is why the issue looked intermittent.

The reported workaround is cache-bin: false. Apply it to the matrix build jobs in ci.yml and release.yml — the only places that target macOS runners. Lint and Test are Ubuntu-only and not affected.

Test plan

  • Build macos-latest / Build release binary passes on this PR's first attempt
  • Cache restore still works (rust-cache log shows the same Cache Paths minus /Users/runner/.cargo/bin)
  • Lint and Test jobs still pass

@kevinswiber kevinswiber force-pushed the fix/macos-ci-cargo-path branch from f927e31 to bd445b7 Compare May 15, 2026 04:25
@kevinswiber kevinswiber changed the title ci: prepend cargo bin to PATH on macOS runners ci: disable rust-cache cache-bin on macOS-touching jobs May 15, 2026
The recent macos-15-arm64 / macos-15 runner images (rolled out around
2026-05-11) ship a pre-populated rustup state. Swatinem/rust-cache
caches `~/.cargo/bin` by default since v2.8 (PR #325), and on the new
image the cache restore overwrites a fresh toolchain install with stale
rustup proxy binaries that run in installer mode rather than proxy
mode. Subsequent `cargo build` invocations land on a rustup-init shim
and exit with "unexpected argument 'build'". Retries pass only when the
runner pool happens to assign an older image generation.

Set `cache-bin: false` on the matrix `build` jobs in ci.yml and
release.yml — the only places that target macOS runners. Lint and Test
are Ubuntu-only and are not affected.

See Swatinem/rust-cache#341, actions/runner-images#14099.
@kevinswiber kevinswiber force-pushed the fix/macos-ci-cargo-path branch from bd445b7 to 19d1811 Compare May 15, 2026 04:37
@kevinswiber kevinswiber merged commit 19d1811 into main May 15, 2026
13 checks passed
@kevinswiber kevinswiber deleted the fix/macos-ci-cargo-path branch May 15, 2026 04:43
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