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