Optimize some CI stuff (#1880)

* CI Optimizations
This commit is contained in:
jackcmay
2018-11-21 12:16:16 -08:00
committed by GitHub
parent 574021041d
commit 59163e2dd9
8 changed files with 80 additions and 45 deletions

View File

@@ -10,21 +10,23 @@ if ! ci/version-check.sh stable; then
# This job doesn't run within a container, try once to upgrade tooling on a
# version check failure
rustup install stable
rustup default stable
ci/version-check.sh stable
fi
export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"
./fetch-perf-libs.sh
# shellcheck source=/dev/null
source ./target/perf-libs/env.sh
_() {
echo "--- $*"
"$@"
}
FEATURES=cuda,erasure,chacha
./fetch-perf-libs.sh
# shellcheck source=/dev/null
source ./target/perf-libs/env.sh
FEATURES=bpf_c,cuda,erasure,chacha
_ cargo build --all --verbose --features="$FEATURES"
_ cargo test --verbose --features="$FEATURES" --lib
@@ -32,13 +34,21 @@ _ cargo test --verbose --features="$FEATURES" --lib
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --jobs=1 --features="$FEATURES" --test="$test"
_ cargo test --verbose --features="$FEATURES" --test="$test" -- --test-threads=1
done
# Run bpf_loader test with bpf_c features enabled
(
set -x
cd "programs/native/bpf_loader"
echo --- program/native/bpf_loader test --features=bpf_c
cargo test --verbose --features="bpf_c"
)
echo --- ci/localnet-sanity.sh
(
set -x
# Assume |cargo build| has populated target/debug/ successfully.
export PATH=$PWD/target/debug:$PATH
USE_INSTALL=1 ci/localnet-sanity.sh
)
)