From c29a345f9465a4f1ed32180815d29c454ff03956 Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Thu, 14 May 2026 15:16:41 +0530 Subject: [PATCH] fix(ci): disable rust-cache bin caching to unbreak macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swatinem/rust-cache's default cache-clean step poisons ~/.cargo/bin under rustup 1.28's multicall binary layout — `cargo` ends up restored as `rustup-init`, breaking `maturin`'s `cargo metadata` call on macos-latest. Set cache-bin: false and bump prefix-key to evict the existing poisoned caches. See: https://github.com/Swatinem/rust-cache/issues/16 --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa9a231..3886b64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,15 @@ jobs: - name: Restore Cargo cache uses: Swatinem/rust-cache@v2 + with: + # Skip caching ~/.cargo/bin/ — rustup 1.28's multicall binary + # interacts badly with this action's cache-clean step and ends up + # restoring a `cargo` that responds as `rustup-init`. Proxies are + # reinstalled on every run by dtolnay/rust-toolchain. + # See: https://github.com/Swatinem/rust-cache/issues/16 + cache-bin: false + # Bump to evict any v0-* caches that already contain the corrupted bin dir. + prefix-key: v1-rust-bin-fix - name: Check Rust formatting run: cargo fmt --all --check @@ -107,6 +116,8 @@ jobs: uses: Swatinem/rust-cache@v2 with: save-if: false + cache-bin: false + prefix-key: v1-rust-bin-fix - name: Run Rust test suite run: cargo test --workspace @@ -151,6 +162,8 @@ jobs: uses: Swatinem/rust-cache@v2 with: save-if: false + cache-bin: false + prefix-key: v1-rust-bin-fix - name: Run Rust test suite (PostgreSQL backend) run: cargo test --workspace --features postgres @@ -189,6 +202,8 @@ jobs: uses: Swatinem/rust-cache@v2 with: save-if: false + cache-bin: false + prefix-key: v1-rust-bin-fix - name: Run Rust test suite (Redis backend) run: cargo test --workspace --features redis @@ -237,6 +252,8 @@ jobs: uses: Swatinem/rust-cache@v2 with: save-if: ${{ matrix.os != 'ubuntu-latest' }} + cache-bin: false + prefix-key: v1-rust-bin-fix - name: Install uv uses: astral-sh/setup-uv@v8.1.0