integration test: x86: also boot on Cloud Hypervisor; riscv: add for MMIO test #106
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: Build | |
| on: [ pull_request, merge_group ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: "${{ matrix.runs-on }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: | |
| - macos-latest # aarch64 | |
| - ubuntu-latest # x86_64 | |
| - windows-latest # x86_64 | |
| rust: | |
| - stable | |
| - nightly | |
| - 1.85.1 # MSVR | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "${{ matrix.rust }}" | |
| targets: x86_64-unknown-linux-gnu,x86_64-unknown-uefi,i686-unknown-uefi,thumbv7em-none-eabihf,aarch64-unknown-uefi,riscv64gc-unknown-none-elf | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: "${{ matrix.runs-on }}-${{ matrix.rust }}" | |
| - name: Build | |
| run: cargo build --all-targets --verbose | |
| - name: Build (no_std, x86, aarch64, riscv) | |
| run: | | |
| cargo build --verbose --all-features --target aarch64-unknown-uefi | |
| cargo build --verbose --all-features --target i686-unknown-uefi | |
| cargo build --verbose --all-features --target riscv64gc-unknown-none-elf | |
| cargo build --verbose --all-features --target thumbv7em-none-eabihf | |
| cargo build --verbose --all-features --target x86_64-unknown-uefi | |
| - name: Run tests | |
| run: cargo test --verbose --all-features | |
| integration_test: | |
| runs-on: ubuntu-latest | |
| name: Integration Test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: "integration-test" | |
| cache-directories: | |
| ./integration-test/x86/target | |
| ./integration-test/riscv/target | |
| - name: Install integration-test dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| make \ | |
| qemu-system-misc \ | |
| qemu-system-x86 | |
| - name: Verify QEMU installation | |
| run: | | |
| qemu-system-i386 --version | |
| qemu-system-riscv64 --version | |
| - name: Build | |
| working-directory: integration-test | |
| run: make | |
| - name: Run | |
| working-directory: integration-test | |
| run: make run | |
| miri: | |
| runs-on: ubuntu-latest | |
| needs: | |
| # Logical dependency and wait for cache to be present | |
| - build | |
| strategy: | |
| matrix: | |
| rust: | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "${{ matrix.rust }}" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: "${{ matrix.rust }}" | |
| - run: rustup component add miri | |
| - run: cargo miri test --tests | |
| # Style + documentation checks | |
| style_checks: | |
| runs-on: "${{ matrix.runs-on }}" | |
| strategy: | |
| matrix: | |
| runs-on: | |
| - macos-latest # aarch64 | |
| - ubuntu-latest # x86_64 | |
| - windows-latest # x86_64 | |
| rust: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "${{ matrix.rust }}" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: "${{ matrix.rust }}" | |
| - name: Rustfmt | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets | |
| - name: Rustdoc | |
| run: cargo doc --no-deps --document-private-items | |
| - name: Rustdoc (doc_cfg + nightly) | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs | |
| run: cargo +nightly doc --no-deps --document-private-items |