@@ -22,16 +22,15 @@ jobs:
22
22
with :
23
23
fetch-depth : " 0"
24
24
25
- - name : Set up Python 3.9
25
+ - name : Set up Python 3.11
26
26
uses : actions/setup-python@v5
27
27
with :
28
- python-version : 3.9
28
+ python-version : 3.11
29
29
30
30
- name : Install dependencies
31
31
run : |
32
32
python -m pip install --upgrade pip
33
33
pip install -v --editable '.[lint,test]'
34
- pip install "coveralls>=3.0.0"
35
34
36
35
- name : black check
37
36
run : |
@@ -47,18 +46,11 @@ jobs:
47
46
48
47
- name : pylint check
49
48
run : |
50
- python -m pylint --max-positional-arguments 20 src/gstools /
49
+ python -m pylint src/gstools_cython /
51
50
52
51
- name : cython-lint check
53
52
run : |
54
- cython-lint src/gstools/
55
-
56
- - name : coveralls check
57
- run : |
58
- python -m pytest --cov gstools --cov-report term-missing -v tests/
59
- python -m coveralls --service=github
60
- env :
61
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53
+ cython-lint src/gstools_cython/
62
54
63
55
build_wheels :
64
56
name : wheels for ${{ matrix.os }}
@@ -75,36 +67,38 @@ jobs:
75
67
fetch-depth : " 0"
76
68
77
69
- name : Build wheels
78
- uses : pypa/cibuildwheel@v2.18 .0
70
+ uses : pypa/cibuildwheel@v2.22 .0
79
71
with :
80
- output-dir : dist
72
+ output-dir : dist-wheel-${{ matrix.os }}
81
73
82
- - uses : actions/upload-artifact@v3
74
+ - uses : actions/upload-artifact@v4
83
75
with :
84
- path : ./dist/*.whl
76
+ name : dist-wheel-${{ matrix.os }}
77
+ path : ./dist-wheel-${{ matrix.os }}/*.whl
85
78
86
79
build_sdist :
87
- name : sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }} scipy${{ matrix.ver.sp }}
80
+ name : sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
88
81
runs-on : ${{ matrix.os }}
89
82
strategy :
90
83
fail-fast : false
91
84
matrix :
92
85
os : [ubuntu-latest, windows-latest, macos-13, macos-14]
93
86
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
94
87
ver :
95
- - { py: "3.8", np: "==1.20.0", sp: "==1.5.4" }
96
- - { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
97
- - { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
98
- - { py: "3.11", np: "==1.23.2", sp: "==1.9.2" }
99
- - { py: "3.12", np: "==1.26.2", sp: "==1.11.2" }
100
- - { py: "3.12", np: ">=2.0.0rc1", sp: ">=1.13.0" }
88
+ - { py: "3.8", np: "==1.20.0" }
89
+ - { py: "3.9", np: "==1.20.0" }
90
+ - { py: "3.10", np: "==1.21.6" }
91
+ - { py: "3.11", np: "==1.23.2" }
92
+ - { py: "3.12", np: "==1.26.2" }
93
+ - { py: "3.13", np: "==2.1.0" }
94
+ - { py: "3.13", np: ">=2.1.0" }
101
95
exclude :
102
96
- os : macos-14
103
- ver : { py: "3.8", np: "==1.20.0", sp: "==1.5.4" }
97
+ ver : { py: "3.8", np: "==1.20.0" }
104
98
- os : macos-14
105
- ver : { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
99
+ ver : { py: "3.9", np: "==1.20.0" }
106
100
- os : macos-14
107
- ver : { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
101
+ ver : { py: "3.10", np: "==1.21.6" }
108
102
steps :
109
103
- uses : actions/checkout@v4
110
104
with :
@@ -120,35 +114,70 @@ jobs:
120
114
python -m pip install --upgrade pip
121
115
pip install build
122
116
123
- - name : Install GSTools
117
+ - name : Install GSTools-Cython
124
118
env :
125
119
GSTOOLS_BUILD_PARALLEL : 1
126
120
run : |
127
121
pip install -v --editable .[test]
128
122
129
123
- name : Run tests
130
124
run : |
131
- pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}"
125
+ pip install "numpy${{ matrix.ver.np }}"
132
126
python -m pytest -v tests/
133
127
134
128
- name : Build sdist
135
129
run : |
136
130
# PEP 517 package builder from pypa
137
- python -m build --sdist --outdir dist .
131
+ python -m build --sdist --outdir dist-sdist .
132
+
133
+ - uses : actions/upload-artifact@v4
134
+ if : matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.11'
135
+ with :
136
+ name : dist-sdist
137
+ path : dist-sdist/*.tar.gz
138
138
139
- - uses : actions/upload-artifact@v3
140
- if : matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.9'
139
+ coverage :
140
+ name : coverage
141
+ runs-on : ubuntu-latest
142
+
143
+ steps :
144
+ - uses : actions/checkout@v4
145
+ with :
146
+ fetch-depth : ' 0'
147
+
148
+ - name : Set up Python 3.11
149
+ uses : actions/setup-python@v5
141
150
with :
142
- path : dist/*.tar.gz
151
+ python-version : 3.11
152
+
153
+ - name : Install dependencies
154
+ run : |
155
+ python -m pip install --upgrade pip
156
+ pip install "coveralls>=3.0.0"
157
+
158
+ - name : Install GSTools-Cython
159
+ env :
160
+ GSTOOLS_CY_COV : 1
161
+ run : |
162
+ pip install -v --editable .[test]
163
+
164
+ - name : Run tests
165
+ env :
166
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
167
+ run : |
168
+ pip install "numpy${{ matrix.ver.np }}"
169
+ python -m pytest --cov gstools_cython --cov-report term-missing -v tests/
170
+ python -m coveralls --service=github
143
171
144
172
upload_to_pypi :
145
173
needs : [build_wheels, build_sdist]
146
174
runs-on : ubuntu-latest
147
175
148
176
steps :
149
- - uses : actions/download-artifact@v3
177
+ - uses : actions/download-artifact@v4
150
178
with :
151
- name : artifact
179
+ pattern : dist-*
180
+ merge-multiple : true
152
181
path : dist
153
182
154
183
- name : Publish to Test PyPI
0 commit comments