Skip to content

- mac fix

- mac fix #9

name: build-mac-wheels
on:
push:
branches: [ ]
jobs:
build-mac-python:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
# python-version: ["cp38-macosx_arm64", "cp39-macosx_arm64", "cp310-macosx_arm64", "cp311-macosx_arm64", "cp312-macosx_arm64", "cp313-macosx_arm64"]
python-version: ["cp39-macosx_arm64", "cp310-macosx_arm64", "cp311-macosx_arm64", "cp312-macosx_arm64", "cp313-macosx_arm64"]
steps:
- uses: actions/checkout@v4
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
- name: Install OpenMP
run: brew install libomp
- name: Set up Python (runner)
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install build tooling
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade cibuildwheel twine
- name: Build macOS wheels with cibuildwheel
env:
# Target CPython versions (align with former matrix)
CIBW_BUILD: ${{ matrix.python-version }}
EXTRA_CMAKE_DEFINES: "-DUSE_AVX=On"
# Ensure libomp from Homebrew is visible inside cibuildwheel build env
# This block is executed in a shell for each build by cibuildwheel.
# CIBW_BEFORE_BUILD: >-
# brew install libomp && ls -a /opt/homebrew/opt/libomp/
CIBW_ENVIRONMENT_MACOS: >-
MACOSX_DEPLOYMENT_TARGET="14.0"
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheels artifact
uses: actions/upload-artifact@v4
with:
name: pysplishsplash-${{matrix.python-version}}
path: wheelhouse
if: always()
- name: Publish wheels to PyPI
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload wheelhouse/*.whl --skip-existing