docs: mark supporting legacy VFIO API as done #424
This file contains 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: Rust | |
permissions: read-all | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_test: | |
strategy: | |
matrix: | |
target: | |
- name: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- name: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
- name: aarch64-apple-darwin | |
os: macos-latest | |
runs-on: ${{ matrix.target.os }} | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Get stable rust version | |
id: rust-version | |
run: echo RUST_VERSION=$(cargo +stable --version | cut -d ' ' -f 2) >> "$GITHUB_OUTPUT" | |
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu | |
target/ | |
key: ${{ matrix.target.name }}-cargo-${{ steps.rust-version.outputs.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Add target | |
run: rustup target add ${{ matrix.target.name }} | |
- name: Build | |
run: cargo build --verbose --target ${{ matrix.target.name }} | |
if: matrix.target.name != 'aarch64-unknown-linux-gnu' | |
- name: Format | |
run: > | |
cargo +nightly --version || ( | |
rustup toolchain install nightly && | |
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt | |
) && | |
cargo +nightly fmt --check | |
if: matrix.target.name == 'x86_64-unknown-linux-gnu' | |
- name: Run tests | |
run: cargo test --target ${{ matrix.target.name }} | |
if: matrix.target.name != 'aarch64-unknown-linux-gnu' | |
- name: Clippy | |
run: cargo clippy --target ${{ matrix.target.name }} -- -D warnings |