Skip to content

test(vm): uniform honest-skip for Sandbox/MicroVm value-op suites #522

test(vm): uniform honest-skip for Sandbox/MicroVm value-op suites

test(vm): uniform honest-skip for Sandbox/MicroVm value-op suites #522

Workflow file for this run

name: E2E macOS (Virtualization.framework)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
# Read-only token: this workflow only runs tests; nothing it does
# requires write access. Declared explicitly so a future change to the
# org-level default workflow permissions can't silently widen it.
permissions:
contents: read
jobs:
e2e-macos:
name: E2E VZ (macOS Apple Silicon)
runs-on: macos-14
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
# ---- System dependencies ----
- name: Cache musl-cross toolchain
id: cache-musl
uses: actions/cache@v4
with:
path: |
/opt/homebrew/Cellar/musl-cross
/opt/homebrew/opt/musl-cross
/opt/homebrew/bin/aarch64-linux-musl-*
key: ${{ runner.os }}-musl-cross-1
- name: Install musl cross-compilation toolchain
if: steps.cache-musl.outputs.cache-hit != 'true'
run: |
brew install filosottile/musl-cross/musl-cross
- name: Relink musl-cross from cache
if: steps.cache-musl.outputs.cache-hit == 'true'
run: |
brew link musl-cross 2>/dev/null || true
- name: Verify musl-cross
run: |
which aarch64-linux-musl-gcc
aarch64-linux-musl-gcc --version
# ---- Rust toolchain ----
- name: Install Rust stable + aarch64 musl target
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-musl
# ---- Cargo cache ----
# Swatinem/rust-cache prunes `target/` to drop workspace crates and
# incremental build dirs before saving, keeping the cache bounded.
# `jlumbroso/free-disk-space` is Linux-only, so this macOS job
# gets only the cache improvement.
- name: Cache cargo registry + build
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
shared-key: e2e-vz
# ---- Build test initramfs ----
- name: Build test initramfs (guest-agent + claudio)
run: scripts/build_test_image.sh
# ---- Download prebuilt arm64 Linux kernel ----
- name: Download arm64 Linux kernel
run: |
scripts/download_kernel.sh
cp target/vmlinux-arm64 /tmp/void-box-kernel
# ---- Run conformance tests ----
- name: Run conformance E2E tests
env:
VOID_BOX_KERNEL: /tmp/void-box-kernel
VOID_BOX_INITRAMFS: /tmp/void-box-test-rootfs.cpio.gz
run: |
echo "Kernel: $VOID_BOX_KERNEL"
echo "Initramfs: $VOID_BOX_INITRAMFS"
ls -la "$VOID_BOX_KERNEL"
ls -la "$VOID_BOX_INITRAMFS"
# Run conformance tests (--ignored to include VM tests, sequential to avoid resource contention).
# This runner (macos-14) has no nested virtualization, so the VZ
# backend reports "Virtualization is not available on this hardware"
# and these tests skip loudly (VOID_BOX_REQUIRE_VM is intentionally
# unset here). --nocapture surfaces the per-test SKIP reason so the
# skip is visible, not a silent green. Running real VZ e2e in CI is
# tracked in https://github.com/the-void-ia/void-box/issues/158.
cargo test --test conformance -- --ignored --test-threads=1 --nocapture
- name: Snapshot round-trip
env:
VOID_BOX_KERNEL: /tmp/void-box-kernel
VOID_BOX_INITRAMFS: /tmp/void-box-test-rootfs.cpio.gz
# Skips loudly on this virt-less runner (see the conformance step and #158).
run: cargo test --release --test snapshot_vz_integration -- --ignored --test-threads=1 --nocapture