12
12
- published
13
13
14
14
jobs :
15
+ build_test_wheel :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version : " 3.11"
23
+
24
+ - name : build
25
+ env :
26
+ SYSTEMRDL_REQUIRE_BINARY_BUILD : ~
27
+ run : |
28
+ python -m pip install build
29
+ python -m build
30
+
31
+ - uses : actions/upload-artifact@v4
32
+ with :
33
+ name : test_wheel
34
+ path : dist/*.whl
35
+
36
+ # -------------------------------------------------------------------------------
15
37
test :
38
+ needs :
39
+ - build_test_wheel
16
40
strategy :
17
41
matrix :
18
42
python-version :
@@ -40,20 +64,25 @@ jobs:
40
64
runs-on : ${{ matrix.os }}
41
65
42
66
steps :
43
- - uses : actions/checkout@v3
67
+ - uses : actions/checkout@v4
44
68
45
69
- name : Set up Python ${{ matrix.python-version }}
46
70
uses : actions/setup-python@v4
47
71
with :
48
72
python-version : ${{ matrix.python-version }}
49
73
50
- - name : Install dependencies
74
+ - uses : actions/download-artifact@v4
75
+ with :
76
+ name : test_wheel
77
+ path : dist
78
+
79
+ - name : Install test dependencies
51
80
run : |
52
- python -m pip install -U pytest pytest-cov coveralls>=3.0.0 parameterized
81
+ python -m pip install -r test/requirements.txt
53
82
54
83
- name : Install
55
84
run : |
56
- python -m pip install .
85
+ python -m pip install dist/*.whl
57
86
58
87
- name : Test
59
88
run : |
@@ -67,12 +96,12 @@ jobs:
67
96
pytest
68
97
69
98
- name : Coveralls
70
- if : ${{ matrix.python-version != 3.5 }} # coveralls no longer works well on 3.5
71
99
env :
72
100
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73
101
COVERALLS_PARALLEL : true
74
102
run : |
75
103
cd test
104
+ python -m pip install -U coveralls>=3.0.0
76
105
coveralls --service=github
77
106
78
107
finish_coveralls :
@@ -94,46 +123,61 @@ jobs:
94
123
95
124
# -------------------------------------------------------------------------------
96
125
lint :
126
+ needs :
127
+ - build_test_wheel
97
128
runs-on : ubuntu-latest
98
129
steps :
99
- - uses : actions/checkout@v3
130
+ - uses : actions/checkout@v4
100
131
- name : Set up Python
101
132
uses : actions/setup-python@v4
102
133
with :
103
- python-version : " 3.10 "
134
+ python-version : " 3.11 "
104
135
105
- - name : Install dependencies
136
+ - uses : actions/download-artifact@v4
137
+ with :
138
+ name : test_wheel
139
+ path : dist
140
+
141
+ - name : Install test dependencies
106
142
run : |
107
- python -m pip install -U pylint
143
+ python -m pip install -r test/requirements.txt
108
144
109
145
- name : Install
110
146
run : |
111
- python setup.py install
147
+ python -m pip install dist/*.whl
112
148
113
149
- name : Run Lint
114
150
run : |
115
- pylint --rcfile test/pylint.rc systemrdl
151
+ pylint --rcfile test/pylint.rc src/ systemrdl
116
152
117
153
# -------------------------------------------------------------------------------
118
154
mypy :
155
+ needs :
156
+ - build_test_wheel
119
157
runs-on : ubuntu-latest
120
158
steps :
121
- - uses : actions/checkout@v3
159
+ - uses : actions/checkout@v4
122
160
- name : Set up Python
123
161
uses : actions/setup-python@v4
124
162
with :
125
- python-version : " 3.10 "
163
+ python-version : " 3.11 "
126
164
127
- - name : Install dependencies
165
+ - uses : actions/download-artifact@v4
166
+ with :
167
+ name : test_wheel
168
+ path : dist
169
+
170
+ - name : Install test dependencies
128
171
run : |
129
- python -m pip install -U types-Markdown
172
+ python -m pip install -r test/requirements.txt
130
173
131
- # Exclude version due to: https://github.com/python/mypy/issues/16770
132
- python -m pip install -U "mypy != 1.8.0"
174
+ - name : Install
175
+ run : |
176
+ python -m pip install dist/*.whl
133
177
134
178
- name : Type Check
135
179
run : |
136
- mypy --config-file test/mypy.ini systemrdl
180
+ mypy --config-file test/mypy.ini src/ systemrdl
137
181
138
182
# -------------------------------------------------------------------------------
139
183
build_wheels :
@@ -149,47 +193,40 @@ jobs:
149
193
os :
150
194
- windows-latest
151
195
- macos-latest
196
+ - ubuntu-latest
152
197
include :
153
198
# Only build CPython 3.x targets
154
199
- cibw_build : " cp3*"
155
- cibw_skip : " "
156
- name_suffix : " "
157
-
158
- # Parallelize Linux builds because there are many!
159
- - os : ubuntu-latest
160
- name_suffix : " manylinux_x86_64"
161
- cibw_build : " cp3*-manylinux_x86_64"
162
- cibw_skip : " "
163
- - os : ubuntu-latest
164
- name_suffix : " manylinux_i686"
165
- cibw_build : " cp3*-manylinux_i686"
166
- cibw_skip : " "
167
- - os : ubuntu-latest
168
- name_suffix : " musllinux_x86_64"
169
- cibw_build : " cp3*-musllinux_x86_64"
170
- cibw_skip : " "
171
- - os : ubuntu-latest
172
- name_suffix : " others"
173
- cibw_build : " cp3*"
174
- cibw_skip : " cp3*-{manylinux_x86_64,manylinux_i686,musllinux_x86_64}"
175
-
176
200
177
201
steps :
178
- - uses : actions/checkout@v3
202
+ - uses : actions/checkout@v4
179
203
180
204
- name : Build wheels
181
- uses : pypa/cibuildwheel@v2.16.5
205
+ uses : pypa/cibuildwheel@v2.22.0
182
206
env :
183
- CIBW_BUILD : ${{ matrix.cibw_build }}
184
- CIBW_SKIP : ${{ matrix.cibw_skip }}
207
+ # Only build CPython ABI3 targets
208
+ CIBW_BUILD : " cp3*-abi3-* "
185
209
# Ensure full C++17 availability on macOS builds
186
210
MACOSX_DEPLOYMENT_TARGET : " 10.13"
187
211
# Signal setup.py to fail if binary build fails
188
212
SYSTEMRDL_REQUIRE_BINARY_BUILD : ~
189
213
214
+ - name : Set up Python
215
+ uses : actions/setup-python@v4
216
+ with :
217
+ python-version : " 3.11"
218
+
219
+ - name : Install dependencies
220
+ run : |
221
+ python -m pip install abi3audit
222
+
223
+ - name : ABI3 audit
224
+ run : |
225
+ abi3audit --debug --verbose --summary --strict wheelhouse/*.whl
226
+
190
227
- uses : actions/upload-artifact@v4
191
228
with :
192
- name : whl-${{ matrix.os }}${{ matrix.name_suffix }}
229
+ name : release-dist- whl-${{ matrix.os }}- ${{ strategy.job-index }}
193
230
path : ./wheelhouse/*.whl
194
231
195
232
# -------------------------------------------------------------------------------
@@ -201,19 +238,23 @@ jobs:
201
238
name : Build source distribution
202
239
runs-on : ubuntu-latest
203
240
steps :
204
- - uses : actions/checkout@v3
241
+ - uses : actions/checkout@v4
205
242
206
243
- uses : actions/setup-python@v4
207
244
name : Install Python
208
245
with :
209
- python-version : " 3.10"
246
+ python-version : " 3.11"
247
+
248
+ - name : Install dependencies
249
+ run : |
250
+ python -m pip install build
210
251
211
252
- name : Build sdist
212
- run : python setup.py sdist
253
+ run : python -m build -- sdist
213
254
214
255
- uses : actions/upload-artifact@v4
215
- name : sdist
216
256
with :
257
+ name : release-dist-sdist
217
258
path : dist/*.tar.gz
218
259
219
260
# -------------------------------------------------------------------------------
@@ -229,6 +270,7 @@ jobs:
229
270
steps :
230
271
- uses : actions/download-artifact@v4
231
272
with :
273
+ pattern : release-dist-*
232
274
path : dist
233
275
234
276
- uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments