89
89
strategy :
90
90
fail-fast : false
91
91
matrix :
92
- target : ['macOS', 'iOS', 'tvOS', 'watchOS', 'visionOS']
92
+ platform : ['macOS', 'iOS', 'tvOS', 'watchOS', 'visionOS']
93
93
94
94
steps :
95
95
@@ -104,29 +104,29 @@ jobs:
104
104
# It's an edge case, but when a new alpha is released, we need to use it ASAP.
105
105
check-latest : true
106
106
107
- - name : Build ${{ matrix.target }}
107
+ - name : Build ${{ matrix.platform }}
108
108
run : |
109
- # Do the build for the requested target .
110
- make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
109
+ # Do the build for the requested platform .
110
+ make ${{ matrix.platform }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
111
111
112
112
- name : Upload build artefacts
113
113
114
114
with :
115
- name : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
116
- path : dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
115
+ name : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
116
+ path : dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
117
117
118
118
briefcase-testbed :
119
- name : Briefcase testbed (${{ matrix.target }})
119
+ name : Briefcase testbed (${{ matrix.platform }})
120
120
runs-on : macOS-latest
121
121
needs : [ config, build ]
122
122
strategy :
123
123
fail-fast : false
124
124
matrix :
125
- target : ["macOS", "iOS"]
125
+ platform : ["macOS", "iOS"]
126
126
include :
127
127
- briefcase-run-args :
128
128
129
- - target : iOS
129
+ - platform : iOS
130
130
briefcase-run-args : ' -d "iPhone SE (3rd generation)"'
131
131
132
132
steps :
@@ -135,7 +135,7 @@ jobs:
135
135
- name : Get build artifact
136
136
137
137
with :
138
- pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
138
+ pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
139
139
path : dist
140
140
merge-multiple : true
141
141
@@ -162,24 +162,24 @@ jobs:
162
162
- name : Run support testbed check
163
163
timeout-minutes : 10
164
164
working-directory : Python-support-testbed
165
- 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\'
165
+ 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\'
166
166
167
167
cpython-testbed :
168
- name : CPython testbed (${{ matrix.target }})
168
+ name : CPython testbed (${{ matrix.platform }})
169
169
runs-on : macOS-latest
170
170
needs : [ config, build ]
171
171
strategy :
172
172
fail-fast : false
173
173
matrix :
174
- target : ["iOS", "visionOS"]
174
+ platform : ["iOS", "visionOS"]
175
175
176
176
steps :
177
177
178
178
179
179
- name : Get build artifact
180
180
181
181
with :
182
- pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
182
+ pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
183
183
path : dist
184
184
merge-multiple : true
185
185
@@ -195,13 +195,13 @@ jobs:
195
195
196
196
- name : Unpack support package
197
197
run : |
198
- mkdir support
199
- cd support
200
- tar zxvf ../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
198
+ mkdir -p support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
199
+ cd support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
200
+ tar zxvf ../../../ dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
201
201
202
202
- name : Run CPython testbed
203
203
timeout-minutes : 10
204
- working-directory : support
204
+ working-directory : support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
205
205
run : |
206
206
# Run a representative subset of CPython core tests:
207
207
# - test_builtin as a test of core language tools
@@ -210,3 +210,66 @@ jobs:
210
210
# - test_bz2 as a simple test of third party libraries
211
211
# - test_ctypes as a test of FFI
212
212
python -m testbed run -- test --single-process --rerun -W test_builtin test_grammar test_os test_bz2 test_ctypes
213
+
214
+ crossenv-test :
215
+ name : Cross-platform env test (${{ matrix.multiarch }})
216
+ runs-on : macOS-latest
217
+ needs : [ config, build ]
218
+ strategy :
219
+ fail-fast : false
220
+ matrix :
221
+ include :
222
+ - platform : iOS
223
+ slice : ios-arm64_x86_64-simulator
224
+ multiarch : arm64-iphonesimulator
225
+ - platform : iOS
226
+ slice : ios-arm64_x86_64-simulator
227
+ multiarch : x86_64-iphonesimulator
228
+ - platform : iOS
229
+ slice : ios-arm64
230
+ multiarch : arm64-iphoneos
231
+
232
+ steps :
233
+
234
+
235
+ - name : Get build artifact
236
+
237
+ with :
238
+ pattern : Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
239
+ path : dist
240
+ merge-multiple : true
241
+
242
+ - name : Set up Python
243
+
244
+ with :
245
+ # Appending -dev ensures that we can always build the dev release.
246
+ # It's a no-op for versions that have been published.
247
+ python-version : ${{ needs.config.outputs.PYTHON_VER }}-dev
248
+ # Ensure that we *always* use the latest build, not a cached version.
249
+ # It's an edge case, but when a new alpha is released, we need to use it ASAP.
250
+ check-latest : true
251
+
252
+ - name : Unpack support package
253
+ run : |
254
+ mkdir -p support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
255
+ cd support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
256
+ tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
257
+
258
+ - name : Run cross-platform environment test
259
+ env :
260
+ PYTHON_CROSS_PLATFORM : ${{ matrix.platform }}
261
+ PYTHON_CROSS_SLICE : ${{ matrix.slice }}
262
+ PYTHON_CROSS_MULTIARCH : ${{ matrix.multiarch }}
263
+ run : |
264
+ # Create and activate a native virtual environment
265
+ python${{ needs.config.outputs.PYTHON_VER }} -m venv cross-venv
266
+ source cross-venv/bin/activate
267
+
268
+ # Install pytest
269
+ python -m pip install pytest
270
+
271
+ # Convert venv into cross-venv
272
+ python support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}/Python.xcframework/${{ matrix.slice }}/platform-config/${{ matrix.multiarch }}/make_cross_venv.py cross-venv
273
+
274
+ # Run the test suite
275
+ python -m pytest tests
0 commit comments