ci: disable rust-cache cache-bin on macOS-touching jobs#345
Merged
Conversation
f927e31 to
bd445b7
Compare
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.
bd445b7 to
19d1811
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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#14099 → Swatinem/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@v2caches~/.cargo/binby 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. Subsequentcargo buildcalls land on a rustup-init shim and exit withunexpected 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 matrixbuildjobs inci.ymlandrelease.yml— the only places that target macOS runners. Lint and Test are Ubuntu-only and not affected.Test plan
Build macos-latest / Build release binarypasses on this PR's first attempt/Users/runner/.cargo/bin)