mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-28 00:25:18 +00:00
76087f1235
We don't need to force the cargo-audit install, we can check if it's already available instead and install if it's not. Also, since we now have workspaces properly setup, we can call directly into cargo fmt and avoid calling into find magic incantation. Signed-off-by: Samuel Ortiz <sameo@linux.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 which cargo-audit || cargo install 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 cargo fmt
|
|
time cargo build --release
|