Build Wheels #52
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 Wheels | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Build sdist | |
run: | | |
python -m pip install build | |
python -m build --sdist . | |
env: | |
SETUPTOOLS_SCM_DEBUG: 1 | |
- name: Check sdist | |
run: | | |
python -m pip install twine | |
twine check dist/* | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sdist | |
path: ./dist/* | |
build_wheels: | |
name: Build wheel for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-13 # Uses x64 | |
- macos-14 # Uses Apple Silicon | |
include: | |
- os: macos-13 | |
deployment_target: "13.0" | |
- os: macos-14 | |
deployment_target: "14.0" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and test | |
uses: pypa/[email protected] | |
env: | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deployment_target }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |