diff --git a/ci/buildkite-pipeline.sh b/ci/buildkite-pipeline.sh index c92426f28..671d3f0c1 100755 --- a/ci/buildkite-pipeline.sh +++ b/ci/buildkite-pipeline.sh @@ -148,6 +148,33 @@ all_test_steps() { command_step stable ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-stable.sh" 60 wait_step + # BPF test suite + if affects \ + .rs$ \ + Cargo.lock$ \ + Cargo.toml$ \ + ^ci/rust-version.sh \ + ^ci/test-stable-bpf.sh \ + ^ci/test-stable.sh \ + ^ci/test-local-cluster.sh \ + ^core/build.rs \ + ^fetch-perf-libs.sh \ + ^programs/ \ + ^sdk/ \ + ; then + cat >> "$output_file" <<"EOF" + - command: "ci/test-stable-bpf.sh" + name: "stable-bpf" + timeout_in_minutes: 20 + artifact_paths: "bpf-dumps.tar.bz2" + agents: + - "queue=default" +EOF + else + annotate --style info \ + "Stable-BPF skipped as no relevant files were modified" + fi + # Perf test suite if affects \ .rs$ \ @@ -165,7 +192,7 @@ all_test_steps() { cat >> "$output_file" <<"EOF" - command: "ci/test-stable-perf.sh" name: "stable-perf" - timeout_in_minutes: 40 + timeout_in_minutes: 20 artifact_paths: "log-*.txt" agents: - "queue=cuda" diff --git a/ci/run-local.sh b/ci/run-local.sh index 536318145..092f35f56 100755 --- a/ci/run-local.sh +++ b/ci/run-local.sh @@ -22,6 +22,7 @@ steps+=(shellcheck) steps+=(test-checks) steps+=(test-coverage) steps+=(test-stable) +steps+=(test-stable-bpf) steps+=(test-stable-perf) steps+=(test-downstream-builds) steps+=(test-bench) diff --git a/ci/test-stable-bpf.sh b/ci/test-stable-bpf.sh new file mode 120000 index 000000000..0c92a5c7b --- /dev/null +++ b/ci/test-stable-bpf.sh @@ -0,0 +1 @@ +test-stable.sh \ No newline at end of file diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 60264b5a9..2bea5a9ba 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -21,10 +21,6 @@ export RUST_BACKTRACE=1 export RUSTFLAGS="-D warnings" source scripts/ulimit-n.sh -# Clear the C dependency files, if dependency moves these files are not regenerated -test -d target/debug/bpf && find target/debug/bpf -name '*.d' -delete -test -d target/release/bpf && find target/release/bpf -name '*.d' -delete - # Limit compiler jobs to reduce memory usage # on machines with 2gb/thread of memory NPROC=$(nproc) @@ -35,7 +31,11 @@ case $testName in test-stable) _ "$cargo" stable test --jobs "$NPROC" --all --exclude solana-local-cluster ${V:+--verbose} -- --nocapture ;; -test-stable-perf) +test-stable-bpf) + # Clear the C dependency files, if dependency moves these files are not regenerated + test -d target/debug/bpf && find target/debug/bpf -name '*.d' -delete + test -d target/release/bpf && find target/release/bpf -name '*.d' -delete + # solana-keygen required when building C programs _ "$cargo" build --manifest-path=keygen/Cargo.toml export PATH="$PWD/target/debug":$PATH @@ -52,7 +52,8 @@ test-stable-perf) _ "$cargo" stable test \ --manifest-path programs/bpf/Cargo.toml \ --no-default-features --features=bpf_c,bpf_rust -- --nocapture - + ;; +test-stable-perf) if [[ $(uname) = Linux ]]; then # Enable persistence mode to keep the CUDA kernel driver loaded, avoiding a # lengthy and unexpected delay the first time CUDA is involved when the driver