2024-11-05 08:14:01 +00:00
|
|
|
name: Cloud Hypervisor RISC-V 64-bit Preview
|
|
|
|
on: [pull_request, merge_group]
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Cargo
|
|
|
|
runs-on: riscv64-qemu-host
|
2024-11-29 09:23:31 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
module:
|
|
|
|
- hypervisor
|
|
|
|
- arch
|
|
|
|
|
2024-11-05 08:14:01 +00:00
|
|
|
steps:
|
|
|
|
- name: Code checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
run: /opt/scripts/exec-in-qemu.sh rustup default 1.77.0
|
|
|
|
|
2024-11-29 09:23:31 +00:00
|
|
|
- name: Build ${{ matrix.module }} Module (kvm)
|
|
|
|
run: /opt/scripts/exec-in-qemu.sh cargo rustc --locked -p ${{ matrix.module }} --no-default-features --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states
|
2024-11-05 08:14:01 +00:00
|
|
|
|
2024-11-29 09:23:31 +00:00
|
|
|
- name: Clippy ${{ matrix.module }} Module (kvm)
|
|
|
|
run: /opt/scripts/exec-in-qemu.sh cargo clippy --locked -p ${{ matrix.module }} --no-default-features --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states
|
2024-11-05 08:14:01 +00:00
|
|
|
|
2024-11-29 09:23:31 +00:00
|
|
|
- name: Test ${{ matrix.module }} Module (kvm)
|
|
|
|
run: /opt/scripts/exec-in-qemu.sh cargo test --locked -p ${{ matrix.module }} --no-default-features --features "kvm"
|
2024-11-05 08:14:01 +00:00
|
|
|
|
|
|
|
- name: Check no files were modified
|
|
|
|
run: test -z "$(git status --porcelain)"
|