30
30
env :
31
31
PYTHON_VERSION : ${{ matrix.python }}
32
32
NUMBA_BOUNDSCHECK : ${{ matrix.numba_boundscheck }}
33
- PYTHONFAULTHANDLER : ' ${{ github.workspace }}/faulthandler.log'
34
33
steps :
35
34
- name : Checkout Repo
36
35
uses : actions/checkout@v4
49
48
run : |
50
49
pip install -e '.[tests]'
51
50
- name : Run tests
52
- run : |
53
- if [ $(python -c 'import numpy as np; print(np.lib.NumpyVersion(np.__version__) >= "2.0.0a1")') = 'True' ]; then
54
- pytest --pyargs sparse --doctest-modules --cov-report=xml:coverage_Numba.xml -n auto -vvv
55
- else
56
- pytest --pyargs sparse --cov-report=xml:coverage_Numba.xml -n auto -vvv
57
- fi
58
- python -c 'import finch'
59
- SPARSE_BACKEND=Finch pytest --pyargs sparse/tests --cov-report=xml:coverage_Finch.xml -n auto -vvv
60
- SPARSE_BACKEND=MLIR pytest --pyargs sparse/mlir_backend --cov-report=xml:coverage_MLIR.xml -n auto -vvv
51
+ run : ci/test_backends.sh
61
52
- uses : codecov/codecov-action@v5
62
53
if : always()
63
54
with :
79
70
pip install -U setuptools wheel
80
71
pip install '.[finch]' scipy
81
72
- name : Run examples
82
- run : |
83
- source ci/test_examples.sh
73
+ run : ci/test_examples.sh
84
74
85
75
notebooks :
86
76
runs-on : ubuntu-latest
@@ -96,46 +86,36 @@ jobs:
96
86
run : |
97
87
pip install -e '.[notebooks]'
98
88
- name : Run notebooks
99
- run : |
100
- source ci/test_notebooks.sh
89
+ run : ci/test_notebooks.sh
101
90
102
91
array_api_tests :
103
92
strategy :
104
93
matrix :
105
94
backend : ['Numba', 'Finch']
106
95
fail-fast : false
96
+ env :
97
+ ARRAY_API_TESTS_DIR : ${{ github.workspace }}/array-api-tests
107
98
runs-on : ubuntu-latest
108
99
steps :
109
100
- name : Checkout Repo
110
101
uses : actions/checkout@v4
111
102
- name : Checkout array-api-tests
112
- uses : actions/checkout@v4
113
- with :
114
- repository : data-apis/array-api-tests
115
- ref : ' 33f2d2ea2f3dd2b3ceeeb4519d55e08096184149' # Latest commit as of 2024-05-29
116
- submodules : ' true'
117
- path : ' array-api-tests'
103
+ run : ci/clone_array_api_tests.sh
118
104
- name : Set up Python
119
105
uses : actions/setup-python@v5
120
106
with :
121
107
python-version : ' 3.11'
122
108
cache : ' pip'
123
109
- name : Install build and test dependencies from PyPI
124
110
run : |
125
- pip install pytest-xdist -r array-api-tests /requirements.txt
111
+ pip install pytest-xdist -r "$ARRAY_API_TESTS_DIR /requirements.txt"
126
112
- name : Build and install Sparse
127
113
run : |
128
114
pip install '.[finch]'
129
115
- name : Run the test suite
130
116
env :
131
- ARRAY_API_TESTS_MODULE : sparse
132
117
SPARSE_BACKEND : ${{ matrix.backend }}
133
- run : |
134
- cd ${GITHUB_WORKSPACE}/array-api-tests
135
- if [ "${SPARSE_BACKEND}" = "Finch" ]; then
136
- python -c 'import finch'
137
- fi
138
- pytest array_api_tests -v -c pytest.ini -n auto --max-examples=2 --derandomize --disable-deadline -o xfail_strict=True --xfails-file ${GITHUB_WORKSPACE}/ci/${{ matrix.backend }}-array-api-xfails.txt --skips-file ${GITHUB_WORKSPACE}/ci/${{ matrix.backend }}-array-api-skips.txt
118
+ run : ci/test_array_api.sh
139
119
140
120
on :
141
121
# Trigger the workflow on push or pull request,
0 commit comments