Skip to content

Commit 07bedad

Browse files
authored
Moves scripts and CI/CD to nextest (#1514)
1 parent 62a0ebb commit 07bedad

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

.config/nextest.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[profile.ci]
2+
fail-fast = false
3+
4+
[profile.ci.junit]
5+
path = "junit.xml"

.github/workflows/ci.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
toolchain: ${{ matrix.rust }}
102102
- uses: rui314/setup-mold@v1
103103
- uses: Swatinem/rust-cache@v2
104+
- uses: taiki-e/install-action@nextest
104105
- name: Install openblas
105106
run: sudo apt-get install libopenblas-dev gfortran
106107
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
@@ -116,10 +117,9 @@ jobs:
116117
toolchain: ${{ needs.pass-msrv.outputs.BLAS_MSRV }}
117118
- uses: rui314/setup-mold@v1
118119
- uses: Swatinem/rust-cache@v2
120+
- uses: taiki-e/install-action@nextest
119121
- name: Install openblas
120122
run: sudo apt-get install libopenblas-dev gfortran
121-
- run: cargo tree -p blas-tests -i openblas-src -F blas-tests/openblas-system
122-
- run: cargo tree -p blas-tests -i openblas-build -F blas-tests/openblas-system
123123
- run: ./scripts/blas-integ-tests.sh $BLAS_MSRV
124124

125125
miri:
@@ -131,6 +131,7 @@ jobs:
131131
with:
132132
components: miri
133133
- uses: Swatinem/rust-cache@v2
134+
- uses: taiki-e/install-action@nextest
134135
- run: ./scripts/miri-tests.sh
135136

136137
cross_test:
@@ -167,9 +168,10 @@ jobs:
167168
with:
168169
toolchain: nightly
169170
- uses: Swatinem/rust-cache@v2
171+
- uses: taiki-e/install-action@nextest
170172
- name: Install cargo-careful
171173
run: cargo install cargo-careful
172-
- run: cargo careful test -Zcareful-sanitizer --features="$FEATURES"
174+
- run: cargo careful nextest run -Zcareful-sanitizer --features="$FEATURES"
173175

174176
docs:
175177
#if: ${{ github.event_name == 'merge_group' }}

scripts/all-tests.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ QC_FEAT=--features=ndarray-rand/quickcheck
1212
cargo build -v --no-default-features
1313

1414
# ndarray with no features
15-
cargo test -p ndarray -v --no-default-features
15+
cargo nextest run -p ndarray -v --no-default-features
1616
# ndarray with no_std-compatible features
17-
cargo test -p ndarray -v --no-default-features --features approx
17+
cargo nextest run -p ndarray -v --no-default-features --features approx
1818
# all with features
19-
cargo test -v --features "$FEATURES" $QC_FEAT
19+
cargo nextest run -v --features "$FEATURES" $QC_FEAT
2020
# all with features and release (ignore test crates which is already optimized)
21-
cargo test -v -p ndarray -p ndarray-rand --release --features "$FEATURES" $QC_FEAT --lib --tests
21+
cargo nextest run -v -p ndarray -p ndarray-rand --release --features "$FEATURES" $QC_FEAT --lib --tests
2222

2323
# BLAS tests
24-
cargo test -p ndarray --lib -v --features blas
25-
cargo test -p blas-mock-tests -v
24+
cargo nextest run -p ndarray --lib -v --features blas
25+
cargo nextest run -p blas-mock-tests -v
2626
if [[ -z "${MSRV}" ]] && [ "$CHANNEL" != "$MSRV" ]; then
2727
./scripts/blas-integ-tests.sh "$FEATURES" $CHANNEL
2828
fi
2929

3030
# Examples
31-
cargo test --examples
31+
cargo nextest run --examples
3232

3333
# Benchmarks
3434
([ "$CHANNEL" != "nightly" ] || cargo bench --no-run --verbose --features "$FEATURES")

scripts/blas-integ-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -x
44
set -e
55

66
# BLAS tests
7-
cargo test -p blas-tests -v --features blas-tests/openblas-system
8-
cargo test -p numeric-tests -v --features numeric-tests/test_blas
7+
cargo nextest run -p blas-tests -v --features blas-tests/openblas-system
8+
cargo nextest run -p numeric-tests -v --features numeric-tests/test_blas

scripts/miri-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ RUSTFLAGS="-Zrandomize-layout"
1515

1616
# General tests
1717
# Note that we exclude blas feature because Miri can't do cblas_gemm
18-
cargo miri test -v -p ndarray -p ndarray-rand --features approx,serde
18+
cargo miri nextest run -v -p ndarray -p ndarray-rand --features approx,serde

0 commit comments

Comments
 (0)