2018-11-11 08:19:04 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2018-05-21 23:02:54 -07:00
|
|
|
|
2018-05-27 18:19:07 -07:00
|
|
|
cd "$(dirname "$0")/.."
|
2018-05-21 23:02:54 -07:00
|
|
|
|
2018-11-09 18:52:34 -08:00
|
|
|
# Clear cached json keypair files
|
|
|
|
rm -rf "$HOME/.config/solana"
|
|
|
|
|
2018-11-26 17:54:40 -08:00
|
|
|
# This job doesn't run within a container, try once to upgrade tooling on a
|
|
|
|
# version check failure
|
|
|
|
ci/version-check-with-upgrade.sh stable
|
2018-11-21 12:16:16 -08:00
|
|
|
|
2018-08-06 08:57:12 -07:00
|
|
|
export RUST_BACKTRACE=1
|
2018-09-20 18:51:11 -07:00
|
|
|
export RUSTFLAGS="-D warnings"
|
2018-05-21 23:02:54 -07:00
|
|
|
|
2018-08-01 11:44:10 -07:00
|
|
|
_() {
|
|
|
|
echo "--- $*"
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
2018-11-21 12:16:16 -08:00
|
|
|
./fetch-perf-libs.sh
|
|
|
|
# shellcheck source=/dev/null
|
|
|
|
source ./target/perf-libs/env.sh
|
|
|
|
|
|
|
|
FEATURES=bpf_c,cuda,erasure,chacha
|
2018-11-16 08:04:46 -08:00
|
|
|
_ cargo build --all --verbose --features="$FEATURES"
|
2018-12-14 15:28:45 -08:00
|
|
|
_ cargo test --all --verbose --features="$FEATURES" --lib -- --nocapture --test-threads=1
|
2018-10-17 02:20:58 -07:00
|
|
|
|
|
|
|
# Run integration tests serially
|
2018-10-17 10:52:55 -07:00
|
|
|
for test in tests/*.rs; do
|
|
|
|
test=${test##*/} # basename x
|
|
|
|
test=${test%.rs} # basename x .rs
|
2018-11-21 12:16:16 -08:00
|
|
|
_ cargo test --verbose --features="$FEATURES" --test="$test" -- --test-threads=1
|
2018-10-17 10:52:55 -07:00
|
|
|
done
|
2018-08-01 11:44:10 -07:00
|
|
|
|
2018-11-21 12:16:16 -08:00
|
|
|
# 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"
|
|
|
|
)
|
|
|
|
|
2018-08-01 11:44:10 -07:00
|
|
|
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
|
2018-11-26 17:54:40 -08:00
|
|
|
)
|