1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-06 22:12:32 +00:00

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
This commit is contained in:
Claude 2026-03-18 20:58:51 +00:00
parent 9cf1e952e2
commit c4d4ead5e9
No known key found for this signature in database

View file

@ -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