5
5
runs-on : ubuntu-latest
6
6
strategy :
7
7
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
16
25
steps :
17
26
- uses : actions/checkout@v4
18
27
- uses : actions/setup-python@v5
@@ -21,22 +30,25 @@ jobs:
21
30
- name : Install Dependencies
22
31
run : |
23
32
python -m pip install --upgrade pip
33
+ python -m pip install pytest
34
+
24
35
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.*'
28
41
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] ndonnx numpy sparse
44
+ python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
30
45
fi
31
46
32
- python -m pip install .[dev] $PIP_EXTRA
47
+ - name : Dump pip environment
48
+ run : pip freeze
33
49
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[@]}"
50
+ - name : Test it installs
51
+ run : python -m pip install .
40
52
41
- # Make sure it installs
42
- python -m pip install .
53
+ - name : Run Tests
54
+ run : pytest -v
0 commit comments