Skip to content

Build wheels for Apple arm64 architecture #68

Build wheels for Apple arm64 architecture

Build wheels for Apple arm64 architecture #68

Workflow file for this run

name: Wheels
on: [push, pull_request]
jobs:
wheels:
name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
cmake_generator: "Visual Studio 16 2019"
cmake_generator_platform: "x64"
arch: AMD64
- os: windows-2019
cmake_generator: "Visual Studio 16 2019"
cmake_generator_platform: "Win32"
arch: x86
- os: ubuntu-20.04
privileges: "sudo"
arch: x86_64
- os: ubuntu-20.04
privileges: "sudo"
arch: aarch64
- os: ubuntu-20.04
privileges: "sudo"
arch: i686
- os: macOS-10.15
arch: x86_64
- os: macos-13-xlarge
privileges: "sudo"
arch: arm64
steps:
- uses: actions/checkout@v2
# Used to host cibuildwheel
- uses: actions/setup-python@v2
- uses: docker/setup-qemu-action@v1
if: ${{ matrix.arch == 'aarch64' }}
name: Set up QEMU
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
- name: Before build
run: |
${{ matrix.privileges }} cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON=OFF \
-DBUILD_BIN=OFF
${{ matrix.privledges }} cmake \
--build build \
--parallel \
--target install \
--config Release \
- name: Build wheels
shell: bash
env:
CIBW_ENVIRONMENT_WINDOWS: >
CMAKE_GENERATOR="${{ matrix.cmake_generator }}"
CMAKE_GENERATOR_PLATFORM="${{ matrix.cmake_generator_platform }}"
CIBW_SKIP: pp* *-musllinux_* cp312-*
CIBW_ARCHS: ${{ matrix.arch }}
PRIVILEGES: ${{ matrix.privileges }}
run: |
python -m cibuildwheel --output-dir wheelhouse python/
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
publish:
needs: wheels
name: Publish wheels to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: artifact