mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
`cargo rustc` is incompatible with virtual manifests, so the CI needs to use cargo build instead. However, passing `RUSTFLAGS="-D warnings"` via the environment would propagate to all dependencies, and some of them currently fail to build under ``-D warnings` due to issues like [0]: ``` error: creating a mutable reference to mutable static --> src/temp.rs:97:5 | 97 | DIRS.pop() | ^^^^^^^^^^ mutable reference to mutable static ``` To resolve this, apply ``-D warnings` only to the `cargo clippy` commands (which apply to our workspace only) and avoid enforcing it for the entire cargo build. [0]: https://github.com/cloud-hypervisor/cloud-hypervisor/actions/runs/19962283528/job/57245376263?pr=7525 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
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
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
module:
|
|
- hypervisor
|
|
- arch
|
|
- vm-allocator
|
|
- devices
|
|
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Rust toolchain
|
|
run: /opt/scripts/exec-in-qemu.sh rustup default 1.89.0
|
|
|
|
- name: Build ${{ matrix.module }} Module (kvm)
|
|
run: /opt/scripts/exec-in-qemu.sh cargo build --locked -p ${{ matrix.module }} --no-default-features --features "kvm"
|
|
|
|
- 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
|
|
|
|
- name: Test ${{ matrix.module }} Module (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
|
|
run: test -z "$(git status --porcelain)"
|