From 4de528df6c9ec531bceca245cee41a017eff5a52 Mon Sep 17 00:00:00 2001 From: Barnaby Robson Date: Sat, 14 Oct 2023 13:44:04 -0700 Subject: [PATCH] python-wheels.yml - add arm64 builds for macOS (#1579) 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 --- .github/workflows/python-wheels.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index fab0485c8a..cc926ef5c7 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -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 &&