@@ -38,23 +38,25 @@ concurrency:
3838jobs :
3939 deps :
4040 name : ${{ matrix.macarch }} deps
41- runs-on : macos-12
41+ runs-on : ${{ matrix.os }}
4242 strategy :
4343 matrix :
4444 # make arm64 deps and x86_64 deps
45- macarch : [arm64, x86_64]
45+ include :
46+ - { macarch: arm64, os: macos-14 }
47+ - { macarch: x86_64, os: macos-13 }
4648
4749 steps :
48- -
uses :
actions/[email protected] .1 50+ -
uses :
actions/[email protected] .6 4951
5052 - name : Test for Mac Deps cache hit
5153 id : macdep-cache
52- uses : actions/cache@v3.3 .2
54+ uses : actions/cache@v4.0 .2
5355 with :
5456 path : ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
5557 # The hash of all files in buildconfig manylinux-build and macdependencies is
5658 # the key to the cache. If anything changes here, the deps are built again
57- key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
59+ key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}-${{ matrix.os }}
5860 lookup-only : true
5961
6062 # build mac deps on cache miss
@@ -68,15 +70,15 @@ jobs:
6870
6971 # Uncomment when you want to manually verify the deps by downloading them
7072 # - name: Upload Mac deps
71- # uses: actions/upload-artifact@v3
73+ # uses: actions/upload-artifact@v4
7274 # with:
7375 # name: pygame-mac-deps-${{ matrix.macarch }}
7476 # path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
7577
7678 build :
7779 name : ${{ matrix.name }}
7880 needs : deps
79- runs-on : macos-12
81+ runs-on : ${{ matrix.os }}
8082 strategy :
8183 fail-fast : false # if a particular matrix build fails, don't skip the rest
8284 matrix :
@@ -87,31 +89,36 @@ jobs:
8789 - {
8890 name : " x86_64 (CPython 3.9 - 3.12)" ,
8991 macarch : x86_64,
92+ os : macos-13,
9093 pyversions : " cp3{9,10,11,12}-*" ,
9194 }
9295
9396 - {
9497 name : " x86_64 (Python 3.8)" ,
9598 macarch : x86_64,
99+ os : macos-13,
96100 # CPython/PyPy 3.8
97101 pyversions : " ?p38-*" ,
98102 }
99103
100104 - {
101105 name : " x86_64 (PyPy 3.9 and 3.10)" ,
102106 macarch : x86_64,
107+ os : macos-13,
103108 pyversions : " pp39-* pp310-*" ,
104109 }
105110
106111 - {
107112 name : " arm64 (CPython 3.8 - 3.10)" ,
108113 macarch : arm64,
114+ os : macos-14,
109115 pyversions : " cp3{8,9,10}-*" ,
110116 }
111117
112118 - {
113119 name : " arm64 (CPython 3.11 - 3.12)" ,
114120 macarch : arm64,
121+ os : macos-14,
115122 pyversions : " cp3{11,12}-*" ,
116123 }
117124
@@ -120,7 +127,7 @@ jobs:
120127 # load pip config from this file. Define this in 'CIBW_ENVIRONMENT'
121128 # because this should not affect cibuildwheel machinery
122129 # also define environment variables needed for testing
123- CIBW_ENVIRONMENT : PIP_CONFIG_FILE=buildconfig/pip_config.ini SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
130+ CIBW_ENVIRONMENT : SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
124131
125132 # Explicitly tell CIBW what the wheel arch deployment target should be
126133 # There seems to be no better way to set this than this env
@@ -135,8 +142,6 @@ jobs:
135142
136143 CIBW_BUILD : ${{ matrix.pyversions }}
137144
138- # Build arm64 and x86_64 wheels too on an Intel runner.
139- # Note that the arm64 wheels cannot be tested on CI in this configuration
140145 CIBW_ARCHS : ${{ matrix.macarch }}
141146
142147 # Setup macOS dependencies
@@ -147,8 +152,7 @@ jobs:
147152 bash ./install_mac_deps.sh
148153
149154 CIBW_BEFORE_BUILD : |
150- pip install requests numpy Sphinx"<7.2.0"
151- python setup.py docs
155+ pip install numpy
152156 cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps
153157
154158 # To remove any speculations about the wheel not being self-contained
@@ -160,27 +164,28 @@ jobs:
160164 CIBW_BUILD_VERBOSITY : 2
161165
162166 steps :
163- -
uses :
actions/[email protected] .1 167+ -
uses :
actions/[email protected] .6 164168
165169 - name : pip cache
166- uses : actions/cache@v3.3 .2
170+ uses : actions/cache@v4.0 .2
167171 with :
168172 path : ~/Library/Caches/pip # This cache path is only right on mac
169173 key : pip-cache-${{ matrix.name }}
170174
171175 - name : Fetch Mac deps
172176 id : macdep-cache
173- uses : actions/cache@v3.3 .2
177+ uses : actions/cache@v4.0 .2
174178 with :
175179 path : ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
176180 key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
177181 fail-on-cache-miss : true
178182
179183 - name : Build and test wheels
180- uses : pypa/cibuildwheel@v2.16.2
184+ uses : pypa/cibuildwheel@v2.18.1
181185
182- - uses : actions/upload-artifact@v3
186+ - uses : actions/upload-artifact@v4
183187 with :
184- name : pygame-wheels-macos
188+ name : pygame-wheels-macos-${{ matrix.name }}
185189 path : ./wheelhouse/*.whl
190+ compression-level : 0 # wheels are already zip files, no need for more compression
186191
0 commit comments