@@ -57,41 +57,29 @@ jobs:
5757 # path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
5858
5959 build :
60- name : ${{ matrix.macarch }}
60+ name : universal2
6161 needs : deps
62- runs-on : ${{ matrix.os }}
63- strategy :
64- fail-fast : false # if a particular matrix build fails, don't skip the rest
65- matrix :
66- include :
67- - { macarch: arm64, os: macos-15 }
68- - { macarch: x86_64, os: macos-15 }
62+ runs-on : macos-15
6963
7064 env :
71- MAC_ARCH : ${{ matrix.macarch }}
72-
7365 # Explicitly tell CIBW what the wheel arch deployment target should be
7466 # There seems to be no better way to set this than this env
7567 # We need this because our minimum is 10.11, different from default
7668 # of 10.9 on x86s
7769 # Related issue: https://github.com/pypa/cibuildwheel/issues/952
78- _PYTHON_HOST_PLATFORM : ${{ matrix.macarch == 'x86_64' && ' macosx-10.11-x86_64' || 'macosx-11.0-arm64'}}
70+ _PYTHON_HOST_PLATFORM : ' macosx-10.11-universal2 '
7971
8072 # Similarly, we need to tell CIBW that the wheel's linking steps
8173 # should be for 10.11 on x86
82- MACOSX_DEPLOYMENT_TARGET : ${{ matrix.macarch == 'x86_64' && ' 10.11' || '11.0' }}
74+ MACOSX_DEPLOYMENT_TARGET : ' 10.11'
8375
84- CIBW_ARCHS : ${{ matrix.macarch }}
76+ CIBW_ARCHS : universal2
8577
8678 # Setup macOS dependencies
8779 CIBW_BEFORE_ALL : |
8880 cd buildconfig/macdependencies
89- cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps
9081 bash ./install_mac_deps.sh
9182
92- CIBW_BEFORE_BUILD : |
93- cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps
94-
9583 # To remove any speculations about the wheel not being self-contained
9684 CIBW_BEFORE_TEST : rm -rf ${{ github.workspace }}/pygame_mac_deps
9785
@@ -104,12 +92,18 @@ jobs:
10492 path : ~/Library/Caches/pip # This cache path is only right on mac
10593 key : pip-cache-${{ matrix.macarch }}-${{ matrix.os }}
10694
107- - name : Fetch Mac deps
108- id : macdep-cache
95+ - name : Fetch Mac deps (x86_64)
10996 uses : actions/cache@v4.3.0
11097 with :
111- path : ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
112- key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
98+ path : ${{ github.workspace }}/pygame_mac_deps_x86_64
99+ key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-x86_64
100+ fail-on-cache-miss : true
101+
102+ - name : Fetch Mac deps (arm64)
103+ uses : actions/cache@v4.3.0
104+ with :
105+ path : ${{ github.workspace }}/pygame_mac_deps_arm64
106+ key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-arm64
113107 fail-on-cache-miss : true
114108
115109 - name : Install uv for speed
0 commit comments