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"
@@ -166,126 +158,6 @@ jobs:
166
158
name : ${{ env.ARTIFACT_NAME }}
167
159
path : ./wheelhouse/*.whl
168
160
169
- # Job to be executed to build all wheels for all platforms/architectures/python versions only for tag release
170
- build_wheels_all_versions :
171
- name : Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
172
- runs-on : ${{ matrix.os }}
173
- strategy :
174
- fail-fast : false
175
- matrix :
176
- include :
177
- # NOTE: Doing this to parallelize and speed up workflow
178
- # i686 - manylinux
179
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
180
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
181
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
182
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
183
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
184
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
185
- # i686 - musllinux
186
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
187
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
188
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
189
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
190
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
191
- - { os: ubuntu-latest, arch: i686, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
192
- # x86_64 - manylinux
193
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
194
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
195
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
196
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
197
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
198
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
199
- # x86_64 - musllinux
200
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
201
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
202
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
203
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
204
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
205
- - { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
206
- # aarch64 - manylinux
207
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
208
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
209
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
210
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
211
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
212
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
213
- # aarch64 - musllinux
214
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
215
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
216
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
217
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
218
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
219
- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
220
- - { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
221
- - { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38*' }
222
- - { os: windows-2022, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
223
- - { os: windows-2022, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
224
- if : ${{ inputs.fullMode == 1 || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')) || contains(github.event.head_commit.message, 'CI(full)') }}
225
- steps :
226
- - uses : actions/checkout@v4
227
- with :
228
- fetch-depth : 0
229
-
230
- # https://github.com/actions/upload-artifact/issues/22
231
- - name : Prepare a unique name for Artifacts
232
- shell : bash
233
- run : |
234
- # replace not-allowed chars with dash
235
- name="cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cibw_build }}"
236
- name=$(echo -n "$name" | sed -e 's/[ \t:\/\\"<>|*?]/-/g' -e 's/--*/-/g' | sed -e 's/\-$//')
237
- echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
238
-
239
- - name : " Increase pagefile to avoid OOM"
240
- if : runner.os == 'Windows'
241
-
242
- with :
243
- minimum-size : 8GB
244
- disk-root : " C:"
245
-
246
- - name : ' 🛠️ Add msbuild to PATH'
247
- if : runner.os == 'Windows'
248
- uses : microsoft/setup-msbuild@v2
249
- with :
250
- vs-version : ' 17'
251
-
252
- - name : ' 🛠️ Win MSVC 32 dev cmd setup'
253
- if : runner.os == 'Windows' && matrix.arch == 'x86'
254
- uses : ilammy/msvc-dev-cmd@v1
255
- with :
256
- arch : x86
257
-
258
- - name : ' 🛠️ Win MSVC 64 dev cmd setup'
259
- if : runner.os == 'Windows' && matrix.arch == 'AMD64'
260
- uses : ilammy/msvc-dev-cmd@v1
261
- with :
262
- arch : x64
263
-
264
- - name : ' 🛠️ Set up QEMU'
265
- if : runner.os == 'Linux' && matrix.arch == 'i686'
266
- uses : docker/setup-qemu-action@v3
267
-
268
- - name : ' 🚧 cibuildwheel run'
269
-
270
- env :
271
- CIBW_BUILD_FRONTEND : build
272
- CIBW_BUILD : ${{ matrix.cibw_build }}
273
- CIBW_SKIP : ${{ matrix.cibw_skip }}
274
- CIBW_ARCHS : ${{ matrix.arch }}
275
- CIBW_ENVIRONMENT : DEBUG=${{ env.UNICORN_DEBUG }} GENERATORS='Visual Studio 17 2022'
276
- CIBW_ENVIRONMENT_PASS_LINUX : DEBUG
277
- CIBW_TEST_EXTRAS : test
278
- CIBW_TEST_COMMAND : ' python -m unittest discover -v {project}/tests/regress "*.py"'
279
- with :
280
- package-dir : bindings/python
281
- output-dir : wheelhouse
282
-
283
- - uses : actions/upload-artifact@v4
284
- if : ${{!( startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.os, 'macos') && contains(matrix.arch, 'arm64') )}}
285
- with :
286
- name : ${{ env.ARTIFACT_NAME }}
287
- path : ./wheelhouse/*.whl
288
-
289
161
make_sdist :
290
162
name : Make SDist
291
163
runs-on : ubuntu-latest
@@ -307,7 +179,7 @@ jobs:
307
179
path : bindings/python/dist/*.tar.gz
308
180
309
181
publish :
310
- needs : [ build_wheels_python38_only, build_wheels_all_versions , make_sdist ]
182
+ needs : [ build_and_test_wheels , make_sdist ]
311
183
environment : pypi
312
184
permissions :
313
185
id-token : write
0 commit comments