ci: move solana-cargo-build-sbf to nextest (#33257)

This commit is contained in:
Yihau Chen 2023-09-15 22:24:43 +08:00 committed by GitHub
parent 0df6749550
commit d4946ddfaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 36 deletions

View File

@ -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

View File

@ -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[@]}"

View File

@ -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"