@@ -45,16 +45,17 @@ jobs:
4545 macarch : [arm64, x86_64]
4646
4747 steps :
48- - uses : actions/checkout@v3.3.0
48+ - uses : actions/checkout@v3.5.3
4949
5050 - name : Test for Mac Deps cache hit
5151 id : macdep-cache
52- uses : actions/cache@v3.0.2
52+ uses : actions/cache@v3.3.1
5353 with :
5454 path : ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
5555 # The hash of all files in buildconfig manylinux-build and macdependencies is
5656 # the key to the cache. If anything changes here, the deps are built again
5757 key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
58+ lookup-only : true
5859
5960 # build mac deps on cache miss
6061 - name : Build Mac Deps
@@ -84,52 +85,64 @@ jobs:
8485 # of these builds take roughly the same time
8586 include :
8687 - {
87- name : " x86_64 (CPython 3.10 and above )" ,
88+ name : " x86_64 (CPython 3.9 - 3.12 )" ,
8889 macarch : x86_64,
89- # pattern matches any 2 digit number
90- pyversions : " cp3[1-9][0-9]-*"
90+ pyversions : " cp3{9,10,11,12}-*" ,
9191 }
9292
9393 - {
94- name : " x86_64 (Python 3.7)" ,
94+ name : " x86_64 (CPython 3.7 and Python 3.8 )" ,
9595 macarch : x86_64,
96- pyversions : " ?p37-*"
96+ # CPython 3.7, CPython/PyPy 3.8
97+ pyversions : " cp37-* ?p38-*" ,
9798 }
9899
99100 - {
100- name : " x86_64 (Python 3.8 )" ,
101+ name : " x86_64 (PyPy 3.9 and 3.10 )" ,
101102 macarch : x86_64,
102- pyversions : " ?p38-* "
103+ pyversions : " pp39-* pp310-* " ,
103104 }
104105
105106 - {
106- name : " x86_64 (Python 3.9 )" ,
107- macarch : x86_64 ,
108- pyversions : " ?p39 -*"
107+ name : " arm64 (CPython 3.8 - 3.10 )" ,
108+ macarch : arm64 ,
109+ pyversions : " cp3{8,9,10} -*" ,
109110 }
110111
111112 - {
112- name : " arm64 (CPython 3.8 and above )" ,
113+ name : " arm64 (CPython 3.11 - 3.12 )" ,
113114 macarch : arm64,
114- # pattern matches any number from 8 to 99
115- pyversions : " cp3{8,9,[1-9][0-9]}-*"
115+ pyversions : " cp3{11,12}-*" ,
116116 }
117117
118118 env :
119+ MAC_ARCH : ${{ matrix.macarch }}
119120 # load pip config from this file. Define this in 'CIBW_ENVIRONMENT'
120121 # because this should not affect cibuildwheel machinery
121122 # also define environment variables needed for testing
122123 CIBW_ENVIRONMENT : PIP_CONFIG_FILE=buildconfig/pip_config.ini SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
123124
125+ # Explicitly tell CIBW what the wheel arch deployment target should be
126+ # There seems to be no better way to set this than this env
127+ # We need this because our minimum is 10.11, different from default
128+ # of 10.9 on x86s
129+ # Related issue: https://github.com/pypa/cibuildwheel/issues/952
130+ _PYTHON_HOST_PLATFORM : ${{ matrix.macarch == 'x86_64' && 'macosx-10.11-x86_64' || 'macosx-11.0-arm64'}}
131+
132+ # Similarly, we need to tell CIBW that the wheel's linking steps
133+ # should be for 10.11 on x86
134+ MACOSX_DEPLOYMENT_TARGET : ${{ matrix.macarch == 'x86_64' && '10.11' || '11.0' }}
135+
124136 CIBW_BUILD : ${{ matrix.pyversions }}
125137
138+ CIBW_PRERELEASE_PYTHONS : True # for 3.12 testing
139+
126140 # Build arm64 and x86_64 wheels too on an Intel runner.
127141 # Note that the arm64 wheels cannot be tested on CI in this configuration
128142 CIBW_ARCHS : ${{ matrix.macarch }}
129143
130144 # Setup MacOS dependencies
131145 CIBW_BEFORE_ALL : |
132- export MAC_ARCH="${{ matrix.macarch }}"
133146 brew install pkg-config
134147 cd buildconfig/macdependencies
135148 cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps
@@ -149,23 +162,24 @@ jobs:
149162 CIBW_BUILD_VERBOSITY : 2
150163
151164 steps :
152- - uses : actions/checkout@v3.3.0
165+ - uses : actions/checkout@v3.5.3
153166
154167 - name : pip cache
155- uses : actions/cache@v3.0.2
168+ uses : actions/cache@v3.3.1
156169 with :
157170 path : ~/Library/Caches/pip # This cache path is only right on mac
158171 key : pip-cache-${{ matrix.name }}
159172
160173 - name : Fetch Mac deps
161174 id : macdep-cache
162- uses : actions/cache@v3.0.2
175+ uses : actions/cache@v3.3.1
163176 with :
164177 path : ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
165178 key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
179+ fail-on-cache-miss : true
166180
167181 - name : Build and test wheels
168- uses : pypa/cibuildwheel@v2.12 .1
182+ uses : pypa/cibuildwheel@v2.14 .1
169183
170184 - uses : actions/upload-artifact@v3
171185 with :
0 commit comments