@@ -178,140 +178,63 @@ jobs:
178
178
if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
179
179
run : make check-c-globals
180
180
181
- build_win32 :
182
- name : ' Windows (x86)'
183
- runs-on : windows-latest
184
- timeout-minutes : 60
185
- needs : check_source
186
- if : needs.check_source.outputs.run_tests == 'true'
187
- env :
188
- IncludeUwp : ' true'
189
- steps :
190
- - uses : actions/checkout@v4
191
- - name : Build CPython
192
- run : .\PCbuild\build.bat -e -d -p Win32
193
- - name : Display build info
194
- run : .\python.bat -m test.pythoninfo
195
- - name : Tests
196
- run : .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
197
-
198
- build_win_amd64 :
199
- name : ' Windows (x64)'
200
- runs-on : windows-latest
201
- timeout-minutes : 60
181
+ build_windows :
182
+ name : ' Windows'
202
183
needs : check_source
203
184
if : needs.check_source.outputs.run_tests == 'true'
204
- env :
205
- IncludeUwp : ' tru
10000
e'
206
- steps :
207
- - uses : actions/checkout@v4
208
- - name : Register MSVC problem matcher
209
- run : echo "::add-matcher::.github/problem-matchers/msvc.json"
210
- - name : Build CPython
211
- run : .\PCbuild\build.bat -e -d -p x64
212
- - name : Display build info
213
- run : .\python.bat -m test.pythoninfo
214
- - name : Tests
215
- run : .\PCbuild\rt.bat -p x64 -d -q --fast-ci
185
+ uses : ./.github/workflows/reusable-windows.yml
216
186
217
- build_win_arm64 :
218
- name : ' Windows (arm64)'
219
- runs-on : windows-latest
220
- timeout-minutes : 60
187
+ build_windows_free_threaded :
188
+ name : ' Windows (free-threaded)'
221
189
needs : check_source
222
- if : needs.check_source.outputs.run_tests == 'true'
223
- env :
224
- IncludeUwp : ' true'
225
- steps :
226
- - uses : actions/checkout@v4
227
- - name : Register MSVC problem matcher
228
- run : echo "::add-matcher::.github/problem-matchers/msvc.json"
229
- - name : Build CPython
230
- run : .\PCbuild\build.bat -e -d -p arm64
190
+ if : needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
191
+ uses : ./.github/workflows/reusable-windows.yml
192
+ with :
193
+ free-threaded : true
231
194
232
195
build_macos :
233
196
name : ' macOS'
234
197
needs : check_source
235
198
if : needs.check_source.outputs.run_tests == 'true'
236
- uses : ./.github/workflows/reusable-build- macos.yml
199
+ uses : ./.github/workflows/reusable-macos.yml
237
200
with :
238
201
config_hash : ${{ needs.check_source.outputs.config_hash }}
239
202
240
203
build_macos_free_threaded :
241
204
name : ' macOS (free-threaded)'
242
205
needs : check_source
243
206
if : needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
244
- uses : ./.github/workflows/reusable-build- macos.yml
207
+ uses : ./.github/workflows/reusable-macos.yml
245
208
with :
246
209
config_hash : ${{ needs.check_source.outputs.config_hash }}
247
210
free-threaded : true
248
211
249
212
build_ubuntu :
250
213
name : ' Ubuntu'
251
- runs-on : ubuntu-20.04
252
- timeout-minutes : 60
253
214
needs : check_source
254
215
if : needs.check_source.outputs.run_tests == 'true'
255
- env :
256
- OPENSSL_VER : 3.0.11
257
- PYTHONSTRICTEXTENSIONBUILD : 1
258
- steps :
259
- - uses : actions/checkout@v4
260
- - name : Register gcc problem matcher
261
- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
262
- - name : Install dependencies
263
- run : sudo ./.github/workflows/posix-deps-apt.sh
264
- - name : Configure OpenSSL env vars
265
- run : |
266
- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
267
- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
268
- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
269
- - name : ' Restore OpenSSL build'
270
- id : cache-openssl
271
- uses : actions/cache@v3
272
- with :
273
- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
274
- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
275
- - nam
4E34
e : Install OpenSSL
276
- if : steps.cache-openssl.outputs.cache-hit != 'true'
277
- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
278
- - name : Add ccache to PATH
279
- run : |
280
- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
281
- - name : Configure ccache action
282
- uses : hendrikmuhs/ccache-action@v1.2
283
- - name : Setup directory envs for out-of-tree builds
284
- run : |
285
- echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
286
- echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
287
- - name : Create directories for read-only out-of-tree builds
288
- run : mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
289
- - name : Bind mount sources read-only
290
- run : sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
291
- - name : Restore config.cache
292
- uses : actions/cache@v3
293
- with :
294
- path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
295
- key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
296
- - name : Configure CPython out-of-tree
297
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
298
- run : |
216
+ uses : ./.github/workflows/reusable-ubuntu.yml
217
+ with :
218
+ config_hash : ${{ needs.check_source.outputs.config_hash }}
219
+ options : |
299
220
../cpython-ro-srcdir/configure \
300
221
--config-cache \
301
222
--with-pydebug \
302
223
--with-openssl=$OPENSSL_DIR
303
- - name : Build CPython out-of-tree
304
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
305
- run : make -j4
306
- - name : Display build info
307
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
308
- run : make pythoninfo
309
- - name : Remount sources writable for tests
310
- # some tests write to srcdir, lack of pyc files slows down testing
311
- run : sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
312
- - name : Tests
313
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
314
- run : xvfb-run make test
224
+
225
+ build_ubuntu_free_threaded :
226
+ name : ' Ubuntu (free-threaded)'
227
+ needs : check_source
228
+ if : needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
229
+ uses : ./.github/workflows/reusable-ubuntu.yml
230
+ with :
231
+ config_hash : ${{ needs.check_source.outputs.config_hash }}
232
+ options : |
233
+ ../cpython-ro-srcdir/configure \
234
+ --config-cache \
235
+ --with-pydebug \
236
+ --with-openssl=$OPENSSL_DIR \
237
+ --disable-gil
315
238
316
239
build_ubuntu_ssltests :
317
240
name : ' Ubuntu SSL tests with OpenSSL'
@@ -577,12 +500,13 @@ jobs:
577
500
- check_source # Transitive dependency, needed to access `run_tests` value
578
501
- check-docs
579
502
- check_generated_files
580
- - build_win32
581
- - build_win_amd64
582
- - build_win_arm64
583
503
- build_macos
504
+ - build_macos_free_threaded
584
505
- build_ubuntu
506
+ - build_ubuntu_free_threaded
585
507
- build_ubuntu_ssltests
508
+ - build_windows
509
+ - build_windows_free_threaded
586
510
- test_hypothesis
587
511
- build_asan
588
512
- cifuzz
@@ -595,9 +519,10 @@ jobs:
595
519
with :
596
520
allowed-failures : >-
597
521
build_macos,
522
+ build_macos_free_threaded,
523
+ build_ubuntu_free_threaded,
598
524
build_ubuntu_ssltests,
599
- build_win32,
600
- build_win_arm64,
525
+ build_windows_free_threaded,
601
526
cifuzz,
602
527
test_hypothesis,
603
528
allowed-skips : >-
@@ -612,12 +537,13 @@ jobs:
612
537
needs.check_source.outputs.run_tests != 'true'
613
538
&& '
614
539
check_generated_files,
615
- build_win32,
616
- build_win_amd64,
617
- build_win_arm64,
618
540
build_macos,
541
+ build_macos_free_threaded,
619
542
build_ubuntu,
543
+ build_ubuntu_free_threaded,
620
544
build_ubuntu_ssltests,
545
+ build_windows,
546
+ build_windows_free_threaded,
621
547
build_asan,
622
548
'
623
549
|| ''
0 commit comments