about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-04-22 02:23:44 +0000
committerTrevor Gross <t.gross35@gmail.com>2025-04-21 22:50:42 -0400
commit13b94cf89f3e974fe697f80a5f2742ee4bccc05a (patch)
tree70d9a78cf8a4ecbe23792b7650e0b78d304fbf09
parent913796c1c5f7e0afa6c4323e8bd850efd7a646d9 (diff)
downloadrust-13b94cf89f3e974fe697f80a5f2742ee4bccc05a.tar.gz
rust-13b94cf89f3e974fe697f80a5f2742ee4bccc05a.zip
ci: Fix extensive tests
Move this to a script and ensure only `libm-test` gets built to avoid
default feature issues with `compiler-builtins`.
-rw-r--r--library/compiler-builtins/.github/workflows/main.yaml17
-rwxr-xr-xlibrary/compiler-builtins/ci/run-extensive.sh24
2 files changed, 25 insertions, 16 deletions
diff --git a/library/compiler-builtins/.github/workflows/main.yaml b/library/compiler-builtins/.github/workflows/main.yaml
index f7522a53d9d..d13dd6b0f64 100644
--- a/library/compiler-builtins/.github/workflows/main.yaml
+++ b/library/compiler-builtins/.github/workflows/main.yaml
@@ -318,22 +318,7 @@ jobs:
           rustup default nightly
       - uses: Swatinem/rust-cache@v2
       - name: Run extensive tests
-        run: |
-          echo "Tests to run: '$TO_TEST'"
-          if [ -z "$TO_TEST" ]; then
-            echo "No tests to run, exiting."
-            exit
-          fi
-
-          set -x
-
-          # Run the non-extensive tests first to catch any easy failures
-          cargo t --profile release-checked -- "$TO_TEST"
-
-          LIBM_EXTENSIVE_TESTS="$TO_TEST" cargo test \
-            --features build-mpfr,unstable,force-soft-floats \
-            --profile release-checked \
-            -- extensive
+        run: ./ci/run-extensive.sh
       - name: Print test logs if available
         run: if [ -f "target/test-log.txt" ]; then cat target/test-log.txt; fi
         shell: bash
diff --git a/library/compiler-builtins/ci/run-extensive.sh b/library/compiler-builtins/ci/run-extensive.sh
new file mode 100755
index 00000000000..4ba41a026fa
--- /dev/null
+++ b/library/compiler-builtins/ci/run-extensive.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -euo pipefail
+
+echo "Tests to run: '$TO_TEST'"
+
+if [ -z "$TO_TEST" ]; then
+    echo "No tests to run, exiting."
+    exit
+fi
+
+set -x
+
+test_cmd=(
+    cargo test
+    --package libm-test
+    --features "build-mpfr,libm/unstable,libm/force-soft-floats"
+    --profile release-checked
+)
+
+# Run the non-extensive tests first to catch any easy failures
+"${test_cmd[@]}" -- "$TO_TEST"
+
+LIBM_EXTENSIVE_TESTS="$TO_TEST" "${test_cmd[@]}" -- extensive