Skip to content

(self-hosted) Build and Publish Wheels #16

(self-hosted) Build and Publish Wheels

(self-hosted) Build and Publish Wheels #16

Workflow file for this run

name: (self-hosted) Build and Publish Wheels
on: workflow_dispatch
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- os: macOS-ARM
runner: [self-hosted, macOS, ARM64]
archs: arm64
cibw_build: cp39-macosx_arm64 cp310-macosx_arm64 cp311-macosx_arm64 cp312-macosx_arm64
- os: manylinux
runner: [self-hosted, Ubuntu, Native]
archs: auto
cibw_build: cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64
- os: windows
runner: [self-hosted, Windows]
archs: auto
cibw_build: cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9 # Works as bootstrap for cibuildwheel
- name: Install cibuildwheel and nox
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==2.16.2
python -m pip install nox
- name: Build sdist (only on Windows)
if: matrix.os == 'windows'
run: python -m nox --sessions build_sdist
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_ARCHS: ${{ matrix.archs }}
- name: Test wheels (only on macOS ARM64)
if: matrix.os == 'macOS-ARM'
run: python -m nox --sessions test_wheel
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*