Skip to content

Add macos wheel

Add macos wheel #8

name: Wheel::MacOS::ARM
on:
pull_request:
push:
branches:
- master
release:
types: [published]
env:
ARCHS: 'arm64'
concurrency:
group: wheel_macos_arm64-${{ github.ref }}
cancel-in-progress: true
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11]
arch: [arm64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
- name: Install cibuildwheel
run: python3.9 -m pip install cibuildwheel~=2.11.0
- name: Build wheels
env:
CIBW_ARCHS_MACOS: ${{matrix.arch}}
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-*"
CIBW_ENVIRONMENT: |
CMAKE_ARGS="-DCMAKE_CXX_COMPILER_TARGET=arm64-apple-macos11 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DENABLE_OPENMP=OFF"
# MacOS specific build settings
CIBW_BEFORE_ALL_MACOS: |
brew update-reset
brew fetch --force --bottle-tag=arm64_big_sur mpfr
brew install $(brew --cache --bottle-tag=arm64_big_sur mpfr)
brew fetch --force --bottle-tag=arm64_big_sur gmp
brew install $(brew --cache --bottle-tag=arm64_big_sur gmp)
#brew install mpfr gmp
CIBW_BEFORE_BUILD: |
python -m pip install pybind11 cmake~=3.24.0
CIBW_BUILD_VERBOSITY: 1
run: python3.9 -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl