From c4d4ead5e90de42be5f73418f79931d0262edc9b Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Mar 2026 20:58:51 +0000 Subject: [PATCH] Fix CI: add runner.arch to cache keys, force-install zigbuild The cargo-zigbuild cache was shared between x86 and ARM runners (cache key only used runner.os), causing "Exec format error" when an ARM binary was restored on x86 or vice versa. Added runner.arch to all cache keys and use --force install to overwrite stale binaries. https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28edce6..629a96d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,29 +29,29 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 with: path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-${{ runner.arch }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 with: path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-${{ runner.arch }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 with: path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo-zigbuild uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 with: path: ~/.cargo/bin/cargo-zigbuild - key: ${{ runner.os }}-cargo-zigbuild-${{ matrix.rust }} + key: ${{ runner.os }}-${{ runner.arch }}-cargo-zigbuild-${{ matrix.rust }} - name: Install zig and cargo-zigbuild run: | pip install --break-system-packages ziglang # ziglang pip package installs as python-zig, symlink to zig for cargo-zigbuild sudo ln -sf "$(which python-zig)" /usr/local/bin/zig zig version - cargo-zigbuild --version || cargo install cargo-zigbuild + cargo-zigbuild --version || cargo install --force cargo-zigbuild - run: make check-fmt - run: make lint