Build wheels for Apple Silicon macs, drop support for Python 3.6 #288
Workflow file for this run
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 wheels | |
on: | |
release: | |
types: [created, edited] | |
push: | |
pull_request: | |
types: [opened, reopened, edited, synchronize] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-2019, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.7' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade -r development.txt | |
- name: Install Visual C++ for Python 2.7 | |
if: runner.os == 'Windows' | |
run: | | |
choco install vcpython27 -f -y | |
choco install golang -f -y | |
choco install mingw -f -y | |
go get -d | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
if: runner.os == 'Linux' | |
- name: Build Linux wheels and sdist | |
if: runner.os == 'Linux' | |
env: | |
CIBW_SKIP: "cp35-* cp36-* *-win32 *-musllinux_i686 *-musllinux_aarch64 *-musllinux_ppc64le *-musllinux_s390x *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x" | |
CIBW_BUILD_VERBOSITY: 1 | |
run: | | |
python setup.py sdist | |
python3 -m cibuildwheel --output-dir wheelhouse | |
- name: Build i686 wheel | |
if: runner.os == 'Linux' | |
env: | |
CIBW_ARCHS_LINUX: i686 | |
CIBW_BUILD_VERBOSITY: 1 | |
run: | | |
python3 -m cibuildwheel --output-dir wheelhouse | |
- name: Build ARM64 wheel | |
if: runner.os == 'Linux' | |
env: | |
CIBW_ARCHS_LINUX: aarch64 | |
CIBW_BUILD_VERBOSITY: 1 | |
run: | | |
python3 -m cibuildwheel --output-dir wheelhouse | |
- name: Build macOS wheels | |
if: runner.os == 'macOS' | |
env: | |
CIBW_SKIP: "cp35-* cp36-* *-win32 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x" | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
run: | | |
python3 -m cibuildwheel --output-dir wheelhouse | |
- name: Build Windows wheels | |
if: runner.os == 'Windows' | |
env: | |
CIBW_SKIP: "cp35-* cp36-* *-win32 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x" | |
CIBW_BUILD_VERBOSITY: 1 | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- name: Publish sdist | |
if: runner.os == 'Linux' | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine check ./dist/*.tar.gz | |
twine upload --skip-existing ./dist/* | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: | | |
./wheelhouse/*.whl | |
./dist/*.tar.gz | |
- name: Publish wheels | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
if: ${{ github.event_name == 'release' && env.TWINE_USERNAME != null }} | |
run: | | |
twine check ./wheelhouse/*.whl | |
twine upload --skip-existing ./wheelhouse/* |