Bump docker/setup-qemu-action from 1 to 3 #24
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 CI wheels | |
on: | |
# Save CI by only running this on release branches or tags. | |
push: | |
branches: | |
- main | |
- v[0-9]+.[0-9]+.x | |
tags: | |
- v* | |
# Also allow running this action on PRs if requested by applying the | |
# "Run cibuildwheel" label. | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- labeled | |
jobs: | |
build_wheels: | |
if: | | |
github.event_name == 'push' || | |
github.event_name == 'pull_request' && ( | |
( | |
github.event.action == 'labeled' && | |
github.event.label.name == 'Run cibuildwheel' | |
) || | |
contains(github.event.pull_request.labels.*.name, 'Run cibuildwheel') | |
) | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | |
MACOSX_DEPLOYMENT_TARGET: "10.12" | |
strategy: | |
matrix: | |
os: [ubuntu-18.04, windows-latest, macos-10.15] | |
cibw_archs: ["auto"] | |
include: | |
- os: ubuntu-18.04 | |
cibw_archs: "aarch64" | |
steps: | |
- name: Set up QEMU | |
if: matrix.cibw_archs == 'aarch64' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v3 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.1.1 | |
- name: Build wheels for CPython 3.10 | |
run: | | |
python -m cibuildwheel --output-dir dist | |
env: | |
CIBW_BUILD: "cp310-*" | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
CIBW_MANYLINUX_I686_IMAGE: manylinux2014 | |
CIBW_BEFORE_BUILD: pip install certifi oldest-supported-numpy | |
MPL_DISABLE_FH4: "yes" | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
- name: Build wheels for CPython 3.9 | |
run: | | |
python -m cibuildwheel --output-dir dist | |
env: | |
CIBW_BUILD: "cp39-*" | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 | |
CIBW_MANYLINUX_I686_IMAGE: manylinux1 | |
CIBW_BEFORE_BUILD: pip install certifi oldest-supported-numpy | |
MPL_DISABLE_FH4: "yes" | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
- name: Build wheels for CPython 3.8 | |
run: | | |
python -m cibuildwheel --output-dir dist | |
env: | |
CIBW_BUILD: "cp38-*" | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 | |
CIBW_MANYLINUX_I686_IMAGE: manylinux1 | |
CIBW_BEFORE_BUILD: pip install certifi numpy==1.19.2 | |
MPL_DISABLE_FH4: "yes" | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
- name: Build wheels for PyPy | |
run: | | |
python -m cibuildwheel --output-dir dist | |
env: | |
CIBW_BUILD: "pp38-*" | |
CIBW_BEFORE_BUILD: pip install certifi oldest-supported-numpy | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
PIP_USE_FEATURE: in-tree-build | |
if: false && matrix.cibw_archs != 'aarch64' | |
- name: Validate that LICENSE files are included in wheels | |
run: | | |
python ./ci/check_wheel_licenses.py | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: ./dist/*.whl |