Skip to content

Build secondary wheels #130

Build secondary wheels

Build secondary wheels #130

name: Build secondary wheels
on:
push:
tags:
- v*
pull_request:
paths:
- '**'
workflow_dispatch:
jobs:
build_wheels:
name: >
Build secondary wheels for py ${{ matrix.py }},
os ${{ matrix.cbw_os }}, arch ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
py: [38, 39, 310]
cbw_os: [dummy]
arch: [dummy]
include:
- os: ubuntu-latest
cbw_os: [manylinux_, musllinux_]
arch: [x86_64, i686]
- os: ubuntu-24.04-arm
cbw_os: [manylinux_, musllinux_]
arch: [aarch64, armv7l]
- os: windows-latest
cbw_os: [win_, win32]
arch: [amd64, arm64, ""]
- os: macos-latest
cbw_os: macosx_
arch: [x86_64, arm64, universal2]
exclude:
- cbw_os: manylinux_
arch: x86_64
- cbw_os: win_
arch: [amd64, ""]
- cbw_os: win32
arch: [amd64, arm64]
- cbw_os: dummy
- arch: dummy
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install uv
- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: >
cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
CIBW_BUILD_FRONTEND: >
${{ matrix.os == 'macos-latest' && 'build' || 'build[uv]' }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -X faulthandler {package}/test/debug.py
&& python -X faulthandler -m pytest -p no:faulthandler
-s {package}
- uses: actions/upload-artifact@v4
with:
name: secondary_wheel_artifact
path: ./wheelhouse/*.whl
build_wheels_qemu:
name: >
Build secondary wheels with QEMU for py ${{ matrix.py }},
os ${{ matrix.cbw_os }}, arch ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
py: [38, 39, 310]
cbw_os: [manylinux_, musllinux_]
arch: [ppc64le, s390x, riscv64]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: >
cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
CIBW_BUILD_FRONTEND: >
${{
matrix.cbw_os == 'manylinux_'
&& 'build[uv]'
|| 'build'
}}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -X faulthandler {package}/test/debug.py
&& python -X faulthandler -m pytest -p no:faulthandler
-s {package}
- uses: actions/upload-artifact@v4
with:
name: >
secondary_wheel_qemu_artifact
path: ./wheelhouse/*.whl
build_old_wheels:
name: Build old wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
cibw_archs: x86_64 i686
- os: ubuntu-24.04-arm
cibw_archs: aarch64 armv7l
- os: windows-latest
cibw_archs: all
- os: macos-latest
cibw_archs: all
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install uv
- name: Build wheels
uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_BUILD: cp3[67]-*
CIBW_BUILD_FRONTEND: build[uv]
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -X faulthandler {package}/test/debug.py
&& python -X faulthandler -m pytest -p no:faulthandler
-s {package}
- uses: actions/upload-artifact@v4
with:
name: old_wheel_artifact_${{ matrix.os }}
path: ./wheelhouse/*.whl
build_old_wheels_qemu:
name: Build old wheels with QEMU on ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ppc64le, s390x]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: cp3[67]-*
CIBW_BUILD_FRONTEND: build[uv]
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -X faulthandler {package}/test/debug.py
&& python -X faulthandler -m pytest -p no:faulthandler
-s {package}
- uses: actions/upload-artifact@v4
with:
name: old_wheel_quemu_artifact_${{ matrix.arch }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist_artifact
path: ./dist/*