Implement basic VM operations on macOS #108
Workflow file for this run
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.target.name }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install toolchain | |
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 fmt --check | |
# TODO: some KVM related tests cannot run in github runners. | |
# - name: Run tests | |
# run: cargo test --verbose | |
- name: Clippy | |
run: cargo clippy --target ${{ matrix.target.name }} |