Skip to content

Commit 023ed7f

Browse files
committed
pypy can't do universal2 on mac, use separate x64/arm64 runners
1 parent bad5022 commit 023ed7f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
env:
2828
CIBW_ARCHS: ${{ matrix.arch }}
29+
CIBW_BUILD: ${{ matrix.cibw_build_filter || '' }}
2930
defaults:
3031
run:
3132
shell: bash
@@ -35,8 +36,18 @@ jobs:
3536
os: [ubuntu-latest, windows-latest]
3637
arch: [auto64]
3738
include:
39+
# CPython universal2 wheels (x86_64 + arm64) for macOS
3840
- os: macos-latest
3941
arch: universal2
42+
cibw_build_filter: "cp*"
43+
# PyPy x86_64 wheels for macOS (PyPy doesn't support universal2)
44+
- os: macos-13
45+
arch: x86_64
46+
cibw_build_filter: "pp*"
47+
# PyPy arm64 wheels for macOS (PyPy doesn't support universal2)
48+
- os: macos-latest
49+
arch: arm64
50+
cibw_build_filter: "pp*"
4051
- os: windows-latest
4152
arch: x86
4253
steps:
@@ -54,7 +65,11 @@ jobs:
5465
if [ "$BUILD_SKIA_FROM_SOURCE" == "0" ]; then
5566
pip install setuptools githubrelease
5667
if ! [[ $CIBW_ARCHS =~ ^auto ]]; then
57-
cpu_arch="--cpu-arch=$CIBW_ARCHS"
68+
# translate cibuildwheel arch names to download_libskia.py names
69+
case "$CIBW_ARCHS" in
70+
x86_64) cpu_arch="--cpu-arch=x64" ;;
71+
*) cpu_arch="--cpu-arch=$CIBW_ARCHS" ;;
72+
esac
5873
fi
5974
python ci/download_libskia.py -d "${SKIA_LIBRARY_DIR}" $cpu_arch
6075
fi

0 commit comments

Comments
 (0)