55 runs-on : ubuntu-latest
66 strategy :
77 matrix :
8- python-version : ['3.9', '3.10', '3.11', '3.12']
9- numpy-version : ['1.21', '1.26', '2.0', 'dev']
10- exclude :
11- - python-version : ' 3.11'
12- numpy-version : ' 1.21'
13- - python-version : ' 3.12'
14- numpy-version : ' 1.21'
15- fail-fast : true
8+ include :
9+ - numpy-version : ' 1.22'
10+ python-version : ' 3.10'
11+ - numpy-version : ' 1.26'
12+ python-version : ' 3.10'
13+ - numpy-version : ' 1.26'
14+ python-version : ' 3.12'
15+ - numpy-version : ' latest'
16+ python-version : ' 3.10'
17+ - numpy-version : ' latest'
18+ python-version : ' 3.13'
19+ - numpy-version : ' dev'
20+ python-version : ' 3.11'
21+ - numpy-version : ' dev'
22+ python-version : ' 3.13'
23+
24+ fail-fast : false
1625 steps :
1726 - uses : actions/checkout@v4
1827 - uses : actions/setup-python@v5
@@ -21,22 +30,29 @@ jobs:
2130 - name : Install Dependencies
2231 run : |
2332 python -m pip install --upgrade pip
33+ python -m pip install pytest
34+
2435 if [ "${{ matrix.numpy-version }}" == "dev" ]; then
25- PIP_EXTRA='numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'
26- elif [ "${{ matrix.numpy-version }}" == "1.21" ]; then
27- PIP_EXTRA='numpy==1.21.*'
36+ python -m pip install numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
37+ elif [ "${{ matrix.numpy-version }}" == "1.22" ]; then
38+ python -m pip install 'numpy==1.22.*'
39+ elif [ "${{ matrix.numpy-version }}" == "1.26" ]; then
40+ python -m pip install 'numpy==1.26.*'
2841 else
29- PIP_EXTRA='numpy==1.26.*'
42+ # Don't `pip install .[dev]` as it would pull in the whole torch cuda stack
43+ python -m pip install array-api-strict dask[array] jax[cpu] numpy sparse
44+ python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
45+ if [ "${{ matrix.python-version }}" != "3.13" ]; then
46+ # onnx wheels are not available on Python 3.13 at the moment of writing
47+ python -m pip install ndonnx
48+ fi
3049 fi
3150
32- python -m pip install .[dev] $PIP_EXTRA
51+ - name : Dump pip environment
52+ run : pip freeze
3353
34- - name : Run Tests
35- run : |
36- if [[ "${{ matrix.numpy-version }}" == "1.21" || "${{ matrix.numpy-version }}" == "dev" ]]; then
37- PYTEST_EXTRA=(-k "numpy and not jax and not torch and not dask and not sparse")
38- fi
39- pytest -v "${PYTEST_EXTRA[@]}"
54+ - name : Test it installs
55+ run : python -m pip install .
4056
41- # Make sure it installs
42- python -m pip install .
57+ - name : Run Tests
58+ run : pytest -v
0 commit comments