Skip to content

Commit 7c1319b

Browse files
author
Test User
committed
fix(ci): use bigbox zig for cross builds and disable Docker cache
Fixes failing Linux musl and Docker builds: - Delete Cross.toml (pre-build approach not working with cached images) - Add step to clear cached cross custom images before build - Add step to mount bigbox's zig (/usr/local/bin/zig) into cross containers via CROSS_CONTAINER_OPTS and set ZIG env var - Add no-cache: true to Docker builds to fix cached workspace issue Refs #1874
1 parent b0d17f9 commit 7c1319b

3 files changed

Lines changed: 18 additions & 29 deletions

File tree

.github/workflows/docker-multiarch.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
build-args: |
210210
UBUNTU_VERSION=${{ matrix.ubuntu-version }}
211211
RUST_VERSION=1.92.0
212+
no-cache: true
212213
cache-from: type=gha
213214
cache-to: type=gha,mode=max
214215
provenance: false
@@ -228,6 +229,7 @@ jobs:
228229
build-args: |
229230
UBUNTU_VERSION=${{ matrix.ubuntu-version }}
230231
RUST_VERSION=1.92.0
232+
no-cache: true
231233
cache-from: type=gha
232234
provenance: false
233235
sbom: false

.github/workflows/release-comprehensive.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,22 @@ jobs:
173173
if: matrix.use_cross
174174
run: cargo install cross
175175

176+
- name: Clear cross custom images
177+
if: matrix.use_cross
178+
run: docker rmi $(docker images -q cross-custom-*) 2>/dev/null || true
179+
180+
- name: Setup zig for cross builds
181+
if: matrix.use_cross
182+
run: |
183+
# Mount bigbox's zig binary and lib into cross containers
184+
# Bigbox has zig 0.16.0 installed at /usr/local/bin/zig
185+
ZIG_OPTS="-v /usr/local/bin/zig:/usr/local/bin/zig"
186+
if [ -d /usr/local/lib/zig ]; then
187+
ZIG_OPTS="$ZIG_OPTS -v /usr/local/lib/zig:/usr/local/lib/zig"
188+
fi
189+
echo "CROSS_CONTAINER_OPTS=$ZIG_OPTS -e ZIG=/usr/local/bin/zig" >> $GITHUB_ENV
190+
echo "ZIG=/usr/local/bin/zig" >> $GITHUB_ENV
191+
176192
- name: Cache dependencies
177193
if: matrix.target != 'x86_64-unknown-linux-gnu'
178194
uses: Swatinem/rust-cache@v2

Cross.toml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)