From 99f9065379b07587b8f5d132241318c89736364a Mon Sep 17 00:00:00 2001 From: Riccardo Mori Date: Wed, 19 Jun 2024 17:43:29 +0200 Subject: [PATCH] [CI] Update the CI to build wheels in parallel Notably the wheel for pypy 3.10 on linux i686 (glibc) it has been disabled because of a numpy compilation error. --- .github/workflows/release.yml | 40 ++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c9d628..8b9e268 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,14 +9,27 @@ permissions: jobs: build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Build wheel ${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }} + runs-on: ${{ matrix.buildplat[0] }} strategy: # Ensure that a wheel builder finishes even if another fails fail-fast: false matrix: - os: [ubuntu-22.04] + buildplat: + - [ubuntu-22.04, manylinux_x86_64] + - [ubuntu-22.04, manylinux_i686] + - [ubuntu-22.04, musllinux_x86_64] + - [ubuntu-22.04, musllinux_i686] + python: ["cp310", "cp311", "cp312", "pp310"] + exclude: + - buildplat: [ubuntu-22.04, manylinux_i686] # numpy error + python: "pp310" + # Invalid combinations below + - buildplat: [ubuntu-22.04, musllinux_x86_64] + python: "pp310" + - buildplat: [ubuntu-22.04, musllinux_i686] + python: "pp310" steps: - uses: actions/checkout@v4 @@ -26,25 +39,18 @@ jobs: python-version: '3.11' - name: Install cibuildwheel - run: python -m pip install cibuildwheel - - - name: Set CIBW_PLATFORM environment variable - run: | - if ${{ startsWith(matrix.os, 'ubuntu') }}; then - export CIBW_PLATFORM=linux - elif ${{ startsWith(matrix.os, 'windows') }}; then - export CIBW_PLATFORM=windows - else - export CIBW_PLATFORM=mac - fi + run: python -m pip install cibuildwheel>=2 - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse-${{ matrix.os }} + env: + CIBW_PRERELEASE_PYTHONS: True + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + run: python -m cibuildwheel --output-dir wheelhouse-${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }} - uses: actions/upload-artifact@v4 with: - name: wheelhouse-${{ matrix.os }} - path: ./wheelhouse-${{ matrix.os }}/*.whl + name: wheelhouse-${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }} + path: ./wheelhouse-${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}/*.whl build_sdist: runs-on: ubuntu-latest