From c05329a1b5962b79ddc7462a0bf81ba36f5fa9d9 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 29 Sep 2025 19:45:12 +0100 Subject: [PATCH 1/6] fix(ci): pass --workspace to build test otherwise, on multi-crate workspaces, this test run does precisely nothing. Signed-off-by: Patrick Roy --- .buildkite/test_description.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/test_description.json b/.buildkite/test_description.json index d4beb38..4110081 100644 --- a/.buildkite/test_description.json +++ b/.buildkite/test_description.json @@ -2,7 +2,7 @@ "tests": [ { "test_name": "build-gnu", - "command": "RUSTFLAGS=\"-D warnings\" cargo build --release", + "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --workspace", "platform": [ "x86_64", "aarch64", @@ -11,7 +11,7 @@ }, { "test_name": "build-musl", - "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --target {target_platform}-unknown-linux-musl", + "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --target {target_platform}-unknown-linux-musl --workspace", "platform": [ "x86_64", "aarch64" From 3fc62286b9160b3bdc756e61e86827ecc1f87c59 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 29 Sep 2025 19:46:02 +0100 Subject: [PATCH 2/6] ci: add --all-targets to build test This ensures tests, binaries, benchmarks, examples and libraries are all build-tested, instead of just the default targets. Signed-off-by: Patrick Roy --- .buildkite/test_description.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/test_description.json b/.buildkite/test_description.json index 4110081..91d1cc7 100644 --- a/.buildkite/test_description.json +++ b/.buildkite/test_description.json @@ -2,7 +2,7 @@ "tests": [ { "test_name": "build-gnu", - "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --workspace", + "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --workspace --all-targets", "platform": [ "x86_64", "aarch64", @@ -11,7 +11,7 @@ }, { "test_name": "build-musl", - "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --target {target_platform}-unknown-linux-musl --workspace", + "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --target {target_platform}-unknown-linux-musl --workspace --all-targets", "platform": [ "x86_64", "aarch64" From 7c25d087b6f5d72395e3482676660b8211e57066 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 29 Sep 2025 19:42:40 +0100 Subject: [PATCH 3/6] ci: drop check-warnings test We already run `cargo build` with `RUSTFlAGS=-Dwarnings`, so also running `cargo check` with the same arguments, on the same architectures, and with the same rustflags gains us nothing. Signed-off-by: Patrick Roy --- .buildkite/test_description.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.buildkite/test_description.json b/.buildkite/test_description.json index 91d1cc7..749f319 100644 --- a/.buildkite/test_description.json +++ b/.buildkite/test_description.json @@ -76,15 +76,6 @@ "riscv64" ] }, - { - "test_name": "check-warnings", - "command": "RUSTFLAGS=\"-D warnings\" cargo check --all-targets --all-features --workspace", - "platform": [ - "x86_64", - "aarch64", - "riscv64" - ] - }, { "test_name": "coverage", "command": "pytest $(find . -type f -name \"test_coverage.py\")", From 704cab94841287aa3b8496fd7c18b0259b80cec1 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 29 Sep 2025 19:49:09 +0100 Subject: [PATCH 4/6] ci(clippy): drop redundant arguments --libs --benches and co are already implies by --all-targets. Signed-off-by: Patrick Roy --- .buildkite/test_description.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/test_description.json b/.buildkite/test_description.json index 749f319..8ca26a4 100644 --- a/.buildkite/test_description.json +++ b/.buildkite/test_description.json @@ -69,7 +69,7 @@ }, { "test_name": "clippy", - "command": "cargo clippy --workspace --bins --examples --benches --all-features --all-targets -- -D warnings -D clippy::undocumented_unsafe_blocks", + "command": "cargo clippy --workspace --all-features --all-targets -- -D warnings -D clippy::undocumented_unsafe_blocks", "platform": [ "x86_64", "aarch64", From 097088881e838f8bdca5a0eb9106fcc84cc0f3b2 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Tue, 30 Sep 2025 09:00:05 +0100 Subject: [PATCH 5/6] chore: bump container version pick up container that has cargo-all-features installed. Signed-off-by: Patrick Roy --- .buildkite/autogenerate_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/autogenerate_pipeline.py b/.buildkite/autogenerate_pipeline.py index 0af68a5..331bd23 100755 --- a/.buildkite/autogenerate_pipeline.py +++ b/.buildkite/autogenerate_pipeline.py @@ -60,7 +60,7 @@ # This represents the version of the rust-vmm-container used # for running the tests. -CONTAINER_VERSION = "gf26de2f" +CONTAINER_VERSION = "g5447a4e" # The suffix suggests that the dev image with `v{N}-riscv` tag is not to be # confused with real `riscv64` image (it's actually a `x86_64` image with # `qemu-system-riscv64` installed), since AWS yet has `riscv64` machines From d9d079259e09f9e2f152cefc4ae6e09570288757 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 29 Sep 2025 19:47:46 +0100 Subject: [PATCH 6/6] ci: convert build and test steps to use cargo-all-features Ensure that every permutation of feature flags is both build-tested, and has their unit-tests ran. The unit-testing part can be reverted to `--all-features` at some point, once we have made sure that all our cargo features are actually additive. Signed-off-by: Patrick Roy --- .buildkite/test_description.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/test_description.json b/.buildkite/test_description.json index 8ca26a4..696a2c3 100644 --- a/.buildkite/test_description.json +++ b/.buildkite/test_description.json @@ -2,7 +2,7 @@ "tests": [ { "test_name": "build-gnu", - "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --workspace --all-targets", + "command": "RUSTFLAGS=\"-D warnings\" cargo all-features build --release --workspace --all-targets", "platform": [ "x86_64", "aarch64", @@ -11,7 +11,7 @@ }, { "test_name": "build-musl", - "command": "RUSTFLAGS=\"-D warnings\" cargo build --release --target {target_platform}-unknown-linux-musl --workspace --all-targets", + "command": "RUSTFLAGS=\"-D warnings\" cargo all-features build --release --target {target_platform}-unknown-linux-musl --workspace --all-targets", "platform": [ "x86_64", "aarch64" @@ -35,7 +35,7 @@ }, { "test_name": "unittests-musl", - "command": "cargo test --all-features --workspace --target {target_platform}-unknown-linux-musl", + "command": "cargo all-features test --workspace --target {target_platform}-unknown-linux-musl", "platform": [ "x86_64", "aarch64" @@ -46,7 +46,7 @@ }, { "test_name": "unittests-gnu-release", - "command": "cargo test --release --all-features --workspace", + "command": "cargo all-features test --release --workspace", "platform": [ "x86_64", "aarch64", @@ -58,7 +58,7 @@ }, { "test_name": "unittests-musl-release", - "command": "cargo test --release --all-features --workspace --target {target_platform}-unknown-linux-musl", + "command": "cargo all-features test --release --workspace --target {target_platform}-unknown-linux-musl", "platform": [ "x86_64", "aarch64"