Skip to content

Moves scripts and CI/CD to nextest #1514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[profile.ci]
fail-fast = false

[profile.ci.junit]
path = "junit.xml"
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
toolchain: ${{ matrix.rust }}
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- name: Install openblas
run: sudo apt-get install libopenblas-dev gfortran
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
Expand All @@ -116,10 +117,9 @@ jobs:
toolchain: ${{ needs.pass-msrv.outputs.BLAS_MSRV }}
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- name: Install openblas
run: sudo apt-get install libopenblas-dev gfortran
- run: cargo tree -p blas-tests -i openblas-src -F blas-tests/openblas-system
- run: cargo tree -p blas-tests -i openblas-build -F blas-tests/openblas-system
- run: ./scripts/blas-integ-tests.sh $BLAS_MSRV

miri:
Expand All @@ -131,6 +131,7 @@ jobs:
with:
components: miri
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- run: ./scripts/miri-tests.sh

cross_test:
Expand Down Expand Up @@ -167,9 +168,10 @@ jobs:
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- name: Install cargo-careful
run: cargo install cargo-careful
- run: cargo careful test -Zcareful-sanitizer --features="$FEATURES"
- run: cargo careful nextest run -Zcareful-sanitizer --features="$FEATURES"

docs:
#if: ${{ github.event_name == 'merge_group' }}
Expand Down
14 changes: 7 additions & 7 deletions scripts/all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ QC_FEAT=--features=ndarray-rand/quickcheck
cargo build -v --no-default-features

# ndarray with no features
cargo test -p ndarray -v --no-default-features
cargo nextest run -p ndarray -v --no-default-features
# ndarray with no_std-compatible features
cargo test -p ndarray -v --no-default-features --features approx
cargo nextest run -p ndarray -v --no-default-features --features approx
# all with features
cargo test -v --features "$FEATURES" $QC_FEAT
cargo nextest run -v --features "$FEATURES" $QC_FEAT
# all with features and release (ignore test crates which is already optimized)
cargo test -v -p ndarray -p ndarray-rand --release --features "$FEATURES" $QC_FEAT --lib --tests
cargo nextest run -v -p ndarray -p ndarray-rand --release --features "$FEATURES" $QC_FEAT --lib --tests

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

# Examples
cargo test --examples
cargo nextest run --examples

# Benchmarks
([ "$CHANNEL" != "nightly" ] || cargo bench --no-run --verbose --features "$FEATURES")
4 changes: 2 additions & 2 deletions scripts/blas-integ-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -x
set -e

# BLAS tests
cargo test -p blas-tests -v --features blas-tests/openblas-system
cargo test -p numeric-tests -v --features numeric-tests/test_blas
cargo nextest run -p blas-tests -v --features blas-tests/openblas-system
cargo nextest run -p numeric-tests -v --features numeric-tests/test_blas
2 changes: 1 addition & 1 deletion scripts/miri-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ RUSTFLAGS="-Zrandomize-layout"

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