Skip to content

Commit

Permalink
python-wheels.yml - add arm64 builds for macOS (#1579)
Browse files Browse the repository at this point in the history
The CI platform that builds the wheels is Intel based and
by default only builds Intel wheels.

Modern Macs are all based on Apple Silicon so to support them
we need to also build arm64. This is done via cross compiling.

It is not possible to test when cross compiling according to:

https://cibuildwheel.readthedocs.io/en/stable/faq/#how-to-cross-compile

Signed-off-by: Barnaby Robson <[email protected]>
  • Loading branch information
barnabyrobson committed Oct 14, 2023
1 parent cc94a19 commit 4de528d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ jobs:
matrix:
os: [ubuntu-22.04, windows-latest, macOS-latest]
env:
# Skip 32-bit wheels builds.
# On macOS we build both x86 and arm to support Intel and Apple Silicon.
CIBW_ARCHS_MACOS: x86_64 arm64
# Skip 32-bit wheels builds on Windows.
# Also skip the PyPy builds, since they fail the unittests
CIBW_SKIP: "*-win32 *_i686 pp*"
# The CI platform is Intel based so we are doing cross compilation
# for arm64. It is not currently possible to test arm64 when cross
# compiling.
CIBW_TEST_SKIP: "*_arm64"
CIBW_BEFORE_BUILD: >
echo "Installing OpenEXR..." &&
cd openexr.build &&
Expand Down

0 comments on commit 4de528d

Please sign in to comment.