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

@@ -9,7 +9,13 @@ source ci/upload_ci_artifact.sh
eval "$(ci/channel-info.sh)"
ci/version-check.sh nightly
export RUST_BACKTRACE=1
if ! ci/version-check.sh nightly; then
# This job doesn't run within a container, try once to upgrade tooling on a
# version check failure
rustup install nightly
rustup default nightly
ci/version-check.sh nightly
fi
_() {
echo "--- $*"
@@ -17,6 +23,7 @@ _() {
}
set -o pipefail
export RUST_BACKTRACE=1
UPLOAD_METRICS=""
TARGET_BRANCH=$BUILDKITE_BRANCH
@@ -29,6 +36,15 @@ fi
BENCH_FILE=bench_output.log
BENCH_ARTIFACT=current_bench_results.log
_ cargo bench --features=unstable --verbose -- -Z unstable-options --format=json | tee "$BENCH_FILE"
_ cargo run --release --bin solana-upload-perf -- "$BENCH_FILE" "$TARGET_BRANCH" "$UPLOAD_METRICS" >"$BENCH_ARTIFACT"
# Run bpf_loader bench with bpf_c feature enabled
(
set -x
cd "programs/native/bpf_loader"
echo --- program/native/bpf_loader bench --features=bpf_c
cargo bench --verbose --features="bpf_c" -- -Z unstable-options --format=json --nocapture | tee -a ../../../"$BENCH_FILE"
)
_ cargo run --release --bin solana-upload-perf -- "$BENCH_FILE" "$TARGET_BRANCH" "$UPLOAD_METRICS" > "$BENCH_ARTIFACT"
upload_ci_artifact "$BENCH_ARTIFACT"