Skip to content

feat: validate VirtioFS bind mount sources — support file mounts, ski… #70

feat: validate VirtioFS bind mount sources — support file mounts, ski…

feat: validate VirtioFS bind mount sources — support file mounts, ski… #70

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# Layer 1: Cross-platform crate tests on Linux.
# Linux-compatible crates: vz-cli, vz-stack, vz-runtime-contract, vz-linux-native.
# macOS-only crates (vz, vz-sandbox, vz-oci, vz-guest-agent) are skipped.
test-linux:
name: Test (Linux)
runs-on: ubuntu-latest
env:
# Crates that compile on Linux. Update when adding new cross-platform crates.
LINUX_CRATES: "-p vz-cli -p vz-stack -p vz-runtime-contract -p vz-linux-native"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: crates
- name: Check formatting
working-directory: crates
run: cargo fmt --check --all
- name: Check (Linux-compatible crates)
working-directory: crates
run: cargo check $LINUX_CRATES
- name: Clippy (Linux-compatible crates)
working-directory: crates
run: cargo clippy $LINUX_CRATES -- -D warnings
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Test (Linux-compatible crates)
working-directory: crates
run: cargo nextest run $LINUX_CRATES
# Layers 1-2: Full test suite on macOS ARM64
test-macos:
name: Test (macOS ARM64)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: crates
- name: Check formatting
working-directory: crates
run: cargo fmt --check --all
- name: Clippy
working-directory: crates
run: cargo clippy --workspace -- -D warnings
- name: Build
working-directory: crates
run: cargo build --workspace
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Test
working-directory: crates
run: cargo nextest run --workspace
- name: Ad-hoc sign and verify
run: |
./scripts/sign-dev.sh --profile debug
codesign --display --entitlements - crates/target/debug/vz 2>&1 || true
# Layer 3: VM tests (self-hosted, requires golden image)
# Uncomment when self-hosted macOS ARM64 runner is available
# test-vm:
# name: VM Tests (macOS ARM64, self-hosted)
# runs-on: [self-hosted, macOS, ARM64]
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# - uses: taiki-e/install-action@nextest
# - name: Test (with VM tests)
# working-directory: crates
# run: cargo nextest run --workspace --features vm-tests