Skip to content

Commit 18a5c58

Browse files
committed
fix(ci): fix release-vm-dev pipeline failures
- Add CI container to download-kernel-runtime job so gh CLI is available (bare build-amd64 runner does not have gh installed) - Fall back to plain cargo build in build-rootfs.sh when cargo-zigbuild is not available (works for native builds in CI where arch matches)
1 parent 1b79bdb commit 18a5c58

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/release-vm-dev.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ jobs:
6565
name: Download Kernel Runtime
6666
runs-on: build-amd64
6767
timeout-minutes: 10
68+
container:
69+
image: ghcr.io/nvidia/openshell/ci:latest
70+
credentials:
71+
username: ${{ github.actor }}
72+
password: ${{ secrets.GITHUB_TOKEN }}
6873
steps:
6974
- uses: actions/checkout@v4
7075

crates/openshell-vm/scripts/build-rootfs.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,16 +302,18 @@ SUPERVISOR_TARGET="${RUST_TARGET}"
302302
SUPERVISOR_BIN="${PROJECT_ROOT}/target/${SUPERVISOR_TARGET}/release/openshell-sandbox"
303303

304304
echo "==> Building openshell-sandbox supervisor binary (${SUPERVISOR_TARGET})..."
305-
if ! command -v cargo-zigbuild >/dev/null 2>&1; then
306-
echo "ERROR: cargo-zigbuild is not installed."
307-
echo " Install it with: cargo install cargo-zigbuild"
308-
echo " Also requires: zig (brew install zig)"
309-
exit 1
305+
if command -v cargo-zigbuild >/dev/null 2>&1; then
306+
cargo zigbuild --release -p openshell-sandbox --target "${SUPERVISOR_TARGET}" \
307+
--manifest-path "${PROJECT_ROOT}/Cargo.toml" 2>&1 | tail -5
308+
else
309+
# Fallback: use plain cargo build when cargo-zigbuild is not available.
310+
# This works for native builds (e.g. building x86_64 on x86_64) but
311+
# will fail for true cross-compilation without a cross toolchain.
312+
echo " cargo-zigbuild not found, falling back to cargo build..."
313+
cargo build --release -p openshell-sandbox --target "${SUPERVISOR_TARGET}" \
314+
--manifest-path "${PROJECT_ROOT}/Cargo.toml" 2>&1 | tail -5
310315
fi
311316

312-
cargo zigbuild --release -p openshell-sandbox --target "${SUPERVISOR_TARGET}" \
313-
--manifest-path "${PROJECT_ROOT}/Cargo.toml" 2>&1 | tail -5
314-
315317
if [ ! -f "${SUPERVISOR_BIN}" ]; then
316318
echo "ERROR: supervisor binary not found at ${SUPERVISOR_BIN}"
317319
exit 1

0 commit comments

Comments
 (0)