Skip to content
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

Change CI to handle openblas MSRV compatibility #1456

Closed
wants to merge 11 commits into from
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ jobs:
run: sudo apt-get install libopenblas-dev gfortran
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}

blas-msrv:
runs-on: ubuntu-latest
name: blas-msrv
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.67.0 # BLAS MSRV
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
- name: Install openblas
run: sudo apt-get install libopenblas-dev gfortran
- run: ./scripts/blas-integ-tests.sh "$FEATURES" 1.67.0

miri:
runs-on: ubuntu-latest
name: miri
Expand Down
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ there is no tight coupling to the ``blas-src`` version, so version selection is
0.13 0.2.0 0.6.0
=========== ============ ================ ==============

------------
BLAS on MSRV
------------

Although ``ndarray`` currently maintains an MSRV of 1.64.0, this is separate from the MSRV (either stated or real) of the various BLAS providers.
As of the time of writing, ``openblas`` currently supports MSRV of 1.67.0.
So, while ``ndarray`` and ``openblas-src`` are compatible, they can only work together with toolchains 1.67.0 or above.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if ndarray can just use an older blas-src and older openblas-src for earlier Rust. I think that's the case, but I'm not sure we need to use it in CI. Thanks for fixing this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem - I'll try seeing if there's an older openblas-src that we can use and add it to the documentation. But this all was the motivation for #1455, since I was wondering whether we want to bump to 1.67 (in order to make it easier for users to use BLAS)


Recent Changes
--------------

Expand Down
5 changes: 3 additions & 2 deletions scripts/all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ cargo test -v -p ndarray -p ndarray-rand --release --features "$FEATURES" $QC_FE
# BLAS tests
cargo test -p ndarray --lib -v --features blas
cargo test -p blas-mock-tests -v
cargo test -p blas-tests -v --features blas-tests/openblas-system
cargo test -p numeric-tests -v --features numeric-tests/test_blas
if [ "$CHANNEL" != "1.64.0" ]; then
./scripts/blas-integ-tests.sh "$FEATURES" $CHANNEL
fi

# Examples
cargo test --examples
Expand Down
11 changes: 11 additions & 0 deletions scripts/blas-integ-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -x
set -e

FEATURES=$1
CHANNEL=$2

# BLAS tests
cargo test -p blas-tests -v --features blas-tests/openblas-system
cargo test -p numeric-tests -v --features numeric-tests/test_blas
Loading