177 Commits

Author SHA1 Message Date
Andreea Florescu
bfca469deb allow tests to define if_changed and crate_path
We now check whether the test defines if_changed and crate_path before
using the ones from the workspace. If the tests does define these two,
then we don't overwrite them with the default workspace configuration.

This is needed so that custom pipelines for tests can specify as if
changed the crate that they're intended to. Without this change we
end up running the custom tests for all crates that are changed instead
of running it just for the crate that they're intended.

Signed-off-by: Andreea Florescu <andreea.florescu15@gmail.com>
2026-07-09 14:30:54 +03:00
Ruoqing He
84550804a4 docs: Document --workspace-selective mode
Add a README section spelling out the three goals: per-crate
supported platforms, custom tests defined per crate, and a minimal
set of workspace-scoped tests for cross-crate compatibility. Also
describe how `--workspace-selective` uses Buildkite's native
`if_changed` property to realize them.

Signed-off-by: Ruoqing He <ruoqing.he@lingcage.com>
2026-06-30 15:17:36 +02:00
Ruoqing He
1a24a830be ci: Enable per-crate selective pipeline generation
Running the full pipeline for every change in a Cargo workspace
retests crates a pull request never touched. Add a
`--workspace-selective` parameter that, when set to `True`, emits one
step per workspace member tagged with Buildkite's native `if_changed`
property, so each crate's shared crate-scoped tests only run when
files in that crate (or in a workspace-global path) change. Workspace
members are discovered by parsing the workspace's `Cargo.toml` directly
so the script does not need `cargo` on the host. The shared test
description is supplied via `-t`; a crate may extend it with its own
`.buildkite/test_description.json`, whose tests run only when files in
that crate change.

Signed-off-by: Ruoqing He <ruoqing.he@lingcage.com>
2026-06-30 15:17:36 +02:00
Albert Esteve
2601a12663 Update container version to g2b5b066 with libswscale-dev
Signed-off-by: Albert Esteve <aesteve@redhat.com>
2026-05-21 14:35:36 +02:00
Albert Esteve
3da0e5f852 Update container version to gace8da2 with media dependencies
Signed-off-by: Albert Esteve <aesteve@redhat.com>
2026-05-04 11:56:12 +02:00
Stefano Garzarella
112dd9ffb2 codeowners: update dependencies
Dependabot is reporting several vulnerability alerts related to
`codeowners/requirements.txt`, let's update them.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2026-03-01 13:03:41 +01:00
Stefano Garzarella
94e2492e36 chore: fix formatting issues
New `black` is complaining about reformatting some of our files,
let's make it happy:

    $ black . --check
    would reformat rust-vmm-ci/test_run.py
    would reformat rust-vmm-ci/integration_tests/conftest.py
    would reformat rust-vmm-ci/.buildkite/autogenerate_pipeline.py

    Oh no! 💥 💔 💥
    3 files would be reformatted, 5 files would be left unchanged.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2026-03-01 13:03:41 +01:00
Stefano Garzarella
65d339dde5 Update container version that includes cargo-audit 0.22
cargo-audit 0.22 is the first version that can parse cvss 4.0 scores
and avoid the following error in our pipelines:
  $ cargo audit -q --deny warnings
  error: error loading advisory database: parse error: TOML parse error at line 8, column 8
    |
  8 | cvss = "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  unsupported CVSS version: 4.0

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2026-01-07 13:07:57 +01:00
Stefano Garzarella
e34c504162 Add tool to detect inactive GitHub codeowners
Introduces a Python script that checks CODEOWNERS against GitHub activity
(reviews, PR/issue comments) over a configurable time period.

The script was initially included in
https://github.com/rust-vmm/community/pull/188

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2025-11-18 08:15:37 +01:00
Patrick Roy
b4bb7687a1 chore: bump container version
pick up the toolchain update

Signed-off-by: Patrick Roy <patrick.roy@linux.dev>
2025-11-03 12:03:36 +00:00
Stefano Garzarella
9d9f75abe1 dependabot: fix typo in configuration files
s/ecosyste manyway/ecosystem anyway

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2025-11-03 12:44:07 +01:00
Dorinda Bassey
042b2063b2 chore: Update container version to gcb2de9d
Update container version to gcb2de9d which has
virglrenderer updated version.

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
2025-10-22 17:34:29 +02:00
Patrick Roy
1b48931447 setup: add auto configuration for publishing workflows
Make repository_setup.sh automatically discover whether we have a multi
crate cargo workspace, or just a single crate repository, and then
generate a publish github action for each of them that triggers when a
tag named '$crate_name-v*' (or just 'v*' for single-crate repos) is
published.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-16 10:17:22 +01:00
Patrick Roy
c044333a35 add sample github action for crates.io publishing
Add a github action sample workflow file for auto-publishing crates on
creation of 'v*' tags. The sample workflow assumes a non-workspace
setup, so that cargo publish can be run from the repository root (=
crate root).

For multi-crate repositories, repository_setup.sh will generate
derivatives of this file.

