mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-26 01:41:15 +00:00
The build is run against "--all-features", "pci,acpi", "pci" and "mmio" separately. The clippy validation must be run against the same set of features in order to validate the code is correct. Because of these new checks, this commit includes multiple fixes related to the errors generated when manually running the checks. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
29 lines
1.3 KiB
Bash
Executable File
29 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
# Install cargo components
|
|
time rustup component add clippy
|
|
time rustup component add rustfmt
|
|
time cargo install --force cargo-audit
|
|
|
|
# Run cargo builds and checks
|
|
time cargo clippy --all-targets --all-features -- -D warnings
|
|
time cargo rustc --bin cloud-hypervisor -- -D warnings
|
|
time cargo rustc --bin vhost_user_net -- -D warnings
|
|
time cargo test
|
|
time cargo audit
|
|
time cargo clippy --all-targets --no-default-features --features "pci,acpi" -- -D warnings
|
|
time cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,acpi" -- -D warnings
|
|
time cargo rustc --bin vhost_user_net --no-default-features --features "pci,acpi" -- -D warnings
|
|
time cargo clippy --all-targets --no-default-features --features "pci" -- -D warnings
|
|
time cargo rustc --bin cloud-hypervisor --no-default-features --features "pci" -- -D warnings
|
|
time cargo rustc --bin vhost_user_net --no-default-features --features "pci" -- -D warnings
|
|
time cargo clippy --all-targets --no-default-features --features "mmio" -- -D warnings
|
|
time cargo rustc --bin cloud-hypervisor --no-default-features --features "mmio" -- -D warnings
|
|
time cargo rustc --bin vhost_user_net --no-default-features --features "mmio" -- -D warnings
|
|
time sh -c 'find . \( -name "*.rs" ! -wholename "*/out/*.rs" \) | xargs rustfmt --check'
|
|
time cargo build --release
|