Skip to content

Test build wheel

Test build wheel #77

Workflow file for this run

name: Test build wheel
on:
workflow_dispatch:
jobs:
build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
matrix:
# From wheel.yml of numpy (https://github.com/numpy/numpy/blob/main/.github/workflows/wheels.yml):
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
# - [ubuntu-22.04, manylinux_x86_64]
- [ubuntu-22.04, musllinux_x86_64]
# - [ubuntu-22.04, manylinux_aarch64]
# - [ubuntu-22.04, musllinux_aarch64]
# - [macos-12, macosx_x86_64]
# - [macos-12, macosx_arm64]
# - [windows-2022, win_amd64]
# - [windows-2022, win32]
# python: ["cp38", "cp39", "cp310", "cp311", "cp312", "pp39"]
python: ["cp310"]
exclude:
- buildplat: [windows-2022, win32]
python: "pp39"
- buildplat: [ ubuntu-22.04, musllinux_x86_64 ]
python: "pp39"
- buildplat: [ ubuntu-22.04, musllinux_aarch64 ]
python: "pp39"
- buildplat: [macos-12, macosx_arm64]
python: "pp39"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
if: ${{ contains(matrix.buildplat[1], 'linux_aarch64') }}
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup MSVC (32-bit)
if: ${{ matrix.buildplat[1] == 'win32' }}
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1
with:
architecture: 'x86'
- name: Build wheels for manylinux x86_64
if: ${{ matrix.buildplat[1] == 'manylinux_x86_64' }}
uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
CIBW_ARCHS: 'all'
- name: Build wheels for manylinux aarch64
if: ${{ matrix.buildplat[1] == 'manylinux_aarch64' }}
uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
CIBW_ARCHS: 'all'
- name: Build wheels for musllinux x86_64
if: ${{ matrix.buildplat[1] == 'musllinux_x86_64' }}
uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/musllinux_1_2_x86_64
CIBW_ARCHS: 'all'
- name: Build wheels for musllinux aarch64
if: ${{ matrix.buildplat[1] == 'musllinux_aarch64' }}
uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_MUSLLINUX_AARCH64_IMAGE: quay.io/pypa/musllinux_1_2_aarch64
CIBW_ARCHS: 'all'
- name: Build wheels
if: ${{ !contains(matrix.buildplat[1], 'linux') }}
uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_ARCHS: 'all'
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz