1
1
name : Full Build
2
2
3
+
3
4
on :
5
+ push :
6
+ pull_request :
4
7
release :
5
8
types :
6
9
- published
7
10
8
- workflow_dispatch :
9
-
10
11
jobs :
11
12
build_sdist :
12
13
name : Build source distribution
@@ -16,14 +17,14 @@ jobs:
16
17
with :
17
18
submodules : ' true'
18
19
19
- - uses : actions/setup-python@v4
20
+ - uses : actions/setup-python@v5
20
21
with :
21
22
python-version : " 3.12"
22
23
23
24
- name : Install dependencies
24
25
run : |
25
26
python -m pip install --upgrade pip
26
- pip install Cython==3.0.7
27
+ pip install Cython==3.0.12
27
28
28
29
# The cythonized files allow installation from the sdist without cython
29
30
- name : Generate cython
@@ -33,13 +34,15 @@ jobs:
33
34
34
35
- name : Build sdist
35
36
run : |
36
- pip3 install build; python3 -m build --sdist
37
+ git apply ./tools/sdist.patch
38
+ pip3 install build
39
+ python3 -m build --sdist
37
40
# test whether tarball contains all files required for compiling
38
41
pip3 install dist/cydifflib-*.tar.gz
39
- pip3 uninstall cydifflib --yes
40
42
41
- - uses : actions/upload-artifact@v3
43
+ - uses : actions/upload-artifact@v4
42
44
with :
45
+ name : artifact-sdist
43
46
path : dist/*.tar.gz
44
47
45
48
build_wheels_windows :
@@ -50,98 +53,74 @@ jobs:
50
53
fail-fast : false
51
54
matrix :
52
55
arch : [auto32, auto64, ARM64]
53
- python_tag : ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp38-*", "pp39-*"]
54
- exclude :
55
- # PyPy only supports x86_64 on Windows
56
- - arch : auto32
57
- python_tag : " pp38-*"
58
- - arch : auto32
59
- python_tag : " pp39-*"
60
-
61
- # ARM64 only supported only supported on cpython >= 3.9
62
- - arch : ARM64
63
- python_tag : " pp38-*"
64
- - arch : ARM64
65
- python_tag : " pp39-*"
66
- - arch : ARM64
67
- python_tag : " cp38-*"
68
56
env :
69
- CIBW_BUILD : ${{matrix.python_tag}}
70
57
CIBW_ARCHS : ${{matrix.arch}}
71
58
CIBW_TEST_SKIP : " *-win32"
72
59
CIBW_TEST_REQUIRES : pytest
73
60
CIBW_TEST_COMMAND : pytest {package}/tests
74
61
CIBW_BUILD_VERBOSITY : 3
62
+ CIBW_PROJECT_REQUIRES_PYTHON : " >=3.9"
75
63
76
64
steps :
77
- - uses : actions/download-artifact@v3
65
+ - uses : actions/download-artifact@v4
78
66
with :
79
- name : artifact
67
+ name : artifact-sdist
80
68
path : dist
81
69
82
70
- name : Copy wheel
83
71
run : copy dist/*.tar.gz cydifflib.tar.gz
84
72
85
- - uses : actions/setup-python@v4
73
+ - uses : actions/setup-python@v5
86
74
87
75
- name : Build wheels
88
- uses : pypa/cibuildwheel@v2.16.5
76
+ uses : pypa/cibuildwheel@v2.23.2
89
77
with :
90
78
package-dir : cydifflib.tar.gz
91
79
output-dir : wheelhouse
92
80
93
81
- name : Upload wheels
94
- uses : actions/upload-artifact@v3
82
+ uses : actions/upload-artifact@v4
95
83
with :
84
+ name : artifact-${{ github.job }}-${{ strategy.job-index }}
96
85
path : ./wheelhouse/*.whl
97
86
98
87
build_wheels_macos :
99
88
name : Build wheel on ${{ matrix.os }}/auto/${{matrix.python_tag}}
100
89
needs : [build_sdist]
101
- runs-on : macos-latest
90
+ runs-on : ${{ matrix.os }}
102
91
strategy :
103
92
fail-fast : false
104
93
matrix :
105
- arch : [x86_64, arm64, universal2]
106
- python_tag : ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp38-*", "pp39-*"]
107
- exclude :
108
- # PyPy not supported on MacOS Arm
109
- - arch : arm64
110
- python_tag : " pp38-*"
111
- - arch : arm64
112
- python_tag : " pp39-*"
113
- - arch : universal2
114
- python_tag : " pp38-*"
115
- - arch : universal2
116
- python_tag : " pp39-*"
94
+ os : [macos-13, macos-14]
117
95
env :
118
- CIBW_BUILD : ${{matrix.python_tag}}
119
- CIBW_ARCHS : ${{matrix.arch}}
120
- CIBW_TEST_SKIP : " {*-macosx_{arm64,universal2},pp*-macosx_*}"
96
+ CIBW_ARCHS : native
97
+ CIBW_TEST_SKIP : " pp*-macosx_*"
121
98
CIBW_TEST_REQUIRES : pytest
122
99
CIBW_TEST_COMMAND : pytest {package}/tests
123
100
CIBW_BUILD_VERBOSITY : 3
101
+ CIBW_PROJECT_REQUIRES_PYTHON : " >=3.9"
124
102
125
103
steps :
126
- - uses : actions/download-artifact@v3
104
+ - uses : actions/download-artifact@v4
127
105
with :
128
- name : artifact
106
+ name : artifact-sdist
129
107
path : dist
130
108
131
- - uses : actions/setup-python@v4
109
+ - uses : actions/setup-python@v5
132
110
133
111
- name : Copy wheel
134
112
run : cp dist/*.tar.gz cydifflib.tar.gz
135
113
136
114
- name : Build wheels
137
- uses : pypa/cibuildwheel@v2.16.5
115
+ uses : pypa/cibuildwheel@v2.23.2
138
116
with :
139
117
package-dir : cydifflib.tar.gz
140
118
output-dir : wheelhouse
141
119
142
120
- name : Upload wheels
143
- uses : actions/upload-artifact@v3
121
+ uses : actions/upload-artifact@v4
144
122
with :
123
+ name : artifact-${{ github.job }}-${{ strategy.job-index }}
145
124
path : ./wheelhouse/*.whl
146
125
147
126
build_wheels_linux :
@@ -152,48 +131,88 @@ jobs:
152
131
fail-fast : false
153
132
matrix :
154
133
arch : [auto, aarch64, ppc64le, s390x]
155
- python_tag : ["cp38 -*", "cp39 -*", "cp310 -*", "cp311 -*", "cp312 -*", "pp38 -*", "pp39 -*"]
134
+ python_tag : ["cp39 -*", "cp310 -*", "cp311 -*", "cp312 -*", "cp313 -*", "pp39 -*", "pp310-*", "pp311 -*"]
156
135
exclude :
157
136
# PyPy builds not available for these platforms
158
137
- arch : ppc64le
159
- python_tag : " pp38-*"
138
+ python_tag : " pp39-*"
139
+ - arch : ppc64le
140
+ python_tag : " pp310-*"
160
141
- arch : ppc64le
142
+ python_tag : " pp311-*"
143
+ - arch : s390x
161
144
python_tag : " pp39-*"
162
145
- arch : s390x
163
- python_tag : " pp38 -*"
146
+ python_tag : " pp310 -*"
164
147
- arch : s390x
165
- python_tag : " pp39 -*"
148
+ python_tag : " pp311 -*"
166
149
env :
167
150
CIBW_ARCHS_LINUX : ${{matrix.arch}}
168
151
CIBW_BUILD : ${{matrix.python_tag}}
169
- CIBW_TEST_SKIP : " {*_{aarch64,ppc64le,s390x},*musllinux_*,pp38-* }"
152
+ CIBW_TEST_SKIP : " {*_{aarch64,ppc64le,s390x},*musllinux_*}"
170
153
CIBW_TEST_REQUIRES : pytest
171
154
CIBW_TEST_COMMAND : pytest {package}/tests
172
155
CIBW_BUILD_VERBOSITY : 3
173
156
174
157
steps :
175
- - uses : actions/download-artifact@v3
158
+ - uses : actions/download-artifact@v4
176
159
with :
177
- name : artifact
160
+ name : artifact-sdist
178
161
path : dist
179
162
180
- - uses : actions/setup-python@v4
163
+ - uses : actions/setup-python@v5
181
164
182
165
- name : Copy wheel
183
166
run : cp dist/*.tar.gz cydifflib.tar.gz
184
167
185
- - uses : docker/setup-qemu-action@v2
168
+ - uses : docker/setup-qemu-action@v3
186
169
name : Set up QEMU
187
170
188
171
- name : Build wheel
189
- uses : pypa/cibuildwheel@v2.16.5
172
+ uses : pypa/cibuildwheel@v2.23.2
173
+ with :
174
+ package-dir : cydifflib.tar.gz
175
+ output-dir : wheelhouse
176
+
177
+ - name : Upload wheels
178
+ uses : actions/upload-artifact@v4
179
+ with :
180
+ name : artifact-${{ github.job }}-${{ strategy.job-index }}
181
+ path : ./wheelhouse/*.whl
182
+
183
+ build_wheels_pyodide :
184
+ name : Build wheels on ubuntu-latest/pyodide
185
+ needs : [build_sdist]
186
+ runs-on : ubuntu-latest
187
+ env :
188
+ CIBW_TEST_REQUIRES : pytest hypothesis
189
+ CIBW_TEST_COMMAND : pytest {package}/tests
190
+ CIBW_PLATFORM : pyodide
191
+ CIBW_BUILD_VERBOSITY : 3
192
+
193
+ steps :
194
+ - uses : actions/download-artifact@v4
195
+ with :
196
+ name : artifact-sdist
197
+ path : dist
198
+
199
+ - uses : actions/setup-python@v5
200
+ with :
201
+ python-version : " 3.12"
202
+
203
+ - name : Copy wheel
204
+ run : cp dist/*.tar.gz cydifflib.tar.gz
205
+
206
+ - name : Build wheel
207
+ uses : pypa/cibuildwheel@v2.23.2
190
208
with :
191
209
package-dir : cydifflib.tar.gz
192
210
output-dir : wheelhouse
193
211
194
212
- name : Upload wheels
195
- uses : actions/upload-artifact@v3
213
+ uses : actions/upload-artifact@v4
196
214
with :
215
+ name : pyodide-wheel
197
216
path : ./wheelhouse/*.whl
198
217
199
218
deploy-wheels :
@@ -206,9 +225,10 @@ jobs:
206
225
id-token : write
207
226
208
227
steps :
209
- - uses : actions/download-artifact@v3
228
+ - uses : actions/download-artifact@v4
210
229
with :
211
- name : artifact
212
230
path : dist
231
+ pattern : artifact-*
232
+ merge-multiple : true
213
233
214
- - uses : pypa/gh-action-pypi-publish@v1.8.11
234
+ - uses : pypa/gh-action-pypi-publish@v1.12.4
0 commit comments