5656 XZ_VERSION : ${{ steps.extract.outputs.XZ_VERSION }}
5757
5858 steps :
59- - uses : actions/checkout@v4.1.7
59+ - uses : actions/checkout@v6
6060
6161 - name : Extract config variables
6262 id : extract
@@ -84,28 +84,27 @@ jobs:
8484 echo "XZ_VERSION=${XZ_VERSION}" | tee -a ${GITHUB_OUTPUT}
8585
8686 build :
87- runs-on : macOS-latest
87+ runs-on : macOS-15
8888 needs : [ config ]
8989 strategy :
9090 fail-fast : false
9191 matrix :
92- target : ['macOS', 'iOS', 'tvOS', 'watchOS']
93- include :
94- - briefcase-run-args :
95- - run-tests : false
96-
97- - target : macOS
98- run-tests : true
99-
100- - target : iOS
101- briefcase-run-args : ' -d "iPhone SE (3rd generation)"'
102- run-tests : true
92+ platform : ['macOS', 'iOS', 'tvOS', 'watchOS']
10393
10494 steps :
105- - uses : actions/checkout@v4.1.7
95+ - uses : actions/checkout@v6
96+
97+ - name : Set up Xcode
98+ # GitHub recommends explicitly selecting the desired Xcode version:
99+ # https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
100+ # This became a necessity as a result of
101+ # https://github.com/actions/runner-images/issues/12541 and
102+ # https://github.com/actions/runner-images/issues/12751.
103+ run : |
104+ sudo xcode-select --switch /Applications/Xcode_16.4.app
106105
107106 - name : Set up Python
108- uses : actions/setup-python@v5.4 .0
107+ uses : actions/setup-python@v6.1 .0
109108 with :
110109 # Appending -dev ensures that we can always build the dev release.
111110 # It's a no-op for versions that have been published.
@@ -114,31 +113,193 @@ jobs:
114113 # It's an edge case, but when a new alpha is released, we need to use it ASAP.
115114 check-latest : true
116115
117- - name : Build ${{ matrix.target }}
116+ - name : Build ${{ matrix.platform }}
118117 run : |
119- # Do the build for the requested target .
120- make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
118+ # Do the build for the requested platform .
119+ make ${{ matrix.platform }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
121120
122121 - name : Upload build artefacts
123- uses : actions/upload-artifact@v4.6.1
122+ uses : actions/upload-artifact@v6.0.0
123+ with :
124+ name : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
125+ path : dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
126+
127+ briefcase-testbed :
128+ name : Briefcase testbed (${{ matrix.platform }})
129+ runs-on : macOS-15
130+ needs : [ config, build ]
131+ strategy :
132+ fail-fast : false
133+ matrix :
134+ platform : ["macOS", "iOS"]
135+ include :
136+ - briefcase-run-args :
137+
138+ - platform : iOS
139+ briefcase-run-args : ' -d "iPhone 16e::iOS 18.5"'
140+
141+ steps :
142+ - uses : actions/checkout@v6
143+
144+ - name : Set up Xcode
145+ # GitHub recommends explicitly selecting the desired Xcode version:
146+ # https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
147+ # This became a necessity as a result of
148+ # https://github.com/actions/runner-images/issues/12541 and
149+ # https://github.com/actions/runner-images/issues/12751.
150+ run : |
151+ sudo xcode-select --switch /Applications/Xcode_16.4.app
152+
153+ - name : Get build artifact
154+ uses : actions/download-artifact@v7.0.0
124155 with :
125- name : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
126- path : dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
156+ pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
157+ path : dist
158+ merge-multiple : true
127159
128- - uses : actions/checkout@v4.1.7
129- if : matrix.run-tests
160+ - name : Set up Python
161+ uses : actions/setup-python@v6.1.0
162+ with :
163+ # Appending -dev ensures that we can always build the dev release.
164+ # It's a no-op for versions that have been published.
165+ python-version : ${{ needs.config.outputs.PYTHON_VER }}-dev
166+ # Ensure that we *always* use the latest build, not a cached version.
167+ # It's an edge case, but when a new alpha is released, we need to use it ASAP.
168+ check-latest : true
169+
170+ - uses : actions/checkout@v6
130171 with :
131172 repository : beeware/Python-support-testbed
132173 path : Python-support-testbed
133174
134175 - name : Install dependencies
135- if : matrix.run-tests
136176 run : |
137177 # Use the development version of Briefcase
138178 python -m pip install git+https://github.com/beeware/briefcase.git
139179
140180 - name : Run support testbed check
141- if : matrix.run-tests
142- timeout-minutes : 10
181+ timeout-minutes : 15
143182 working-directory : Python-support-testbed
144- run : briefcase run ${{ matrix.target }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz\'
183+ run : briefcase run ${{ matrix.platform }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz\'
184+
185+ cpython-testbed :
186+ name : CPython testbed (${{ matrix.platform }})
187+ runs-on : macOS-15
188+ needs : [ config, build ]
189+ strategy :
190+ fail-fast : false
191+ matrix :
192+ platform : ["iOS", "tvOS"]
193+ include :
194+ - platform : " iOS"
195+ testbed-args : ' --simulator "iPhone 16e,arch=arm64,OS=18.5"'
196+
197+ steps :
198+ - uses : actions/checkout@v6
199+
200+ - name : Get build artifact
201+ uses : actions/download-artifact@v7.0.0
202+ with :
203+ pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
204+ path : dist
205+ merge-multiple : true
206+
207+ - name : Set up Xcode
208+ # GitHub recommends explicitly selecting the desired Xcode version:
209+ # https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
210+ # This became a necessity as a result of
211+ # https://github.com/actions/runner-images/issues/12541 and
212+ # https://github.com/actions/runner-images/issues/12751.
213+ run : |
214+ sudo xcode-select --switch /Applications/Xcode_16.4.app
215+
216+ - name : Set up Python
217+ uses : actions/setup-python@v6.1.0
218+ with :
219+ # Appending -dev ensures that we can always build the dev release.
220+ # It's a no-op for versions that have been published.
221+ python-version : ${{ needs.config.outputs.PYTHON_VER }}-dev
222+ # Ensure that we *always* use the latest build, not a cached version.
223+ # It's an edge case, but when a new alpha is released, we need to use it ASAP.
224+ check-latest : true
225+
226+ - name : Unpack support package
227+ run : |
228+ mkdir -p support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
229+ cd support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
230+ tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
231+
232+ - name : Run CPython testbed
233+ timeout-minutes : 15
234+ working-directory : support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
235+ run : |
236+ # Run a representative subset of CPython core tests:
237+ # - test_builtin as a test of core language tools
238+ # - test_grammar as a test of core language features
239+ # - test_os as a test of system library calls
240+ # - test_bz2 as a simple test of third party libraries
241+ # - test_ctypes as a test of FFI
242+ python -m testbed run --verbose ${{ matrix.testbed-args }} -- test --single-process --rerun -W test_builtin test_grammar test_os test_bz2 test_ctypes
243+
244+ crossenv-test :
245+ name : Cross-platform env test (${{ matrix.multiarch }})
246+ runs-on : macOS-latest
247+ needs : [ config, build ]
248+ strategy :
249+ fail-fast : false
250+ matrix :
251+ include :
252+ - platform : iOS
253+ slice : ios-arm64_x86_64-simulator
254+ multiarch : arm64-iphonesimulator
255+ - platform : iOS
256+ slice : ios-arm64_x86_64-simulator
257+ multiarch : x86_64-iphonesimulator
258+ - platform : iOS
259+ slice : ios-arm64
260+ multiarch : arm64-iphoneos
261+
262+ steps :
263+ - uses : actions/checkout@v6
264+
265+ - name : Get build artifact
266+ uses : actions/download-artifact@v7.0.0
267+ with :
268+ pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
269+ path : dist
270+ merge-multiple : true
271+
272+ - name : Set up Python
273+ uses : actions/setup-python@v6.1.0
274+ with :
275+ # Appending -dev ensures that we can always build the dev release.
276+ # It's a no-op for versions that have been published.
277+ python-version : ${{ needs.config.outputs.PYTHON_VER }}-dev
278+ # Ensure that we *always* use the latest build, not a cached version.
279+ # It's an edge case, but when a new alpha is released, we need to use it ASAP.
280+ check-latest : true
281+
282+ - name : Unpack support package
283+ run : |
284+ mkdir -p support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
285+ cd support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
286+ tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
287+
288+ - name : Run cross-platform environment test
289+ env :
290+ PYTHON_CROSS_PLATFORM : ${{ matrix.platform }}
291+ PYTHON_CROSS_SLICE : ${{ matrix.slice }}
292+ PYTHON_CROSS_MULTIARCH : ${{ matrix.multiarch }}
293+ run : |
294+ # Create and activate a native virtual environment
295+ python${{ needs.config.outputs.PYTHON_VER }} -m venv cross-venv
296+ source cross-venv/bin/activate
297+
298+ # Install pytest
299+ python -m pip install pytest
300+
301+ # Convert venv into cross-venv
302+ python support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}/Python.xcframework/${{ matrix.slice }}/platform-config/${{ matrix.multiarch }}/make_cross_venv.py cross-venv
303+
304+ # Run the test suite
305+ python -m pytest tests
0 commit comments