Skip to content

Commit

Permalink
ci: move solana-cargo-build-sbf to nextest (solana-labs#33257)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau authored Sep 15, 2023
1 parent 0df6749 commit d4946dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/build-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ partitions=$(
"command": ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/stable/run-partition.sh",
"timeout_in_minutes": 30,
"agent": "$agent",
"parallelism": 3,
"parallelism": 2,
"retry": 3
}
EOF
Expand Down
45 changes: 10 additions & 35 deletions ci/stable/run-partition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,20 @@ INDEX=${1:-"$BUILDKITE_PARALLEL_JOB"} # BUILDKITE_PARALLEL_JOB from 0 to (BUILDK
LIMIT=${2:-"$BUILDKITE_PARALLEL_JOB_COUNT"}
: "${LIMIT:?}"

if [ "$LIMIT" -lt 2 ]; then
echo "LIMIT(\$2) should >= 2"
exit 1
fi

if [ ! "$LIMIT" -gt "$INDEX" ]; then
echo "LIMIT(\$2) should greater than INDEX(\$1)"
exit 1
fi

DONT_USE_NEXTEST_PACKAGES=(
solana-cargo-build-sbf
ARGS=(
--profile ci
--config-file ./nextest.toml
--workspace
--tests
--jobs "$JOBS"
--partition hash:"$((INDEX + 1))/$LIMIT"
--verbose
--exclude solana-local-cluster
)

if [ "$INDEX" -eq "$((LIMIT - 1))" ]; then
ARGS=(
--jobs "$JOBS"
--tests
--verbose
)
for package in "${DONT_USE_NEXTEST_PACKAGES[@]}"; do
ARGS+=(-p "$package")
done

_ cargo test "${ARGS[@]}"
else
ARGS=(
--profile ci
--config-file ./nextest.toml
--workspace
--tests
--jobs "$JOBS"
--partition hash:"$((INDEX + 1))/$((LIMIT - 1))"
--verbose
--exclude solana-local-cluster
)
for package in "${DONT_USE_NEXTEST_PACKAGES[@]}"; do
ARGS+=(--exclude "$package")
done

_ cargo nextest run "${ARGS[@]}"
fi
_ cargo nextest run "${ARGS[@]}"
4 changes: 4 additions & 0 deletions nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ threads-required = "num-cpus"
[[profile.ci.overrides]]
filter = "package(solana-gossip) & test(/^cluster_info::tests::new_with_external_ip_test_random/)"
threads-required = "num-cpus"

[[profile.ci.overrides]]
filter = "package(solana-cargo-build-sbf)"
threads-required = "num-cpus"

0 comments on commit d4946dd

Please sign in to comment.