forked from eriknw/cytoolz
-
Notifications
You must be signed in to change notification settings - Fork 72
242 lines (237 loc) · 12.3 KB
/
wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
name: Build wheels
on:
# pull_request: # Uncomment to debug wheel building in a PR
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
wheels:
name: "Build ${{ matrix.build }} wheel"
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
include:
# # Automaticaly generated via code below. See build and arch tables here:
# # Builds: https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
# # Archs: https://cibuildwheel.readthedocs.io/en/stable/options/#archs
# # This probably isn't the preferred way to do things :shrug:
#
# # PyPy may have issues. Intermittent failures have been seen on:
# # pp39-manylinux_aarch64 pp38-win_amd64
#
# import itertools
#
# pys = ['cp38', 'cp39', 'cp310', 'cp311', 'cp312', 'cp313']
# pys_arm = ['cp38', 'cp39', 'cp310', 'cp311', 'cp312', 'cp313']
# pypys = ['pp38', 'pp39', 'pp310']
# SKIP = set() # {"pp39-manylinux_aarch64", "pp38-win_amd64"}
# combos = []
#
# # Linux
# for py, dist, arch in itertools.product(
# pys,
# ['manylinux', 'musllinux'],
# ['x86_64', 'i686', 'aarch64', 'ppc64le', 's390x']
# ):
# combos.append(('ubuntu', f'{py}-{dist}_{arch}', arch))
# for py, arch in itertools.product(pypys, ['x86_64', 'i686', 'aarch64']):
# combos.append(('ubuntu', f'{py}-manylinux_{arch}', arch))
#
# # MacOS
# for py in pys:
# combos.append(('macos', f'{py}-macosx_x86_64', 'x86_64'))
# for py in pys_arm:
# combos.append(('macos', f'{py}-macosx_arm64', 'arm64'))
# for py in pypys:
# combos.append(('macos', f'{py}-macosx_x86_64', 'x86_64'))
#
# # Windows (win_arm64 skipped for now)
# for py in pys:
# combos.append(('windows', f'{py}-win32', 'x86'))
# for py in pys:
# combos.append(('windows', f'{py}-win_amd64', 'AMD64'))
# for py in pypys:
# combos.append(('windows', f'{py}-win_amd64', 'AMD64'))
#
# # Sort, filter, and print combinations
# for os, build, arch in sorted(combos, key=lambda x: (x[0], x[1].replace('310', '390').replace('311', '391').replace('312', '392').replace('313', '393'), x[2])):
# skip = "# " if build in SKIP else ""
# print(f' {skip}- {{"os": "{os}", "build": "{build}", "arch": "{arch}"}}')
- {"os": "macos", "build": "cp38-macosx_arm64", "arch": "arm64"}
- {"os": "macos", "build": "cp38-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "cp39-macosx_arm64", "arch": "arm64"}
- {"os": "macos", "build": "cp39-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "cp310-macosx_arm64", "arch": "arm64"}
- {"os": "macos", "build": "cp310-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "cp311-macosx_arm64", "arch": "arm64"}
- {"os": "macos", "build": "cp311-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "cp312-macosx_arm64", "arch": "arm64"}
- {"os": "macos", "build": "cp312-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "cp313-macosx_arm64", "arch": "arm64"}
- {"os": "macos", "build": "cp313-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "pp38-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "pp39-macosx_x86_64", "arch": "x86_64"}
- {"os": "macos", "build": "pp310-macosx_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp38-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp38-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp38-manylinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp38-manylinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp38-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp38-musllinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp38-musllinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp38-musllinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp38-musllinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp38-musllinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp39-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp39-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp39-manylinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp39-manylinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp39-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp39-musllinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp39-musllinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp39-musllinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp39-musllinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp39-musllinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp310-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp310-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp310-manylinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp310-manylinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp310-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp310-musllinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp310-musllinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp310-musllinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp310-musllinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp310-musllinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp311-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp311-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp311-manylinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp311-manylinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp311-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp311-musllinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp311-musllinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp311-musllinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp311-musllinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp311-musllinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp312-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp312-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp312-manylinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp312-manylinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp312-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp312-musllinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp312-musllinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp312-musllinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp312-musllinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp312-musllinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp313-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp313-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp313-manylinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp313-manylinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp313-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "cp313-musllinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "cp313-musllinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "cp313-musllinux_ppc64le", "arch": "ppc64le"}
- {"os": "ubuntu", "build": "cp313-musllinux_s390x", "arch": "s390x"}
- {"os": "ubuntu", "build": "cp313-musllinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "pp38-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "pp38-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "pp38-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "pp39-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "pp39-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "pp39-manylinux_x86_64", "arch": "x86_64"}
- {"os": "ubuntu", "build": "pp310-manylinux_aarch64", "arch": "aarch64"}
- {"os": "ubuntu", "build": "pp310-manylinux_i686", "arch": "i686"}
- {"os": "ubuntu", "build": "pp310-manylinux_x86_64", "arch": "x86_64"}
- {"os": "windows", "build": "cp38-win32", "arch": "x86"}
- {"os": "windows", "build": "cp38-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "cp39-win32", "arch": "x86"}
- {"os": "windows", "build": "cp39-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "cp310-win32", "arch": "x86"}
- {"os": "windows", "build": "cp310-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "cp311-win32", "arch": "x86"}
- {"os": "windows", "build": "cp311-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "cp312-win32", "arch": "x86"}
- {"os": "windows", "build": "cp312-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "cp313-win32", "arch": "x86"}
- {"os": "windows", "build": "cp313-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "pp38-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "pp39-win_amd64", "arch": "AMD64"}
- {"os": "windows", "build": "pp310-win_amd64", "arch": "AMD64"}
steps:
- name: Setup QEMU
if: ${{ matrix.os == 'ubuntu' }}
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: ${{ matrix.arch }}
- name: List wheels
run: |
ls -al wheelhouse/
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: wheelhouse/*.whl
retention-days: 7
sdist:
name: Build source distribution
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel cython
- name: Build sdist
run: python setup.py sdist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.gz
retention-days: 7
upload_all:
needs: [wheels, sdist]
runs-on: ubuntu-latest
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: List artifacts
run: |
ls -al dist/
- name: Publish to PyPI
uses: pypa/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}