From 778a72f52fa8268208e8e630285a9dd5e7234a52 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Tue, 5 Nov 2024 16:14:01 +0800 Subject: [PATCH] ci: Enable riscv64 CI of hypervisor module Integrate machine provided by @ISRC-CAS to run build, clippy and unit-test on hypervisor module. Signed-off-by: Ruoqing He --- .github/workflows/preview-riscv64.yaml | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/preview-riscv64.yaml diff --git a/.github/workflows/preview-riscv64.yaml b/.github/workflows/preview-riscv64.yaml new file mode 100644 index 000000000..7e6614d7f --- /dev/null +++ b/.github/workflows/preview-riscv64.yaml @@ -0,0 +1,30 @@ +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 + 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 + + - name: Build hypervisor 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 + + - name: Clippy hypervisor 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 + + - name: Test hypervisor Module (kvm) + run: /opt/scripts/exec-in-qemu.sh cargo test --locked -p hypervisor --no-default-features --features "kvm" + + - name: Check no files were modified + run: test -z "$(git status --porcelain)"