@@ -267,6 +267,7 @@ jobs:
267267 if : ${{ ! contains(matrix.spec, 'x86_64') }}
268268
269269 - name : build/test wheels
270+ uses : pypa/cibuildwheel@v2.18.1
270271 env :
271272 CFLAGS : -Dffi_call=cffistatic_ffi_call # override name for ffi_call to break hard if we linked against someone else's libffi
272273 CIBW_ARCHS_LINUX : all
@@ -292,29 +293,21 @@ jobs:
292293 CIBW_PRERELEASE_PYTHONS : ' True'
293294 CIBW_TEST_REQUIRES : pytest setuptools # 3.12+ no longer includes distutils, just always ensure setuptools is present
294295 CIBW_TEST_COMMAND : PYTHONUNBUFFERED=1 python -m pytest ${{ matrix.test_args || '{project}' }} # default to test all
295- run : |
296- set -eux
297-
298- mkdir cffi
299-
300- tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz/cffi*.tar.gz --strip-components=1 -C cffi
301- python -m pip install --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
302-
303- # actually build libffi + wheel (using env tweaks above)
304- python -m cibuildwheel --output-dir dist ./cffi
305-
306- shell : bash
296+ with :
297+ package-dir : >-
298+ ${{ steps.fetch_sdist.outputs.download-path
299+ }}/${{ needs.python_sdist.outputs.artifact_name }}
307300
308301 - name : determine built wheel filename
309302 id : built-artifact-lookup
310- run : echo "artifact_name=$(ls ./dist /)" >> "${GITHUB_OUTPUT}"
303+ run : echo "artifact_name=$(ls ./wheelhouse /)" >> "${GITHUB_OUTPUT}"
311304 shell : bash -eEuxo pipefail {0}
312305
313306 - name : upload artifacts
314307 uses : actions/upload-artifact@v4
315308 with :
316309 name : ${{ steps.built-artifact-lookup.outputs.artifact_name }}
317- path : dist /${{ steps.built-artifact-lookup.outputs.artifact_name }}
310+ path : wheelhouse /${{ steps.built-artifact-lookup.outputs.artifact_name }}
318311 if-no-files-found : error
319312 if : ${{ env.skip_artifact_upload != 'true' }}
320313
@@ -404,40 +397,33 @@ jobs:
404397 # built-in virtualenv/pip are pinned to busted versions that fail on newer Pythons
405398
406399 - name : build wheel prereqs
407- run : |
408- set -eux
409- python3 -m pip install --user --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
410- brew uninstall --ignore-dependencies libffi 2>&1 || true
400+ run : brew uninstall --ignore-dependencies libffi 2>&1 || true
401+ shell : bash -eux {0}
411402
412403 - name : build/test wheels
404+ uses : pypa/cibuildwheel@v2.18.1
413405 env :
414406 CIBW_BUILD : ${{ matrix.spec }}
415407 CIBW_PRERELEASE_PYTHONS : ' True'
416408 CIBW_TEST_REQUIRES : pytest setuptools
417409 CIBW_TEST_COMMAND : pip install pip --upgrade; cd {project}; PYTHONUNBUFFERED=1 pytest
418410 MACOSX_DEPLOYMENT_TARGET : ${{ matrix.deployment_target || '10.9' }}
419411 SDKROOT : ${{ matrix.sdkroot || 'macosx' }}
420- run : |
421- set -eux
422-
423- mkdir cffi
424-
425- tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz/cffi*.tar.gz --strip-components=1 -C cffi
426-
427- python3 -m cibuildwheel --output-dir dist cffi
428-
429- shell : bash
412+ with :
413+ package-dir : >-
414+ ${{ steps.fetch_sdist.outputs.download-path
415+ }}/${{ needs.python_sdist.outputs.artifact_name }}
430416
431417 - name : determine built wheel filename
432418 id : built-artifact-lookup
433- run : echo "artifact_name=$(ls ./dist /)" >> "${GITHUB_OUTPUT}"
419+ run : echo "artifact_name=$(ls ./wheelhouse /)" >> "${GITHUB_OUTPUT}"
434420 shell : bash -eEuxo pipefail {0}
435421
436422 - name : upload artifacts
437423 uses : actions/upload-artifact@v4
438424 with :
439425 name : ${{ steps.built-artifact-lookup.outputs.artifact_name }}
440- path : dist /${{ steps.built-artifact-lookup.outputs.artifact_name }}
426+ path : wheelhouse /${{ steps.built-artifact-lookup.outputs.artifact_name }}
441427 if-no-files-found : error
442428 if : ${{ env.skip_artifact_upload != 'true' }}
443429
@@ -505,36 +491,29 @@ jobs:
505491 name : ${{ needs.python_sdist.outputs.artifact_name }}
506492
507493 - name : build/test wheels
494+ uses : pypa/cibuildwheel@v2.18.1
508495 env :
509496 CIBW_BUILD : ${{ matrix.spec }}
510497 CIBW_PRERELEASE_PYTHONS : ' True'
511498 CIBW_TEST_REQUIRES : pytest setuptools
512499 CIBW_TEST_COMMAND : ' python -m pytest {package}/src/c'
513500 # FIXME: /testing takes ~45min on Windows and has some failures...
514501 # CIBW_TEST_COMMAND='python -m pytest {package}/src/c {project}/testing'
515- run : |
516- set -eux
517-
518- mkdir cffi
519-
520- tar zxf cffi*.tar.gz/cffi*.tar.gz --strip-components=1 -C cffi
521-
522- python -m pip install --upgrade pip
523- pip install "${{ matrix.cibw_version || 'cibuildwheel'}}"
524- python -m cibuildwheel --output-dir dist cffi
525-
526- shell : bash
502+ with :
503+ package-dir : >-
504+ ${{ steps.fetch_sdist.outputs.download-path
505+ }}/${{ needs.python_sdist.outputs.artifact_name }}
527506
528507 - name : determine built wheel filename
529508 id : built-artifact-lookup
530- run : echo "artifact_name=$(ls ./dist /)" >> "${GITHUB_OUTPUT}"
509+ run : echo "artifact_name=$(ls ./wheelhouse /)" >> "${GITHUB_OUTPUT}"
531510 shell : bash -eEuxo pipefail {0}
532511
533512 - name : upload artifacts
534513 uses : actions/upload-artifact@v4
535514 with :
536515 name : ${{ steps.built-artifact-lookup.outputs.artifact_name }}
537- path : dist /${{ steps.built-artifact-lookup.outputs.artifact_name }}
516+ path : wheelhouse /${{ steps.built-artifact-lookup.outputs.artifact_name }}
538517 if-no-files-found : error
539518 if : ${{ env.skip_artifact_upload != 'true' }}
540519
0 commit comments