Jelajahi Sumber

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

Yihau Chen 2 tahun lalu
induk
melakukan
d4946ddfaa
3 mengubah file dengan 15 tambahan dan 36 penghapusan
  1. 1 1
      .buildkite/scripts/build-stable.sh
  2. 10 35
      ci/stable/run-partition.sh
  3. 4 0
      nextest.toml

+ 1 - 1
.buildkite/scripts/build-stable.sh

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

+ 10 - 35
ci/stable/run-partition.sh

@@ -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 - 0
nextest.toml

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