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
|
|
|
|
time cargo install --force 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
|
|
|
|
time sh -c 'find . \( -name "*.rs" ! -wholename "*/out/*.rs" \) | xargs rustfmt --check'
|
|
|
|
time cargo build --release
|