11
11
options :
12
12
- ' 0'
13
13
- ' 1'
14
- fullMode :
15
- description : ' Full Mode'
16
- required : false
17
- default : ' '
18
- type : choice
19
- options :
20
- - ' 0'
21
- - ' 1'
22
14
push :
23
15
paths-ignore :
24
16
- " .gitignore"
38
30
39
31
jobs :
40
32
# job to be executed for every push - testing purpose
41
- build_wheels_python38_only :
33
+ build_and_test_wheels :
42
34
name : Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
43
35
runs-on : ${{ matrix.os }}
44
36
strategy :
@@ -47,21 +39,21 @@ jobs:
47
39
include :
48
40
# NOTE: Doing this to parallelize and speed up workflow
49
41
# i686 - manylinux
50
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp38 -manylinux*', cibw_skip: '' }
42
+ - { os: ubuntu-latest, arch: i686, cibw_build: 'cp* -manylinux*', cibw_skip: 'cp36* ' }
51
43
# i686 - musllinux
52
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp38 -musllinux*', cibw_skip: '' }
44
+ - { os: ubuntu-latest, arch: i686, cibw_build: 'cp* -musllinux*', cibw_skip: 'cp36* ' }
53
45
# x86_64 - manylinux
54
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38 -manylinux*', cibw_skip: '' }
46
+ - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp* -manylinux*', cibw_skip: 'cp36* ' }
55
47
# x86_64 - musllinux
56
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38 -musllinux*', cibw_skip: '' }
48
+ - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp* -musllinux*', cibw_skip: 'cp36* ' }
57
49
# aarch64 - manylinux
58
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp38 -manylinux*', cibw_skip: '' }
50
+ - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp* -manylinux*', cibw_skip: 'cp36* ' }
59
51
# aarch64 - musllinux
60
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp38 -musllinux*', cibw_skip: '' }
61
- - { os: macos-13, arch: x86_64, cibw_build: 'cp38 *', cibw_skip: '' }
62
- - { os: macos-latest, arch: arm64, cibw_build: 'cp38 *', cibw_skip: '' }
63
- - { os: windows-2022, arch: AMD64, cibw_build: 'cp38 *', cibw_skip: '' }
64
- - { os: windows-2022, arch: x86, cibw_build: 'cp38 *', cibw_skip: '' }
52
+ - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp* -musllinux*', cibw_skip: 'cp36* ' }
53
+ - { os: macos-13, arch: x86_64, cibw_build: 'cp *', cibw_skip: 'cp36* ' }
54
+ - { os: macos-latest, arch: arm64, cibw_build: 'cp *', cibw_skip: 'cp36* cp37* ' }
55
+ - { os: windows-2022, arch: AMD64, cibw_build: 'cp *', cibw_skip: 'cp36* ' }
56
+ - { os: windows-2022, arch: x86, cibw_build: 'cp *', cibw_skip: 'cp36* ' }
65
57
66
58
steps :
67
59
- uses : actions/checkout@v4
@@ -113,7 +105,7 @@ jobs:
113
105
uses : docker/setup-qemu-action@v3
114
106
115
107
- name : ' 🚧 cibuildwheel run'
116
- uses : pypa/cibuildwheel@v2.22.0
108
+ uses : pypa/cibuildwheel@v2.23.3
117
109
env :
118
110
CIBW_BUILD_FRONTEND : build
119
111
CIBW_BUILD : ${{ matrix.cibw_build }}
@@ -136,10 +128,10 @@ jobs:
136
128
shell : bash
137
129
run : |
138
130
python3 -m pip install -U pip wheel
139
- python3 -m wheel tags --python-tag='py2' --abi-tag=none wheelhouse/*cp38 *.whl
131
+ python3 -m wheel tags --python-tag='py2' --abi-tag=none wheelhouse/*cp37 *.whl
140
132
141
133
-
uses :
LizardByte/[email protected]
142
- if : (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp38 -manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64') || (runner.os == 'Windows' && matrix.arch == 'AMD64')
134
+ if : (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp* -manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64') || (runner.os == 'Windows' && matrix.arch == 'AMD64')
143
135
with :
144
136
python-version : 2.7
145
137
@@ -153,7 +145,7 @@ jobs:
153
145
154
146
# NOTE: no python2.7 support for macos-13: https://github.com/LizardByte/setup-python-action/issues/2
155
147
- name : ' Python 2.7 tests - Non-Windows'
156
- if : (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp38 -manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64')
148
+ if : (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp* -manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64')
157
149
run : |
158
150
python2 -m pip install capstone==4.0.2 wheelhouse/*py2*.whl
159
151
python2 -m unittest discover tests/regress "*.py"
@@ -163,125 +155,6 @@ jobs:
163
155
name : ${{ env.ARTIFACT_NAME }}
164
156
path : ./wheelhouse/*.whl
165
157
166
- # Job to be executed to build all wheels for all platforms/architectures/python versions only for tag release
167
- build_wheels_all_versions :
168
- name : Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
169
- runs-on : ${{ matrix.os }}
170
- strategy :
171
- fail-fast : false
172
- matrix :
173
- include :
174
- # NOTE: Doing this to parallelize and speed up workflow
175
- # i686 - manylinux
176
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
177
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
178
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
179
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
180
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
181
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
182
- # i686 - musllinux
183
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
184
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
185
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
186
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
187
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
188
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
189
- # x86_64 - manylinux
190
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
191
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
192
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
193
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
194
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
195
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
196
- # x86_64 - musllinux
197
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
198
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
199
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
200
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
201
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
202
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
203
- # aarch64 - manylinux
204
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
205
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
206
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
207
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
208
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
209
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
210
- # aarch64 - musllinux
211
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
212
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
213
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
214
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
215
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
216
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
217
- - { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
218
- - { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38*' }
219
- - { os: windows-2022, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
220
- - { os: windows-2022, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
221
- if : ${{ inputs.fullMode == 1 || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')) || contains(github.event.head_commit.message, 'CI(full)') }}
222
- steps :
223
- - uses : actions/checkout@v4
224
- with :
225
- fetch-depth : 0
226
-
227
- # https://github.com/actions/upload-artifact/issues/22
228
- - name : Prepare a unique name for Artifacts
229
- shell : bash
230
- run : |
231
- # replace not-allowed chars with dash
232
- name="cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cibw_build }}"
233
- name=$(echo -n "$name" | sed -e 's/[ \t:\/\\"<>|*?]/-/g' -e 's/--*/-/g' | sed -e 's/\-$//')
234
- echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
235
-
236
- - name : " Increase pagefile to avoid OOM"
237
- if : runner.os == 'Windows'
238
-
239
- with :
240
- minimum-size : 8GB
241
- disk-root : " C:"
242
-
243
- - name : ' 🛠️ Add msbuild to PATH'
244
- if : runner.os == 'Windows'
245
- uses : microsoft/setup-msbuild@v2
246
- with :
247
- vs-version : ' 17'
248
-
249
- - name : ' 🛠️ Win MSVC 32 dev cmd setup'
250
- if : runner.os == 'Windows' && matrix.arch == 'x86'
251
- uses : ilammy/msvc-dev-cmd@v1
252
- with :
253
- arch : x86
254
-
255
- - name : ' 🛠️ Win MSVC 64 dev cmd setup'
256
- if : runner.os == 'Windows' && matrix.arch == 'AMD64'
257
- uses : ilammy/msvc-dev-cmd@v1
258
- with :
259
- arch : x64
260
-
261
- - name : ' 🛠️ Set up QEMU'
262
- if : runner.os == 'Linux' && matrix.arch == 'i686'
263
- uses : docker/setup-qemu-action@v3
264
-
265
- - name : ' 🚧 cibuildwheel run'
266
-
267
- env :
268
- CIBW_BUILD_FRONTEND : build
269
- CIBW_BUILD : ${{ matrix.cibw_build }}
270
- CIBW_SKIP : ${{ matrix.cibw_skip }}
271
- CIBW_ARCHS : ${{ matrix.arch }}
272
- CIBW_ENVIRONMENT : DEBUG=${{ env.UNICORN_DEBUG }} GENERATORS='Visual Studio 17 2022'
273
- CIBW_ENVIRONMENT_PASS_LINUX : DEBUG
274
- CIBW_TEST_EXTRAS : test
275
- CIBW_TEST_COMMAND : ' python -m unittest discover -v {project}/tests/regress "*.py"'
276
- with :
277
- package-dir : bindings/python
278
- output-dir : wheelhouse
279
-
280
- - uses : actions/upload-artifact@v4
281
- with :
282
- name : ${{ env.ARTIFACT_NAME }}
283
- path : ./wheelhouse/*.whl
284
-
285
158
make_sdist :
286
159
name : Make SDist
287
160
runs-on : ubuntu-latest
@@ -303,7 +176,7 @@ jobs:
303
176
path : bindings/python/dist/*.tar.gz
304
177
305
178
publish :
306
- needs : [ build_wheels_python38_only, build_wheels_all_versions , make_sdist ]
179
+ needs : [ build_and_test_wheels , make_sdist ]
307
180
environment : pypi
308
181
permissions :
309
182
id-token : write
0 commit comments