Merge pull request #184 from StochasticTree/regression-test-cleanup #105
This file contains hidden or 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 Python Wheels for PyPI | |
# Note: this file is based in part on the example workflow in the cibuildwheel docs | |
# https://cibuildwheel.pypa.io/en/stable/setup/#github-actions | |
# and in part on matplotlib's wheel build workflow: | |
# https://github.com/matplotlib/matplotlib/blob/main/.github/workflows/cibuildwheel.yml | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
cibw_archs: "x86_64" | |
macos_deployment_target: "10.13" # Unused, just setting the variable as a placeholder | |
- os: ubuntu-24.04-arm | |
cibw_archs: "aarch64" | |
macos_deployment_target: "10.13" # Unused, just setting the variable as a placeholder | |
- os: windows-latest | |
cibw_archs: "auto64" | |
macos_deployment_target: "10.13" # Unused, just setting the variable as a placeholder | |
- os: macos-13 | |
cibw_archs: "x86_64" | |
macos_deployment_target: "13.0" | |
- os: macos-14 | |
cibw_archs: "arm64" | |
macos_deployment_target: "14.0" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up openmp (macos) | |
# Set up openMP on MacOS since it doesn't ship with the apple clang compiler suite | |
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | |
run: | | |
brew install libomp | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: "pp* *-musllinux_* *-win32" | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }} | |
path: ./wheelhouse/*.whl |