@@ -1,13 +1,25 @@
|
||||
steps:
|
||||
- command: "ci/test-stable-perf.sh"
|
||||
name: "stable-perf [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "stable-perf"
|
||||
timeout_in_minutes: 20
|
||||
agents:
|
||||
- "queue=cuda"
|
||||
- command: "ci/test-bench.sh"
|
||||
name: "bench [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "nightly"
|
||||
timeout_in_minutes: 30
|
||||
- command: "ci/docker-run.sh solanalabs/rust:1.30.1 ci/test-stable.sh"
|
||||
name: "stable [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "stable"
|
||||
timeout_in_minutes: 30
|
||||
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-11-12 ci/test-bench.sh"
|
||||
name: "bench [public]"
|
||||
- command: "ci/docker-run.sh solanalabs/rust:1.30.1 ci/test-checks.sh"
|
||||
name: "checks [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "nightly"
|
||||
CARGO_TARGET_CACHE_NAME: "checks"
|
||||
timeout_in_minutes: 30
|
||||
- command: "ci/shellcheck.sh"
|
||||
name: "shellcheck [public]"
|
||||
@@ -17,13 +29,6 @@ steps:
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "nightly"
|
||||
timeout_in_minutes: 30
|
||||
- command: "ci/test-stable-perf.sh"
|
||||
name: "stable-perf [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "stable-perf"
|
||||
timeout_in_minutes: 20
|
||||
agents:
|
||||
- "queue=cuda"
|
||||
# TODO: Fix and re-enable test-large-network.sh
|
||||
# - command: "ci/test-large-network.sh || true"
|
||||
# name: "large-network [public] [ignored]"
|
||||
|
@@ -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"
|
||||
|
19
ci/test-checks.sh
Executable file
19
ci/test-checks.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
ci/version-check.sh stable
|
||||
export RUST_BACKTRACE=1
|
||||
export RUSTFLAGS="-D warnings"
|
||||
|
||||
_() {
|
||||
echo "--- $*"
|
||||
"$@"
|
||||
}
|
||||
|
||||
_ cargo fmt -- --check
|
||||
_ cargo clippy -- --version
|
||||
_ cargo clippy -- --deny=warnings
|
||||
|
||||
_ ci/audit.sh
|
@@ -27,14 +27,6 @@ maybe_cargo_install() {
|
||||
done
|
||||
}
|
||||
|
||||
# Run program/native/bpf_loader's bench with bpf_c feature
|
||||
(
|
||||
set -x
|
||||
cd "programs/native/bpf_loader"
|
||||
echo --- program/native/bpf_loader bench --features=bpf_c
|
||||
cargo bench --verbose --features="bpf_c" -- --nocapture
|
||||
)
|
||||
|
||||
maybe_cargo_install cov
|
||||
|
||||
# Generate coverage data and report via unit-test suite.
|
||||
|
@@ -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
|
||||
)
|
||||
)
|
@@ -24,9 +24,6 @@ maybe_install() {
|
||||
done
|
||||
}
|
||||
|
||||
_ cargo fmt -- --check
|
||||
_ cargo clippy -- --version
|
||||
_ cargo clippy -- --deny=warnings
|
||||
_ cargo build --all --verbose
|
||||
_ cargo test --verbose --lib
|
||||
|
||||
@@ -34,10 +31,10 @@ _ cargo test --verbose --lib
|
||||
for test in tests/*.rs; do
|
||||
test=${test##*/} # basename x
|
||||
test=${test%.rs} # basename x .rs
|
||||
_ cargo test --verbose --jobs=1 --test="$test" --features="bpf_c"
|
||||
_ cargo test --verbose --test="$test" -- --test-threads=1
|
||||
done
|
||||
|
||||
# Run native program's tests
|
||||
# Run native program tests
|
||||
for program in programs/native/*; do
|
||||
echo --- "$program"
|
||||
(
|
||||
@@ -47,14 +44,6 @@ for program in programs/native/*; do
|
||||
)
|
||||
done
|
||||
|
||||
# Run program/native/bpf_loader's test with bpf_c feature
|
||||
(
|
||||
set -x
|
||||
cd "programs/native/bpf_loader"
|
||||
echo --- program/native/bpf_loader test --features=bpf_c
|
||||
cargo test --verbose --features="bpf_c"
|
||||
)
|
||||
|
||||
# Build the HTML
|
||||
export PATH=$CARGO_HOME/bin:$PATH
|
||||
maybe_install mdbook
|
||||
@@ -68,5 +57,3 @@ echo --- ci/localnet-sanity.sh
|
||||
export PATH=$PWD/target/debug:$PATH
|
||||
USE_INSTALL=1 ci/localnet-sanity.sh
|
||||
)
|
||||
|
||||
_ ci/audit.sh
|
||||
|
Reference in New Issue
Block a user