diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 5bf5729039c..4726969a45f 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -116,7 +116,9 @@ jobs: - os: ubuntu-latest arch: i686 - os: macos-latest - arch: auto + arch: x86_64 + - os: macos-14 + arch: arm64 env: # SPKGs to install as system packages SPKGS: _bootstrap _prereq @@ -141,6 +143,14 @@ jobs: name: dist path: dist + - uses: actions/setup-python@v5 + # As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx. + # Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743 + id: python + with: + python-version: "3.8 - 3.12" + update-environment: false + - name: Build platform wheels # We build the wheels from the sdists so that MANIFEST filtering becomes effective. # But we must run cibuildwheel with the unpacked source directory, not a tarball, @@ -151,12 +161,13 @@ jobs: # This is unfortunately repeated for each of the packages that we build wheels for # because CIBW starts with a fresh container on each invocation. run: | + "${{ steps.python.outputs.python-path }}" -m pip install pipx export PATH=build/bin:$PATH export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE" mkdir -p unpacked for pkg in sagemath-objects sagemath-categories; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz - pipx run cibuildwheel==2.16.2 unpacked/$pkg* + "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg* done - uses: actions/upload-artifact@v3