Skip to content

Commit

Permalink
Split wheel builds into manylinux and musllinux groups to speed up CI (
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 12, 2024
1 parent 1123fae commit 5c04558
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,19 @@ jobs:
- ubuntu
- windows
- macos
tag:
- manylinux
- musllinux
exclude:
- tag: >-
${{
(github.event_name != 'push' || !contains(github.ref, 'refs/tags/'))
&& 'musllinux' || ''
}}
uses: ./.github/workflows/reusable-build-wheel.yml
with:
os: ${{ matrix.os }}
tag: ${{ matrix.tag }}
wheel-tags-to-skip: >-
${{
(github.event_name != 'push' || !contains(github.ref, 'refs/tags/'))
Expand Down Expand Up @@ -467,9 +477,16 @@ jobs:
- ppc64le
- s390x
- armv7l
tag:
- manylinux
- musllinux
exclude:
- tag: manylinux
qemu: armv7l
uses: ./.github/workflows/reusable-build-wheel.yml
with:
qemu: ${{ matrix.qemu }}
tag: ${{ matrix.tag }}
source-tarball-name: >-
${{ needs.build-pure-python-dists.outputs.sdist-filename }}
dists-artifact-name: ${{ needs.pre-setup.outputs.dists-artifact-name }}
Expand Down
26 changes: 23 additions & 3 deletions .github/workflows/reusable-build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
default: ''
required: false
type: string
tag:
description: Build platform tag wheels
default: '0'
required: false
type: string
source-tarball-name:
description: Sdist filename wildcard
required: true
Expand All @@ -42,7 +47,8 @@ env:
jobs:

build-wheel:
name: Build wheels on ${{ inputs.os }} ${{ inputs.qemu }}
name: >-
Build wheels on ${{ inputs.os }} ${{ inputs.qemu }} ${{ inputs.tag }}
runs-on: ${{ inputs.os }}-latest
timeout-minutes: ${{ inputs.qemu && 60 || 20 }}
steps:
Expand Down Expand Up @@ -72,6 +78,18 @@ jobs:
echo "CIBW_SKIP=${{ inputs.wheel-tags-to-skip }}" >> "${GITHUB_ENV}"
shell: bash

- name: Skip manylinux wheels
if: inputs.tag == 'musllinux'
run: |
echo "CIBW_SKIP=$CIBW_SKIP *manylinux*" >> "${GITHUB_ENV}"
shell: bash

- name: Skip musllinux wheels
if: inputs.tag == 'manylinux'
run: |
echo "CIBW_SKIP=$CIBW_SKIP *musllinux*" >> "${GITHUB_ENV}"
shell: bash

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
env:
Expand All @@ -83,8 +101,10 @@ jobs:
- name: Upload built artifacts for testing and publishing
uses: actions/upload-artifact@v4
with:
name: >-
${{ inputs.dists-artifact-name }}-${{ inputs.os }}-${{ inputs.qemu }}
name: ${{ inputs.dists-artifact-name }}-
${{ inputs.os }}-
${{ inputs.qemu }}-
${{ inputs.tag }}
path: ./wheelhouse/*.whl

...

0 comments on commit 5c04558

Please sign in to comment.