mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
ci: Offload cargo tests to the worker node VM
Because the resources on the amount of worker nodes we can have access to through Travis is limited, we offload the burden of running all tests related to Cargo inside the Azure VM directly. This will have the positive effect of stopping the build very early in case something goes wrong during the Cargo testing. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
ee528ae808
commit
d42ef186a1
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -20,6 +20,11 @@ pipeline{
|
||||
sh "nohup curl https://sh.rustup.rs -sSf | sh -s -- -y"
|
||||
}
|
||||
}
|
||||
stage ('Run Cargo tests') {
|
||||
steps {
|
||||
sh "scripts/run_cargo_tests.sh"
|
||||
}
|
||||
}
|
||||
stage ('Run unit tests') {
|
||||
steps {
|
||||
sh "scripts/run_unit_tests.sh"
|
||||
|
25
scripts/run_cargo_tests.sh
Executable file
25
scripts/run_cargo_tests.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
source $HOME/.cargo/env
|
||||
|
||||
# Install cargo components
|
||||
rustup component add clippy
|
||||
rustup component add rustfmt
|
||||
cargo install --force cargo-audit
|
||||
|
||||
# Run cargo builds and checks
|
||||
cargo rustc --bin cloud-hypervisor -- -D warnings
|
||||
cargo rustc --bin vhost_user_net -- -D warnings
|
||||
cargo test
|
||||
cargo audit
|
||||
cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,acpi" -- -D warnings
|
||||
cargo rustc --bin vhost_user_net --no-default-features --features "pci,acpi" -- -D warnings
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
cargo rustc --bin cloud-hypervisor --no-default-features --features "pci" -- -D warnings
|
||||
cargo rustc --bin vhost_user_net --no-default-features --features "pci" -- -D warnings
|
||||
cargo rustc --bin cloud-hypervisor --no-default-features --features "mmio" -- -D warnings
|
||||
cargo rustc --bin vhost_user_net --no-default-features --features "mmio" -- -D warnings
|
||||
find . -name "*.rs" | xargs rustfmt --check
|
||||
cargo build --release
|
Loading…
x
Reference in New Issue
Block a user