Skip to content

Commit 0f081b6

Browse files
author
Test User
committed
fix(ci): correct zig mount path for cross builds
Zig needs the entire installation directory mounted, not just the binary. Also requires writable cache directories inside the container. - Mount /usr/local/zig-x86_64-linux-0.16.0 instead of /usr/local/bin/zig - Set ZIG_GLOBAL_CACHE_DIR and ZIG_LOCAL_CACHE_DIR to /tmp - Verified working on bigbox with cross check Refs #1874
1 parent 7c1319b commit 0f081b6

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/release-comprehensive.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,16 @@ jobs:
180180
- name: Setup zig for cross builds
181181
if: matrix.use_cross
182182
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
183+
# Mount bigbox's zig installation into cross containers
184+
# Bigbox has zig 0.16.0 installed at /usr/local/zig-x86_64-linux-0.16.0/
185+
ZIG_INSTALL="/usr/local/zig-x86_64-linux-0.16.0"
186+
ZIG_BIN="$ZIG_INSTALL/zig"
187+
ZIG_OPTS="-v $ZIG_INSTALL:$ZIG_INSTALL"
188+
ZIG_OPTS="$ZIG_OPTS -e ZIG=$ZIG_BIN"
189+
ZIG_OPTS="$ZIG_OPTS -e ZIG_GLOBAL_CACHE_DIR=/tmp/zig-global-cache"
190+
ZIG_OPTS="$ZIG_OPTS -e ZIG_LOCAL_CACHE_DIR=/tmp/zig-local-cache"
191+
echo "CROSS_CONTAINER_OPTS=$ZIG_OPTS" >> $GITHUB_ENV
192+
echo "ZIG=$ZIG_BIN" >> $GITHUB_ENV
191193
192194
- name: Cache dependencies
193195
if: matrix.target != 'x86_64-unknown-linux-gnu'

0 commit comments

Comments
 (0)