There is a useless `cd .` in the `run` step which only exists so that
sed can easily replace it with the path for crates in a workspace when
auto-generating workflows.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-16 10:17:22 +01:00
Patrick Roy
1d65d26c96 doc: update README to instruction to use new script
Replace the manual instructions for setting up dependabot and .platform
file with instructions to run the new script. Move the explanation of
the .platform file to the testing section (where we were incorrectly
claiming that we only support x86_64 and aarch64, so fix that up too).

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-16 10:17:22 +01:00
Patrick Roy
6df971bbc2 Add a script for running through some basic repository setup
Add a repository_setup.sh script that automates a couple of setup steps
for setup of new rust-vmm repositories. It also supports updating the
configuration of already created repositories by comparing the
repository's configuration to the defaults in rust-vmm-ci and giving the
option to update.

Currently, the script supports dependabot setup and .platform file
generation. It does not deal with the coverage files, since I am still
hoping to switch us over to codecov.io in the future, at which point
that will all changes completely anyway.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-16 10:17:22 +01:00
Patrick Roy
30599a5213 fix typo in cargo doc test
The environment variable that we pass to indicate the a docs build is
happening was misspelling "RUST" as "RUTS".

Signed-off-by: Patrick Roy <patrick.roy@linux.dev>
2025-10-16 11:13:22 +02:00
Ruoqing He
c41370cfc8 chore: Update container version to g6300e70
Update container version to g6300e70 which has SBI_V01 enabled during
kernel compilation for according RISC-V test cases.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-10-13 13:45:54 +02:00
Patrick Roy
3e24835346 ci: add --cfg for cargo doc to disable compile_error!()
Some crates, such as vhost, use compile_error!() to indicate that
mutually exclusive feature have been specified. This leads to problems
when running cargo doc --all-features, which will inevitably trigger
these conditions and then lead to documentation not building (for this
reason, the vhost documentation currently fails to build on docs.rs for
example).

Add a custom cfg that gets passed via RUSTFLAGS in the cargo doc CI step
on whose absense these compile_error!() macros can be gated, so that
they dont cause issues when building documentation in CI

A custom cfg is needed because cargo doc does not pass `--cfg doc` down
to dependencies.

See also rust-vmm/vhost#326

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-02 09:41:40 +01:00
Patrick Roy
58dab8b143 do not use cargo-all-features on riscv64
Due to us running riscv tests in an emulated environment, compiling
multiple permutations of crates is simply too slow and causes buildkite
timeouts. Revert to using --all-features here.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-01 07:03:33 -04:00
Patrick Roy
55cac8cfe0 fix: convert unittests-gnu to use cargo-all-features
Fixes: 6f7d3656a8 ("ci: convert build and test steps to use cargo-all-features")
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-01 07:03:33 -04:00
Patrick Roy
1d02fcc49a ci: run clippy using cargo-all-features
Turns out any cargo subcommand can be ran like this, instead of just the
ones documented on the cargo-all-features crates.io page.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-01 07:03:33 -04:00
Patrick Roy
6f7d3656a8 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 <roypat@amazon.co.uk>
2025-10-01 04:47:45 -04:00
Patrick Roy
d82716692f chore: bump container version
pick up container that has cargo-all-features installed.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-01 04:47:45 -04:00
Patrick Roy
9fbd9f5e83 ci(clippy): drop redundant arguments
--libs --benches and co are already implies by --all-targets.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-01 04:47:45 -04:00
Patrick Roy
af7504b4cc 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 <roypat@amazon.co.uk>
2025-10-01 04:47:45 -04:00
Patrick Roy
5be3429313 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 <roypat@amazon.co.uk>
2025-10-01 04:47:45 -04:00
Patrick Roy
0496be0a44 fix(ci): pass --workspace to build test
otherwise, on multi-crate workspaces, this test run does precisely
nothing.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-10-01 04:47:45 -04:00
Alyssa Ross
f0de501cab Run cargo doc in CI
Signed-off-by: Alyssa Ross <hi@alyssa.is>
2025-09-30 13:21:03 +02:00
nicholasdezai
c0f5d4c3f5 chore: Update container version to gf26de2f
Update container version to gf26de2f that includes gstreamer

dependencies.

Signed-off-by: nicholasdezai <nicholasdezai@gmail.com>
2025-09-24 11:37:26 +02:00
Matias Ezequiel Vara Larsen
e8117d1504 chore: Update container version to g7e451ea
Update container version to g7e451ea that includes gstreamer
dependencies.

Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
2025-09-19 14:51:04 +02:00
Patrick Roy
fc4584d8b8 dependabot: drop open-pull-requests-limit
There seems to be a bug in dependabot where sometimes it refuses to open
PRs due to hitting the pull request limit despite no PRs being open. The
rust-vmm/kvm repository ran into this. To avoid this in the future, drop
the open-pull-requests-limit key, which fixed the issue for
rust-vmm/kvm. In practice, due to us only having a single submodule and
due to cargo updates being grouped, we can only get at most one PR per
ecosystem at a time anyway.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-09-01 09:28:06 -04:00
Stefano Garzarella
0b1cb86353 README: use --workdir in the docker examples
Clean up and standardize our examples by always mounting the crate in
/crate and using --workdir to avoid `cd ..` in the container.

