Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable linux docker builds on Apple Silicon #47

Merged
merged 9 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 39 additions & 9 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,59 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
strategy:
matrix:
python-version: ['3.8']
os: [ubuntu-latest, windows-latest, macos-latest]
name: Build wheels on ${{ matrix.os }}
include:
- { os: macos-latest, build: cp36-macosx_x86_64 }
- { os: macos-latest, build: cp37-macosx_x86_64 }
- { os: macos-latest, build: cp38-macosx_universal2 }
- { os: macos-latest, build: cp39-macosx_universal2 }
- { os: macos-latest, build: cp310-macosx_universal2 }
- { os: macos-latest, build: pp37-macosx_x86_64 }
- { os: macos-latest, build: pp38-macosx_x86_64 }
- { os: windows-latest, build: cp36-win_amd64 }
- { os: windows-latest, build: cp37-win_amd64 }
- { os: windows-latest, build: cp38-win_amd64 }
- { os: windows-latest, build: cp39-win_amd64 }
- { os: windows-latest, build: cp310-win_amd64 }
- { os: windows-latest, build: pp37-win_amd64 }
- { os: windows-latest, build: pp38-win_amd64 }
- { os: ubuntu-latest, build: cp36-manylinux_x86_64 }
- { os: ubuntu-latest, build: cp36-manylinux_aarch64 }
- { os: ubuntu-latest, build: cp37-manylinux_x86_64 }
- { os: ubuntu-latest, build: cp37-manylinux_aarch64 }
- { os: ubuntu-latest, build: cp38-manylinux_x86_64 }
- { os: ubuntu-latest, build: cp38-manylinux_aarch64 }
- { os: ubuntu-latest, build: cp39-manylinux_x86_64 }
- { os: ubuntu-latest, build: cp39-manylinux_aarch64 }
- { os: ubuntu-latest, build: cp310-manylinux_x86_64 }
- { os: ubuntu-latest, build: cp310-manylinux_aarch64 }
- { os: ubuntu-latest, build: pp37-manylinux_x86_64 }
- { os: ubuntu-latest, build: pp37-manylinux_aarch64 }
- { os: ubuntu-latest, build: pp38-manylinux_x86_64 }
- { os: ubuntu-latest, build: pp38-manylinux_aarch64 }
name: Build wheel for ${{ matrix.build }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

# Used to host cibuildwheel, so version doesn't really matter
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: "3.8"
- name: Install cibuildwheel
run: python -m pip install cibuildwheel>=2.0.0a4

- name: Set up QEMU for aarch64 on Linux
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_TEST_REQUIRES: -r test-requirements.txt
CIBW_TEST_COMMAND: "pytest {project}/tests"
CIBW_ARCHS: auto64 # Only support building 64-bit wheels. It's 2021!
CIBW_SKIP: '*27* *35*' # Ignore Python 2.x, 3.5
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: auto64 # Only support building 64-bit wheels. It's 2022!
CIBW_ARCHS_LINUX: auto64 aarch64 # Useful for building linux images with Apple Silicon
CIBW_ARCHS_MACOS: x86_64 universal2 # Support Apple Silicon
# on macOS and with Python 3.10: building NumPy from source fails without these options:
CIBW_ENVIRONMENT: NPY_BLAS_ORDER="" NPY_LAPACK_ORDER=""
Expand All @@ -214,7 +245,6 @@ jobs:
# so we can't run post-wheel-build tests there.
# Also testing any pypy versions fails, as TensorFlow isn't pypy compatible.
CIBW_TEST_SKIP: "*manylinux* *pp* *-macosx_universal2:arm64"

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pedalboard)
![Supported Platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Windows%20%7C%20Linux-green)
![Apple Silicon supported](https://img.shields.io/badge/Apple%20Silicon-supported-brightgreen)
![Apple Silicon support for macOS and Linux (Docker)](https://img.shields.io/badge/Apple%20Silicon-macOS%20and%20Linux-brightgreen)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/pedalboard)
[![Test Badge](https://github.com/spotify/pedalboard/actions/workflows/all.yml/badge.svg)](https://github.com/spotify/pedalboard/actions/workflows/all.yml)
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/psobot/8736467e9952991ef44a67915ee7c762/raw/coverage.json)
Expand Down Expand Up @@ -54,7 +54,7 @@ If you are new to Python, follow [INSTALLATION.md](https://github.com/spotify/pe
- Linux
- Tested heavily in production use cases at Spotify
- Tested automatically on GitHub with VSTs
- Platform `manylinux` wheels built for `x86_64`
- Platform `manylinux` wheels built for `x86_64` (Intel/AMD) and `aarch64` (ARM/Apple Silicon)
- Most Linux VSTs require a relatively modern Linux installation (with glibc > 2.27)
- macOS
- Tested manually with VSTs and Audio Units
Expand All @@ -63,7 +63,7 @@ If you are new to Python, follow [INSTALLATION.md](https://github.com/spotify/pe
- Compatible with a wide range of VSTs and Audio Units
- Windows
- Tested automatically on GitHub with VSTs
- Platform wheels available for `amd64` (x86-84, Intel/AMD)
- Platform wheels available for `amd64` (x86-64, Intel/AMD)

#### Plugin Compatibility

Expand Down