2019-12-11 07:38:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
|
|
|
|
# Install cargo components
|
2019-12-13 12:39:14 +00:00
|
|
|
time rustup component add clippy
|
|
|
|
time rustup component add rustfmt
|
2020-01-30 22:59:11 +00:00
|
|
|
time which cargo-audit || cargo install cargo-audit
|
2019-12-11 07:38:46 +00:00
|
|
|
|
|
|
|
# Run cargo builds and checks
|
2020-01-21 08:32:50 +00:00
|
|
|
time cargo clippy --all-targets --all-features -- -D warnings
|
2019-12-13 12:39:14 +00:00
|
|
|
time cargo rustc --bin cloud-hypervisor -- -D warnings
|
|
|
|
time cargo rustc --bin vhost_user_net -- -D warnings
|
|
|
|
time cargo test
|
|
|
|
time cargo audit
|
2020-01-21 08:32:50 +00:00
|
|
|
time cargo clippy --all-targets --no-default-features --features "pci,acpi" -- -D warnings
|
2019-12-13 12:39:14 +00:00
|
|
|
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
|
2020-01-21 08:32:50 +00:00
|
|
|
time cargo clippy --all-targets --no-default-features --features "pci" -- -D warnings
|
2019-12-13 12:39:14 +00:00
|
|
|
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
|
2020-01-21 08:32:50 +00:00
|
|
|
time cargo clippy --all-targets --no-default-features --features "mmio" -- -D warnings
|
2019-12-13 12:39:14 +00:00
|
|
|
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
|
2020-02-04 14:52:25 +00:00
|
|
|
time cargo fmt -- --check
|
2019-12-13 12:39:14 +00:00
|
|
|
time cargo build --release
|