While we're here, let's remove a strange mount of ~/.ssh in the last
example.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2025-08-07 12:33:55 +02:00
Stefano Garzarella
a5d88d4f8f README: use latest container tag in the examples
We recently changed the container tags from vNN to gSHA-1, but we didn't
update README.md. Also, we now push `latest`, which is always updated,
so use this tag in the examples and mention to look at CONTAINER_VERSION
in .buildkite/autogenerate_pipeline.py for a specific version.

Reported-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2025-08-07 12:33:55 +02:00
Wenyu Huang
659de9e3a1 Update container version to g260df6e with lsof installed
Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
2025-07-28 07:39:13 +00:00
Wenyu Huang
af54708293 chore: Update container version to gd59baa3
Update container version to gd59baa3 that rust version is 1.87

Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
2025-07-11 12:43:19 +02:00
Matias Ezequiel Vara Larsen
aa2f8a90e4 chore: Update container version to g825a7ab
Update container version to g825a7ab that includes kani.

Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
2025-06-06 08:30:57 +00:00
Ruoqing He
c3ef897738 chore: Update container version to g492a130
We bumped our `RUST_TOOLCHAIN` from 1.83.0 to 1.85.0 in
rust-vmm/rust-vmm-container#129.

Update to g492a130 dev image to apply this change.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-03-24 09:39:47 +00:00
Patrick Roy
3ea2d3fb2e doc: update readme for coverage changes
Mention that `crate_features` is now optional, and also update a very
outdated reference to `cargo kcov`

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-03-19 09:41:19 +00:00
Patrick Roy
e94bff4ff5 coverage: make crate_features key optional
Currently, if a crate wishes to run the coverage test with some cargo
features enabled, it must explicitly list them out in the
`crate_features` key of the coverage json files.

Change this so that if this key is omitted from the json file, then
test_coverage.py passes `--all-features` to cargo.

No functional change, as currently `crate_features` is a mandatory key,
so to opt-in to this new behavior, crates must remove this key from
their coverage json file(s).

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2025-03-19 09:41:19 +00:00
Ruoqing He
8ae03e5c36 chore: Update container version to g82bd1a3
We are missing `rsync` for `seccompiler`. And after bumping to
ubuntu:24.04, some dependencies required by `vhost-devices` could be
installed from ubuntu sources, so @stefano-garzarella reworked the
preparation of `vhost-devices` dependencies in
rust-vmm/rust-vmm-container#128.

Update to g82bd1a3 dev image to apply the changes.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-03-07 09:10:48 +01:00
Ruoqing He
f65383cd31 chore: Update container version to gaf9029e
`libc-bin` is broken in previous images which causes problem in
rust-vmm/vhost-device#820.

We ended up upgrading to ubuntu 24:04 to address this.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-03-06 11:08:08 +00:00
Ruoqing He
2d733b05f0 chore: Update container version to g538dba3
We have switched to git sha1 tagging since v49. For details, see:
rust-vmm/rust-vmm-container#121.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-02-18 16:54:48 +01:00
Egor Lazarchuk
09aef997d8 chore: update container version to v48
Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
2024-12-10 10:34:37 +00:00
Egor Lazarchuk
c04433e8d8 feat: add unit tests with --release flag
Rust does optimizations which can cause havoc
in `--release` mode, so add another set of unit tests
with all optimizations enabled.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
2024-12-09 16:11:39 +01:00
Patrick Roy
1150c47872 fix: report line coverage instead of function coverage
It seems that the raw output of llvm-cov changed at some point, and we
ended upcomparing functoin coverage instead of line coverage. Fix this
by instead using the new json output, which will hopefully prevent such
goofs in the future.

Fixes #170
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2024-10-23 09:07:13 +00:00
Patrick Roy
212241789d fix: have benchmark test clean working directory
Before checking out different commits, clean the working directory to
avoid checkout failures to to temporary files created during benchmark
execution (as is done by linux-loader)

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2024-10-17 15:32:28 +01:00
Patrick Roy
209c04eb5e run unittests in privileged docker container
The code coverage tests already run in a privileged container, so this
does not affect our security posture. Additionally, it will unblock
vsock unit tests in the vhost-user-vsock crate, see also
https://github.com/rust-vmm/vhost-device/pull/706 and
https://github.com/rust-vmm/vhost-device/pull/728

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2024-10-10 06:24:25 +00:00
Ruoqing He
cdb4a2d5cd update container version to v47
Version v47 [1] incorporates:
- chore: Move RUST_TOOLCHAIN into build_container.sh
- chore: Refactor dialing to reduce useless hints
- riscv64: Set MIN_CORES to 4

[1] rust-vmm/rust-vmm-container#118

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-10-07 11:46:22 +01:00
Ruoqing He
92034f0e36 ci: Enable tests with no platform specified
After `.platform` mechanism was introduced in #159, it silently filters
out tests with no `platform` specified. Enable them to execute by adding
`platform is not None` predicate preceeds allowlist check.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-10-07 06:41:13 +00:00