Skip to content

Commit 767597f

Browse files
committed
ci: Fix extensive tests
Move this to a script and ensure only `libm-test` gets built to avoid default feature issues with `compiler-builtins`.
1 parent b5f8003 commit 767597f

File tree

2 files changed

+25
-16
lines changed

2 files changed

+25
-16
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -318,22 +318,7 @@ jobs:
318318
rustup default nightly
319319
- uses: Swatinem/rust-cache@v2
320320
- name: Run extensive tests
321-
run: |
322-
echo "Tests to run: '$TO_TEST'"
323-
if [ -z "$TO_TEST" ]; then
324-
echo "No tests to run, exiting."
325-
exit
326-
fi
327-
328-
set -x
329-
330-
# Run the non-extensive tests first to catch any easy failures
331-
cargo t --profile release-checked -- "$TO_TEST"
332-
333-
LIBM_EXTENSIVE_TESTS="$TO_TEST" cargo test \
334-
--features build-mpfr,unstable,force-soft-floats \
335-
--profile release-checked \
336-
-- extensive
321+
run: ./ci/run-extensive.sh
337322
- name: Print test logs if available
338323
run: if [ -f "target/test-log.txt" ]; then cat target/test-log.txt; fi
339324
shell: bash

ci/run-extensive.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
echo "Tests to run: '$TO_TEST'"
6+
7+
if [ -z "$TO_TEST" ]; then
8+
echo "No tests to run, exiting."
9+
exit
10+
fi
11+
12+
set -x
13+
14+
test_cmd=(
15+
cargo test
16+
--package libm-test
17+
--features "build-mpfr,libm/unstable,libm/force-soft-floats"
18+
--profile release-checked
19+
)
20+
21+
# Run the non-extensive tests first to catch any easy failures
22+
"${test_cmd[@]}" -- "$TO_TEST"
23+
24+
LIBM_EXTENSIVE_TESTS="$TO_TEST" "${test_cmd[@]}" -- extensive

0 commit comments

Comments
 (0)