1
+ defaults :
2
+ run :
3
+ shell : bash -leo pipefail {0}
4
+
5
+ concurrency :
6
+ group : ${{ github.head_ref }}
7
+ cancel-in-progress : true
8
+
1
9
jobs :
2
10
test :
3
- defaults :
4
- run :
5
- shell : bash -el {0}
6
11
strategy :
7
12
matrix :
8
13
os : [ubuntu-latest]
18
23
python : ' 3.10'
19
24
numba_boundscheck : 1
20
25
- os : ubuntu-latest
26
+ python : ' 3.10'
21
27
pip_opts : " --pre -U"
22
28
fail-fast : false
23
29
runs-on : ${{ matrix.os }}
@@ -27,65 +33,33 @@ jobs:
27
33
steps :
28
34
- name : Checkout Repo
29
35
uses : actions/checkout@v4
30
- - name : Cache conda
31
- uses : actions/cache@v4
32
- env :
33
- # Increase this value to reset cache if ci/environment.yml has not changed
34
- CACHE_NUMBER : 0
35
- with :
36
- path : ~/conda_pkgs_dir
37
- key :
38
- test-${{ matrix.os }}-conda-py${{ matrix.python }}-${{ env.CACHE_NUMBER }}-${{
39
- hashFiles('ci/environment.yml') }}
40
- - uses : julia-actions/setup-julia@v1
41
- with :
42
- version : ' 1.10.0'
43
- - uses : conda-incubator/setup-miniconda@v3
36
+ - name : Set up Python
37
+ uses : actions/setup-python@v5
44
38
with :
45
- activate-environment : sparse-dev
46
- allow-softlinks : true
47
- environment-file : ci/environment.yml
48
39
python-version : ${{ matrix.python }}
49
- miniforge-version : latest
40
+ cache : ' pip '
50
41
- name : Install package
51
42
run : |
52
43
pip install -e .[tests]
53
44
pip install ${{ matrix.pip_opts }} numpy numba
54
45
- name : Run tests
55
46
run : |
56
- SPARSE_BACKEND=Numba pytest --pyargs sparse
57
- SPARSE_BACKEND=Finch pytest --pyargs sparse/tests
47
+ SPARSE_BACKEND=Numba pytest --pyargs sparse --cov-report=xml:coverage_Numba.xml -n 4 -vvv
48
+ SPARSE_BACKEND=Finch pytest --pyargs sparse/tests --cov-report=xml:coverage_Finch.xml -n 4 -vvv
58
49
- uses : codecov/codecov-action@v4
59
50
if : always()
60
- - name : Publish Test Results
61
- uses : EnricoMi/publish-unit-test-result-action/composite@v2
62
- if : always()
63
51
with :
64
- files : " **/test- *.xml"
52
+ files : ./ **/coverage *.xml
65
53
docs :
66
- defaults :
67
- run :
68
- shell : bash -el {0}
69
54
runs-on : ubuntu-latest
70
55
steps :
71
56
- name : Checkout Repo
72
57
uses : actions/checkout@v4
73
- - name : Cache conda
74
- uses : actions/cache@v4
75
- env :
76
- # Increase this value to reset cache if ci/environment.yml has not changed
77
- CACHE_NUMBER : 0
78
- with :
79
- path : ~/conda_pkgs_dir
80
- key :
81
- docs-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
82
- - uses : conda-incubator/setup-miniconda@v3
58
+ - name : Set up Python
59
+ uses : actions/setup-python@v5
83
60
with :
84
- activate-environment : sparse-dev
85
- allow-softlinks : true
86
- environment-file : ci/environment.yml
87
61
python-version : ' 3.10'
88
- miniforge-version : latest
62
+ cache : ' pip '
89
63
- name : Install package
90
64
run : |
91
65
pip install -e .[docs]
@@ -97,29 +71,15 @@ jobs:
97
71
name : Documentation
98
72
path : _build/html
99
73
benchmarks :
100
- defaults :
101
- run :
102
- shell : bash -el {0}
103
74
runs-on : ubuntu-latest
104
75
steps :
105
76
- name : Checkout Repo
106
77
uses : actions/checkout@v4
107
- - name : Cache conda
108
- uses : actions/cache@v4
109
- env :
110
- # Increase this value to reset cache if ci/environment.yml has not changed
111
- CACHE_NUMBER : 0
112
- with :
113
- path : ~/conda_pkgs_dir
114
- key :
115
- benchmarks-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
116
- - uses : conda-incubator/setup-miniconda@v3
78
+ - name : Set up Python
79
+ uses : actions/setup-python@v5
117
80
with :
118
- activate-environment : sparse-dev
119
- allow-softlinks : true
120
- environment-file : ci/environment.yml
121
81
python-version : ' 3.10'
122
- miniforge-version : latest
82
+ cache : ' pip '
123
83
- name : Install asv
124
84
run : |
125
85
pip install asv
@@ -133,11 +93,13 @@ jobs:
133
93
- name : Checkout Repo
134
94
uses : actions/checkout@v4
135
95
- name : Set up Python
136
- uses : actions/setup-python@v5.1.0
96
+ uses : actions/setup-python@v5
137
97
with :
138
98
python-version : ' 3.11'
99
+ cache : ' pip'
139
100
- name : Build and install Sparse
140
101
run : |
102
+ pip install -U setuptools wheel
141
103
python -m pip install '.[finch]' scipy
142
104
- name : Run examples
143
105
run : |
@@ -159,9 +121,10 @@ jobs:
159
121
submodules : ' true'
160
122
path : ' array-api-tests'
161
123
- name : Set up Python
162
- uses : actions/setup-python@v5.1.0
124
+ uses : actions/setup-python@v5
163
125
with :
164
126
python-version : ' 3.11'
127
+ cache : ' pip'
165
128
- name : Install build and test dependencies from PyPI
166
129
run : |
167
130
python -m pip install pytest-xdist -r array-api-tests/requirements.txt
0 commit comments