From 994ffe186423338b034ccfa2200836dd21eb1931 Mon Sep 17 00:00:00 2001 From: Stefano Garzarella Date: Tue, 17 Oct 2023 10:08:13 +0200 Subject: [PATCH] staging: add custom pipelines to run CI tests Let's use custom pipelines to run CI tests in the nested worskpace. We have included all the tests we usually run in the main workspace (rust-vmm-ci/.buildkite/test_description.json), except for "commit-format" which also covers commits for staging crates. Let's add a `staging\coverage_config_x86_64.json` for testing coverage of crates in staging. All staging tests have `soft_fail = true` to prevent failures in staging from affecting the CI of the main workspace. Closes #478 Signed-off-by: Stefano Garzarella --- .buildkite/custom-tests.json | 81 +++++++++++++++++++++++++++++ staging/coverage_config_x86_64.json | 5 ++ 2 files changed, 86 insertions(+) create mode 100644 .buildkite/custom-tests.json create mode 100644 staging/coverage_config_x86_64.json diff --git a/.buildkite/custom-tests.json b/.buildkite/custom-tests.json new file mode 100644 index 0000000..5391ea0 --- /dev/null +++ b/.buildkite/custom-tests.json @@ -0,0 +1,81 @@ +{ + "tests": [ + { + "test_name": "staging: build-gnu", + "command": "cd staging && RUSTFLAGS=\"-D warnings\" cargo build --release", + "soft_fail": "true", + "platform": [ + "x86_64", + "aarch64" + ] + }, + { + "test_name": "staging: build-musl", + "command": "cd staging && RUSTFLAGS=\"-D warnings\" cargo build --release --target {target_platform}-unknown-linux-musl", + "soft_fail": "true", + "platform": [ + "x86_64", + "aarch64" + ] + }, + { + "test_name": "staging: style", + "command": "cd staging && cargo fmt --all -- --check --config format_code_in_doc_comments=true" + }, + { + "test_name": "staging: unittests-gnu", + "command": "cd staging && cargo test --all-features --workspace", + "soft_fail": "true", + "platform": [ + "x86_64", + "aarch64" + ] + }, + { + "test_name": "staging: unittests-musl", + "command": "cd staging && cargo test --all-features --workspace --target {target_platform}-unknown-linux-musl", + "soft_fail": "true", + "platform": [ + "x86_64", + "aarch64" + ] + }, + { + "test_name": "staging: clippy", + "command": "cd staging && cargo clippy --workspace --bins --examples --benches --all-features --all-targets -- -D warnings -D clippy::undocumented_unsafe_blocks", + "soft_fail": "true", + "platform": [ + "x86_64", + "aarch64" + ] + }, + { + "test_name": "staging: check-warnings", + "command": "cd staging && RUSTFLAGS=\"-D warnings\" cargo check --all-targets --all-features --workspace", + "soft_fail": "true", + "platform": [ + "x86_64", + "aarch64" + ] + }, + { + "test_name": "staging: coverage", + "command": "cd staging && pytest $(find .. -type f -name \"test_coverage.py\")", + "soft_fail": "true", + "docker_plugin": { + "privileged": true + }, + "platform": [ + "x86_64" + ] + }, + { + "test_name": "staging: cargo-audit", + "command": "cd staging && cargo audit -q --deny warnings", + "soft_fail": "true", + "platform": [ + "x86_64" + ] + } + ] +} diff --git a/staging/coverage_config_x86_64.json b/staging/coverage_config_x86_64.json new file mode 100644 index 0000000..a70b354 --- /dev/null +++ b/staging/coverage_config_x86_64.json @@ -0,0 +1,5 @@ +{ + "coverage_score": 7.94, + "exclude_path": "", + "crate_features": "" +}