Skip to content

Commit

Permalink
Maximize parallellization (#2)
Browse files Browse the repository at this point in the history
* Maximize parallellization

* Bump cibuildwheel==2.10.2

* Prepare for merge
  • Loading branch information
ddelange committed Sep 25, 2022
1 parent 0f98dc0 commit 50277d9
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
submodules: true

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4

- name: Build source distribution
run: |
Expand All @@ -68,28 +68,35 @@ jobs:
name: dist
path: dist/*.tar.*

build-wheels:
build-wheels-matrix:
needs: validate-release-request
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
- run: pip install cibuildwheel==2.10.2
- id: set-matrix
run: |
MATRIX_INCLUDE=$(
{
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -Rc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -Rc '{"only": inputs, "os": "macos-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": inputs, "os": "windows-latest"}'
} | jq -sc
)
echo ::set-output name=include::"$MATRIX_INCLUDE"
build-wheels:
needs: build-wheels-matrix
runs-on: ${{ matrix.os }}
continue-on-error: true
name: Build ${{ matrix.only }}

strategy:
matrix:
include:
- {os: macos-latest, arch: x86_64, build: "*"}
- {os: macos-latest, arch: arm64, build: "*"}
- {os: windows-latest, arch: AMD64, build: "*"}
- {os: windows-latest, arch: x86, build: "*"}
- {os: ubuntu-latest, arch: x86_64, build: "*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[61]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[72]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[83]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[94]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[05]-manylinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[61]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[72]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[83]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[94]-musllinux*"}
- {os: ubuntu-latest, arch: aarch64, build: "*[05]-musllinux*"}
include: ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}

defaults:
run:
Expand All @@ -108,12 +115,11 @@ jobs:
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2

- uses: pypa/cibuildwheel@v2.10.0
- uses: pypa/cibuildwheel@v2.10.2
with:
only: ${{ matrix.only }}
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.build }} # py versions from setup.py -> python_requires
CIBW_SKIP: pp*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28

Expand All @@ -137,7 +143,7 @@ jobs:
submodules: true

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down

0 comments on commit 50277d9

Please sign in to comment.