@@ -117,9 +117,9 @@ jobs:
117
117
118
118
steps :
119
119
- name : checkout
120
- uses : actions/checkout@v2
120
+ uses : actions/checkout@v3
121
121
- name : Set up Python ${{ matrix.python-version }}
122
- uses : actions/setup-python@v2
122
+ uses : actions/setup-python@v4
123
123
with :
124
124
python-version : ${{ matrix.python-version }}
125
125
# ##
@@ -134,7 +134,7 @@ jobs:
134
134
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
135
135
136
136
- name : pip cache
137
- uses : actions/cache@v2
137
+ uses : actions/cache@v3
138
138
with :
139
139
path : ${{ steps.pip-cache.outputs.dir }}
140
140
key : ${{ runner.os }}-pip-${{ matrix.python-version }}
@@ -154,40 +154,90 @@ jobs:
154
154
pip install -U pip
155
155
pip install -U setuptools wheel twine cffi
156
156
157
- - name : Build zope.interface (Python 3.10 on MacOS )
157
+ - name : Build zope.interface (macOS x86_64, Python 3.8+ )
158
158
if : >
159
159
startsWith(runner.os, 'Mac')
160
- && startsWith(matrix.python-version, '3.10')
160
+ && !(startsWith(matrix.python-version, 'pypy')
161
+ || matrix.python-version == '2.7'
162
+ || matrix.python-version == '3.5'
163
+ || matrix.python-version == '3.6'
164
+ || matrix.python-version == '3.7')
161
165
env :
162
- _PYTHON_HOST_PLATFORM : macosx-11-x86_64
166
+ MACOSX_DEPLOYMENT_TARGET : 10.9
167
+ _PYTHON_HOST_PLATFORM : macosx-10.9-x86_64
168
+ ARCHFLAGS : -arch x86_64
169
+ run : |
170
+ # Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
171
+ # output (pip install uses a random temporary directory, making this difficult).
172
+ python setup.py build_ext -i
173
+ python setup.py bdist_wheel
174
+ - name : Build zope.interface (macOS arm64, Python 3.8+)
175
+ if : >
176
+ startsWith(runner.os, 'Mac')
177
+ && !(startsWith(matrix.python-version, 'pypy')
178
+ || matrix.python-version == '2.7'
179
+ || matrix.python-version == '3.5'
180
+ || matrix.python-version == '3.6'
181
+ || matrix.python-version == '3.7')
182
+ env :
183
+ MACOSX_DEPLOYMENT_TARGET : 11.0
184
+ _PYTHON_HOST_PLATFORM : macosx-11.0-arm64
185
+ ARCHFLAGS : -arch arm64
163
186
run : |
164
187
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
165
188
# output (pip install uses a random temporary directory, making this difficult).
166
189
python setup.py build_ext -i
167
190
python setup.py bdist_wheel
168
- # Also install it, so that we get dependencies in the (pip) cache.
169
- pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"'
170
- pip install .[test]
171
-
172
191
- name : Build zope.interface (all other versions)
173
192
if : >
174
193
!startsWith(runner.os, 'Mac')
175
- || !startsWith(matrix.python-version, '3.10')
194
+ || startsWith(matrix.python-version, 'pypy')
195
+ || matrix.python-version == '2.7'
196
+ || matrix.python-version == '3.5'
197
+ || matrix.python-version == '3.6'
198
+ || matrix.python-version == '3.7'
176
199
run : |
177
200
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
178
201
# output (pip install uses a random temporary directory, making this difficult).
179
202
python setup.py build_ext -i
180
203
python setup.py bdist_wheel
181
- # Also install it, so that we get dependencies in the (pip) cache.
204
+
205
+ - name : Install zope.interface and dependencies
206
+ run : |
207
+ # Install to collect dependencies into the (pip) cache.
182
208
pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"'
183
209
pip install .[test]
184
210
185
211
- name : Check zope.interface build
186
212
run : |
187
213
ls -l dist
188
214
twine check dist/*
189
- - name : Upload zope.interface wheel
190
- uses : actions/upload-artifact@v2
215
+ - name : Upload zope.interface wheel (macOS x86_64)
216
+ if : >
217
+ startsWith(runner.os, 'Mac')
218
+ uses : actions/upload-artifact@v3
219
+ with :
220
+ name : zope.interface-${{ runner.os }}-${{ matrix.python-version }}.whl
221
+ path : dist/*x86_64.whl
222
+ - name : Upload zope.interface wheel (macOS arm64)
223
+ if : >
224
+ startsWith(runner.os, 'Mac')
225
+ && !(startsWith(matrix.python-version, 'pypy')
226
+ || matrix.python-version == '2.7'
227
+ || matrix.python-version == '3.5'
228
+ || matrix.python-version == '3.6'
229
+ || matrix.python-version == '3.7')
230
+ uses : actions/upload-artifact@v3
231
+ with :
232
+ # The arm64 wheel is uploaded with a different name just so it can be
233
+ # manually downloaded when desired. The wheel itself *cannot* be tested
234
+ # on the GHA runner, which uses x86_64 architecture.
235
+ name : zope.interface-${{ runner.os }}-${{ matrix.python-version }}-arm64.whl
236
+ path : dist/*arm64.whl
237
+ - name : Upload zope.interface wheel (all other platforms)
238
+ if : >
239
+ !startsWith(runner.os, 'Mac')
240
+ uses : actions/upload-artifact@v3
191
241
with :
192
242
name : zope.interface-${{ runner.os }}-${{ matrix.python-version }}.whl
193
243
path : dist/*whl
@@ -233,9 +283,9 @@ jobs:
233
283
234
284
steps :
235
285
- name : checkout
236
- uses : actions/checkout@v2
286
+ uses : actions/checkout@v3
237
287
- name : Set up Python ${{ matrix.python-version }}
238
- uses : actions/setup-python@v2
288
+ uses : actions/setup-python@v4
239
289
with :
240
290
python-version : ${{ matrix.python-version }}
241
291
# ##
@@ -250,15 +300,15 @@ jobs:
250
300
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
251
301
252
302
- name : pip cache
253
- uses : actions/cache@v2
303
+ uses : actions/cache@v3
254
304
with :
255
305
path : ${{ steps.pip-cache.outputs.dir }}
256
306
key : ${{ runner.os }}-pip-${{ matrix.python-version }}
257
307
restore-keys : |
258
308
${{ runner.os }}-pip-
259
309
260
310
- name : Download zope.interface wheel
261
- uses : actions/download-artifact@v2
311
+ uses : actions/download-artifact@v3
262
312
with :
263
313
name : zope.interface-${{ runner.os }}-${{ matrix.python-version }}.whl
264
314
path : dist/
@@ -310,9 +360,9 @@ jobs:
310
360
311
361
steps :
312
362
- name : checkout
313
- uses : actions/checkout@v2
363
+ uses : actions/checkout@v3
314
364
- name : Set up Python ${{ matrix.python-version }}
315
- uses : actions/setup-python@v2
365
+ uses : actions/setup-python@v4
316
366
with :
317
367
python-version : ${{ matrix.python-version }}
318
368
# ##
@@ -327,15 +377,15 @@ jobs:
327
377
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
328
378
329
379
- name : pip cache
330
- uses : actions/cache@v2
380
+ uses : actions/cache@v3
331
381
with :
332
382
path : ${{ steps.pip-cache.outputs.dir }}
333
383
key : ${{ runner.os }}-pip-${{ matrix.python-version }}
334
384
restore-keys : |
335
385
${{ runner.os }}-pip-
336
386
337
387
- name : Download zope.interface wheel
338
- uses : actions/download-artifact@v2
388
+ uses : actions/download-artifact@v3
339
389
with :
340
390
name : zope.interface-${{ runner.os }}-${{ matrix.python-version }}.whl
341
391
path : dist/
@@ -361,9 +411,9 @@ jobs:
361
411
362
412
steps :
363
413
- name : checkout
364
- uses : actions/checkout@v2
414
+ uses : actions/checkout@v3
365
415
- name : Set up Python ${{ matrix.python-version }}
366
- uses : actions/setup-python@v2
416
+ uses : actions/setup-python@v4
367
417
with :
368
418
python-version : ${{ matrix.python-version }}
369
419
# ##
@@ -378,15 +428,15 @@ jobs:
378
428
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
379
429
380
430
- name : pip cache
381
- uses : actions/cache@v2
431
+ uses : actions/cache@v3
382
432
with :
383
433
path : ${{ steps.pip-cache.outputs.dir }}
384
434
key : ${{ runner.os }}-pip-${{ matrix.python-version }}
385
435
restore-keys : |
386
436
${{ runner.os }}-pip-
387
437
388
438
- name : Download zope.interface wheel
389
- uses : actions/download-artifact@v2
439
+ uses : actions/download-artifact@v3
390
440
with :
391
441
name : zope.interface-${{ runner.os }}-${{ matrix.python-version }}.whl
392
442
path : dist/
@@ -414,9 +464,9 @@ jobs:
414
464
415
465
steps :
416
466
- name : checkout
417
- uses : actions/checkout@v2
467
+ uses : actions/checkout@v3
418
468
- name : Set up Python ${{ matrix.python-version }}
419
- uses : actions/setup-python@v2
469
+ uses : actions/setup-python@v4
420
470
with :
421
471
python-version : ${{ matrix.python-version }}
422
472
# ##
@@ -431,7 +481,7 @@ jobs:
431
481
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
432
482
433
483
- name : pip cache
434
- uses : actions/cache@v2
484
+ uses : actions/cache@v3
435
485
with :
436
486
path : ${{ steps.pip-cache.outputs.dir }}
437
487
key : ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }}
@@ -468,14 +518,14 @@ jobs:
468
518
bash .manylinux.sh
469
519
470
520
- name : Upload zope.interface wheels
471
- uses : actions/upload-artifact@v2
521
+ uses : actions/upload-artifact@v3
472
522
with :
473
523
path : wheelhouse/*whl
474
524
name : manylinux_${{ matrix.image }}_wheels.zip
475
525
- name : Restore pip cache permissions
476
526
run : sudo chown -R $(whoami) ${{ steps.pip-cache.outputs.dir }}
477
527
- name : Publish package to PyPI
478
- uses : pypa/gh-action-pypi-publish@v1.4.1
528
+ uses : pypa/gh-action-pypi-publish@release/v1
479
529
if : >
480
530
github.event_name == 'push'
481
531
&& startsWith(github.ref, 'refs/tags')
0 commit comments