Build #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [workflow_dispatch] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }}${{ matrix.musl && ' for musl' || '' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
musl: [false] | |
include: | |
- os: ubuntu-latest | |
musl: true | |
steps: | |
- uses: actions/checkout@v3 | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel | |
# We need docker's cross architecture emulation to build ARM wheels. | |
- if: startsWith(matrix.os, 'ubuntu') | |
uses: crazy-max/[email protected] | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
# Configuration is passed via environment variables. See | |
# https://cibuildwheel.readthedocs.io/en/stable/options/ | |
env: | |
# Platform options | |
CIBW_ARCHS_MACOS: "x86_64 arm64" | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7,<3.13" | |
CIBW_BUILD: ${{ matrix.musl && '*-musllinux_*' || null }} | |
# musl: skip unsupported by NumPy; not musl: skip PyPy and musl | |
CIBW_SKIP: ${{ matrix.musl && 'cp37-musllinux_* cp38-musllinux_*' || 'pp* *-musllinux_*' }} | |
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014" | |
CIBW_ARCHS_LINUX: x86_64 aarch64 | |
# Testing | |
CIBW_TEST_REQUIRES: "-r tests/requirements.txt" | |
CIBW_TEST_COMMAND: pytest {package}/tests | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl |