2018-11-11 08:19:04 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2018-08-13 15:57:23 -07:00
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
2018-10-12 15:13:10 -07:00
|
|
|
# shellcheck disable=SC1091
|
|
|
|
source ci/upload_ci_artifact.sh
|
|
|
|
|
|
|
|
eval "$(ci/channel-info.sh)"
|
|
|
|
|
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 nightly
|
2018-08-13 15:57:23 -07:00
|
|
|
|
|
|
|
_() {
|
|
|
|
echo "--- $*"
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
2018-09-24 10:20:58 -07:00
|
|
|
set -o pipefail
|
2018-11-21 12:16:16 -08:00
|
|
|
export RUST_BACKTRACE=1
|
2018-09-24 10:20:58 -07:00
|
|
|
|
2018-10-12 15:13:10 -07:00
|
|
|
UPLOAD_METRICS=""
|
|
|
|
TARGET_BRANCH=$BUILDKITE_BRANCH
|
|
|
|
if [[ -z $BUILDKITE_BRANCH ]] || ./ci/is-pr.sh; then
|
|
|
|
TARGET_BRANCH=$EDGE_CHANNEL
|
|
|
|
else
|
|
|
|
UPLOAD_METRICS="upload"
|
|
|
|
fi
|
|
|
|
|
2018-09-19 13:16:55 -07:00
|
|
|
BENCH_FILE=bench_output.log
|
2018-10-12 15:13:10 -07:00
|
|
|
BENCH_ARTIFACT=current_bench_results.log
|
|
|
|
_ cargo bench --features=unstable --verbose -- -Z unstable-options --format=json | tee "$BENCH_FILE"
|
2018-11-21 12:16:16 -08:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
)
|
|
|
|
|
2018-12-12 14:28:36 -08:00
|
|
|
_ cargo run --release --package solana-upload-perf -- "$BENCH_FILE" "$TARGET_BRANCH" "$UPLOAD_METRICS" > "$BENCH_ARTIFACT"
|
2018-10-12 15:13:10 -07:00
|
|
|
|
|
|
|
upload_ci_artifact "$BENCH_ARTIFACT"
|