10
10
test :
11
11
strategy :
12
12
matrix :
13
- os : [ubuntu-latest]
13
+ os : [' ubuntu-latest' ]
14
14
python : ['3.10', '3.11', '3.12']
15
15
pip_opts : ['']
16
16
numba_boundscheck : [0]
@@ -34,51 +34,30 @@ jobs:
34
34
steps :
35
35
- name : Checkout Repo
36
36
uses : actions/checkout@v4
37
- - name : Set up Python
38
- uses : actions/setup-python@v5
37
+ - uses : mamba-org/setup-micromamba@v1
39
38
with :
40
- python-version : ${{ matrix.python }}
41
- cache : ' pip'
39
+ environment-file : ci/environment.yml
40
+ init-shell : >-
41
+ bash
42
+ cache-environment : true
43
+ cache-downloads : true
44
+ post-cleanup : ' all'
45
+ create-args : >-
46
+ python=${{ matrix.python }}
47
+ ${{ matrix.pip_opts }}
42
48
- name : Install package
43
49
run : |
44
50
pip install -e '.[tests]'
45
- if [ "${{ matrix.pip_opts }}" != "" ]; then
46
- pip install "${{ matrix.pip_opts }}" numba
47
- fi
48
51
- name : Run tests
49
52
run : |
50
- SPARSE_BACKEND=Numba pytest --pyargs sparse --cov-report=xml:coverage_Numba.xml -n 4 -vvv
51
- SPARSE_BACKEND=Finch pytest --pyargs sparse/tests --cov-report=xml:coverage_Finch.xml -n 4 -vvv
53
+ SPARSE_BACKEND=Numba pytest --pyargs sparse --cov-report=xml:coverage_Numba.xml -n auto -vvv
54
+ SPARSE_BACKEND=Finch pytest --pyargs sparse/tests --cov-report=xml:coverage_Finch.xml -n auto -vvv
55
+ SPARSE_BACKEND=MLIR pytest --pyargs sparse/mlir_backend --cov-report=xml:coverage_MLIR.xml -n auto -vvv
52
56
- uses : codecov/codecov-action@v4
53
57
if : always()
54
58
with :
55
59
files : ./**/coverage*.xml
56
60
57
- test_mlir :
58
- runs-on : ubuntu-latest
59
- steps :
60
- - name : Checkout Repo
61
- uses : actions/checkout@v4
62
- - name : Setup Conda
63
- uses : conda-incubator/setup-miniconda@v3
64
- with :
65
- python-version : ' 3.10'
66
- channels : conda-forge
67
- activate-environment : sparse-dev
68
- miniforge-variant : Mambaforge
69
- miniforge-version : latest
70
- use-mamba : true
71
- - name : Update Conda Environment
72
- run : |
73
- mamba env update -n sparse-dev -f ci/environment.yml
74
- mamba run pip install '.[tests]'
75
- mamba install conda-forge::mlir-python-bindings
76
- - name : Build and run tests
77
- shell : bash -l {0}
78
- run : |
79
- conda activate sparse-dev
80
- SPARSE_BACKEND=MLIR pytest sparse/mlir_backend -v
81
-
82
61
examples :
83
62
runs-on : ubuntu-latest
84
63
steps :
@@ -147,7 +126,7 @@ jobs:
147
126
SPARSE_BACKEND : ${{ matrix.backend }}
148
127
run : |
149
128
cd ${GITHUB_WORKSPACE}/array-api-tests
150
- pytest array_api_tests -v -c pytest.ini -n 4 --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
129
+ 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
151
130
152
131
on :
153
132
# Trigger the workflow on push or pull request,
0 commit comments