ci: Enable riscv64 CI of arch module

Enable build, clippy and unit-test on arch module.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He 2024-11-29 17:23:31 +08:00 committed by Rob Bradford
parent bd8db86b0c
commit ac3ef0849e

View File

@ -8,6 +8,13 @@ jobs:
build: build:
name: Cargo name: Cargo
runs-on: riscv64-qemu-host runs-on: riscv64-qemu-host
strategy:
fail-fast: false
matrix:
module:
- hypervisor
- arch
steps: steps:
- name: Code checkout - name: Code checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -17,14 +24,14 @@ jobs:
- name: Install Rust toolchain - name: Install Rust toolchain
run: /opt/scripts/exec-in-qemu.sh rustup default 1.77.0 run: /opt/scripts/exec-in-qemu.sh rustup default 1.77.0
- name: Build hypervisor Module (kvm) - name: Build ${{ matrix.module }} Module (kvm)
run: /opt/scripts/exec-in-qemu.sh cargo rustc --locked -p hypervisor --no-default-features --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states 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
- name: Clippy hypervisor Module (kvm) - name: Clippy ${{ matrix.module }} Module (kvm)
run: /opt/scripts/exec-in-qemu.sh cargo clippy --locked -p hypervisor --no-default-features --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states 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
- name: Test hypervisor Module (kvm) - name: Test ${{ matrix.module }} Module (kvm)
run: /opt/scripts/exec-in-qemu.sh cargo test --locked -p hypervisor --no-default-features --features "kvm" run: /opt/scripts/exec-in-qemu.sh cargo test --locked -p ${{ matrix.module }} --no-default-features --features "kvm"
- name: Check no files were modified - name: Check no files were modified
run: test -z "$(git status --porcelain)" run: test -z "$(git status --porcelain)"