1010 test :
1111 strategy :
1212 matrix :
13- os : [ubuntu-latest]
13+ os : [' ubuntu-latest' ]
1414 python : ['3.10', '3.11', '3.12']
1515 pip_opts : ['']
1616 numba_boundscheck : [0]
@@ -34,51 +34,30 @@ jobs:
3434 steps :
3535 - name : Checkout Repo
3636 uses : actions/checkout@v4
37- - name : Set up Python
38- uses : actions/setup-python@v5
37+ - uses : mamba-org/setup-micromamba@v1
3938 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 }}
4248 - name : Install package
4349 run : |
4450 pip install -e '.[tests]'
45- if [ "${{ matrix.pip_opts }}" != "" ]; then
46- pip install "${{ matrix.pip_opts }}" numba
47- fi
4851 - name : Run tests
4952 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
5256 - uses : codecov/codecov-action@v4
5357 if : always()
5458 with :
5559 files : ./**/coverage*.xml
5660
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-
8261 examples :
8362 runs-on : ubuntu-latest
8463 steps :
@@ -147,7 +126,7 @@ jobs:
147126 SPARSE_BACKEND : ${{ matrix.backend }}
148127 run : |
149128 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
151130
152131on :
153132 # Trigger the workflow on push or pull request,
0 commit comments