test(vm): uniform honest-skip for Sandbox/MicroVm value-op suites #573
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| # Default GITHUB_TOKEN scope for every job below: read-only on contents, | |
| # nothing else. This workflow doesn't push, doesn't open PRs, doesn't | |
| # write artifacts to releases — read is all it needs. Declaring it | |
| # explicitly so a change to the org-level default permissions doesn't | |
| # silently widen this workflow's privileges. | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }} / ${{ matrix.rust }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| rust: stable | |
| - os: ubuntu-latest | |
| rust: beta | |
| - os: ubuntu-24.04-arm | |
| rust: stable | |
| - os: macos-latest | |
| rust: stable | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # `jlumbroso/free-disk-space` is Ubuntu-only (uses apt-get); guard | |
| # so the macOS leg of the matrix skips it without erroring. | |
| - name: Free runner disk space | |
| if: runner.os == 'Linux' | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: false | |
| docker-images: true | |
| swap-storage: true | |
| tool-cache: false | |
| - name: Install Rust ${{ matrix.rust }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: rustfmt, clippy | |
| # Replaces three separate `actions/cache@v4` steps (registry / git | |
| # / target). Swatinem/rust-cache prunes workspace crates and | |
| # `target/incremental` before saving, so the cache can't grow | |
| # without bound the way the raw `target/` cache did. | |
| - name: Cache cargo registry + build | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| shared-key: test-${{ matrix.rust }} | |
| - name: Build workspace binaries | |
| run: | | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| cargo build --workspace --exclude guest-agent --all-features | |
| else | |
| cargo build --workspace --all-features | |
| fi | |
| - name: Run tests | |
| run: | | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| cargo test --workspace --exclude guest-agent --all-features --verbose | |
| else | |
| cargo test --workspace --all-features --verbose | |
| fi | |
| - name: Run doc tests | |
| run: | | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| cargo test --doc --workspace --exclude guest-agent --all-features | |
| else | |
| cargo test --doc --workspace --all-features | |
| fi | |
| lint: | |
| name: Lint (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Check formatting | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: | | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| cargo clippy --workspace --exclude guest-agent --all-targets --all-features -- -D warnings | |
| else | |
| cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| fi | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] | |
| rust: [stable] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust ${{ matrix.rust }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Build library | |
| run: cargo build --release --lib | |
| - name: Build CLI | |
| run: cargo build --release --bin voidbox | |
| - name: Build examples | |
| run: cargo build --release --examples | |
| docs: | |
| name: Documentation (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build documentation | |
| run: | | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| cargo doc --workspace --no-deps --all-features --exclude guest-agent | |
| else | |
| cargo doc --no-deps --all-features | |
| fi | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| msrv: | |
| name: MSRV (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust 1.88 | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.88" | |
| - name: Check build with MSRV | |
| run: | | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| cargo build --workspace --exclude guest-agent --all-features | |
| else | |
| cargo build --workspace --all-features | |
| fi | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run security audit | |
| uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} |