43
43
if : fromJSON(needs.build-context.outputs.run-docs)
44
44
uses : ./.github/workflows/reusable-docs.yml
45
45
46
- check_autoconf_regen :
46
+ check-autoconf-regen :
47
47
name : ' Check if Autoconf files are up to date'
48
48
# Don't use ubuntu-latest but a specific version to make the job
49
49
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
62
62
with :
63
63
fetch-depth : 1
64
64
persist-credentials : false
65
- - name : Runner image version
66
- run : echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
67
65
- name : Check Autoconf and aclocal versions
68
66
run : |
69
67
grep "Generated by GNU Autoconf 2.72" configure
88
86
exit 1
89
87
fi
90
88
91
- check_generated_files :
89
+ check-generated-files :
92
90
name : ' Check if generated files are up to date'
93
91
# Don't use ubuntu-latest but a specific version to make the job
94
92
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
@@ -104,14 +102,14 @@ jobs:
104
102
with :
105
103
python-version : ' 3.x'
106
104
- name : Runner image version
107
- run : echo "IMAGE_VERSION= ${ImageVersion}" >> "$GITHUB_ENV"
105
+ run : echo "IMAGE_OS_VERSION=${ImageOS}- ${ImageVersion}" >> "$GITHUB_ENV"
108
106
- name : Restore config.cache
109
107
uses : actions/cache@v4
110
108
with :
111
109
path : config.cache
112
110
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
113
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
114
- - name : Install Dependencies
111
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
112
+ - name : Install dependencies
115
113
run : sudo ./.github/workflows/posix-deps-apt.sh
116
114
- name : Add ccache to PATH
117
115
run : echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
@@ -149,12 +147,12 @@ jobs:
149
147
if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
150
148
run : make check-c-globals
151
149
152
- build_windows :
150
+ build-windows :
153
151
name : >-
154
152
Windows
155
153
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156
154
needs : build-context
157
- if : fromJSON(needs.build-context.outputs.run-tests)
155
+ if : fromJSON(needs.build-context.outputs.run-windows- tests)
158
156
strategy :
159
157
fail-fast : false
160
158
matrix :
@@ -181,12 +179,13 @@ jobs:
181
179
arch : ${{ matrix.arch }}
182
180
free-threading : ${{ matrix.free-threading }}
183
181
184
- build_windows_msi :
182
+ build-windows-msi :
185
183
name : >- # ${{ '' } is a hack to nest jobs under the same sidebar category
186
184
Windows MSI${{ '' }}
187
185
needs : build-context
188
186
if : fromJSON(needs.build-context.outputs.run-windows-msi)
189
187
strategy :
188
+ fail-fast : false
190
189
matrix :
191
190
arch :
192
191
- x86
@@ -196,7 +195,7 @@ jobs:
196
195
with :
197
196
arch : ${{ matrix.arch }}
198
197
199
- build_macos :
198
+ build-macos :
200
199
name : >-
201
200
macOS
202
201
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -230,14 +229,15 @@ jobs:
230
229
free-threading : ${{ matrix.free-threading }}
231
230
os : ${{ matrix.os }}
232
231
233
- build_ubuntu :
232
+ build-ubuntu :
234
233
name : >-
235
234
Ubuntu
236
235
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237
236
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
238
237
needs : build-context
239
238
if : needs.build-context.outputs.run-tests == 'true'
240
239
strategy :
240
+ fail-fast : false
241
241
matrix :
242
242
bolt :
243
243
- false
@@ -262,7 +262,7 @@ jobs:
262
262
free-threading : ${{ matrix.free-threading }}
263
263
os : ${{ matrix.os }}
264
264
265
- build_ubuntu_ssltests :
265
+ build-ubuntu-ssltests :
266
266
name : ' Ubuntu SSL tests with OpenSSL'
267
267
runs-on : ${{ matrix.os }}
268
268
timeout-minutes : 60
@@ -284,15 +284,15 @@ jobs:
284
284
with :
285
285
persist-credentials : false
286
286
- name : Runner image version
287
- run : echo "IMAGE_VERSION= ${ImageVersion}" >> "$GITHUB_ENV"
287
+ run : echo "IMAGE_OS_VERSION=${ImageOS}- ${ImageVersion}" >> "$GITHUB_ENV"
288
288
- name : Restore config.cache
289
289
uses : actions/cache@v4
290
290
with :
291
291
path : config.cache
292
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
292
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
293
293
- name : Register gcc problem matcher
294
294
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
295
- - name : Install Dependencies
295
+ - name : Install dependencies
296
296
run : sudo ./.github/workflows/posix-deps-apt.sh
297
297
- name : Configure OpenSSL env vars
298
298
run : |
@@ -324,15 +324,15 @@ jobs:
324
324
- name : SSL tests
325
325
run : ./python Lib/test/ssltests.py
326
326
327
- build_wasi :
327
+ build-wasi :
328
328
name : ' WASI'
329
329
needs : build-context
330
330
if : needs.build-context.outputs.run-tests == 'true'
331
331
uses : ./.github/workflows/reusable-wasi.yml
332
332
with :
333
333
config_hash : ${{ needs.build-context.outputs.config-hash }}
334
334
335
- test_hypothesis :
335
+ test-hypothesis :
336
336
name : " Hypothesis tests on Ubuntu"
337
337
runs-on : ubuntu-24.04
338
338
timeout-minutes : 60
@@ -347,7 +347,7 @@ jobs:
347
347
persist-credentials : false
348
348
- name : Register gcc problem matcher
349
349
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
350
- - name : Install Dependencies
350
+ - name : Install dependencies
351
351
run : sudo ./.github/workflows/posix-deps-apt.sh
352
352
- name : Configure OpenSSL env vars
353
353
run : |
@@ -379,12 +379,12 @@ jobs:
379
379
- name : Bind mount sources read-only
380
380
run : sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
381
381
- name : Runner image version
382
- run : echo "IMAGE_VERSION= ${ImageVersion}" >> "$GITHUB_ENV"
382
+ run : echo "IMAGE_OS_VERSION=${ImageOS}- ${ImageVersion}" >> "$GITHUB_ENV"
383
383
- name : Restore config.cache
384
384
uses : actions/cache@v4
385
385
with :
386
386
path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
387
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
387
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
388
388
- name : Configure CPython out-of-tree
389
389
working-directory : ${{ env.CPYTHON_BUILDDIR }}
390
390
run : |
@@ -447,14 +447,14 @@ jobs:
447
447
name : hypothesis-example-db
448
448
path : ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/
449
449
450
-
451
- build_asan :
450
+ build-asan :
452
451
name : ' Address sanitizer'
453
452
runs-on : ${{ matrix.os }}
454
453
timeout-minutes : 60
455
454
needs : build-context
456
455
if : needs.build-context.outputs.run-tests == 'true'
457
456
strategy :
457
+ fail-fast : false
458
458
matrix :
459
459
os : [ubuntu-24.04]
460
460
env :
@@ -466,15 +466,15 @@ jobs:
466
466
with :
467
467
persist-credentials : false
468
468
- name : Runner image version
469
- run : echo "IMAGE_VERSION= ${ImageVersion}" >> "$GITHUB_ENV"
469
+ run : echo "IMAGE_OS_VERSION=${ImageOS}- ${ImageVersion}" >> "$GITHUB_ENV"
470
470
- name : Restore config.cache
471
471
uses : actions/cache@v4
472
472
with :
473
473
path : config.cache
474
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
474
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
475
475
- name : Register gcc problem matcher
476
476
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
477
- - name : Install Dependencies
477
+ - name : Install dependencies
478
478
run : sudo ./.github/workflows/posix-deps-apt.sh
479
479
- name : Set up GCC-10 for ASAN
480
480
uses : egor-tensin/setup-gcc@v1
@@ -511,13 +511,14 @@ jobs:
511
511
- name : Tests
512
512
run : xvfb-run make ci
513
513
514
- build_tsan :
514
+ build-tsan :
515
515
name : >-
516
516
Thread sanitizer
517
517
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
518
518
needs : build-context
519
519
if : needs.build-context.outputs.run-tests == 'true'
520
520
strategy :
521
+ fail-fast : false
521
522
matrix :
522
523
free-threading :
523
524
- false
@@ -530,26 +531,27 @@ jobs:
530
531
cross-build-linux :
531
532
name : Cross build Linux
532
533
runs-on : ubuntu-latest
534
+ timeout-minutes : 60
533
535
needs : build-context
534
536
if : needs.build-context.outputs.run-tests == 'true'
535
537
steps :
536
538
- uses : actions/checkout@v4
537
539
with :
538
540
persist-credentials : false
539
541
- name : Runner image version
540
- run : echo "IMAGE_VERSION= ${ImageVersion}" >> "$GITHUB_ENV"
542
+ run : echo "IMAGE_OS_VERSION=${ImageOS}- ${ImageVersion}" >> "$GITHUB_ENV"
541
543
- name : Restore config.cache
542
544
uses : actions/cache@v4
543
545
with :
544
546
path : config.cache
545
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
547
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
546
548
- name : Register gcc problem matcher
547
549
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
548
550
- name : Set build dir
549
551
run :
550
552
# an absolute path outside of the working directoy
551
553
echo "BUILD_DIR=$(realpath ${{ github.workspace }}/../build)" >> "$GITHUB_ENV"
552
- - name : Install Dependencies
554
+ - name : Install dependencies
553
555
run : sudo ./.github/workflows/posix-deps-apt.sh
554
556
- name : Configure host build
555
557
run : ./configure --prefix="$BUILD_DIR/host-python"
@@ -594,8 +596,8 @@ jobs:
594
596
output-sarif : true
595
597
sanitizer : ${{ matrix.sanitizer }}
596
598
- name : Upload crash
597
- uses : actions/upload-artifact@v4
598
599
if : failure() && steps.build.outcome == 'success'
600
+ uses : actions/upload-artifact@v4
599
601
with :
600
602
name : ${{ matrix.sanitizer }}-artifacts
601
603
path : ./out/artifacts
@@ -608,35 +610,35 @@ jobs:
608
610
609
611
all-required-green : # This job does nothing and is only used for the branch protection
610
612
name : All required checks pass
611
- if : always()
612
-
613
+ runs-on : ubuntu-latest
614
+ timeout-minutes : 5
613
615
needs :
614
616
- build-context # Transitive dependency, needed to access `run-tests` value
615
617
- check-docs
616
- - check_autoconf_regen
617
- - check_generated_files
618
- - build_macos
619
- - build_ubuntu
620
- - build_ubuntu_ssltests
621
- - build_wasi
622
- - build_windows
623
- - build_windows_msi
624
- - test_hypothesis
625
- - build_asan
626
- - build_tsan
618
+ - check-autoconf-regen
619
+ - check-generated-files
620
+ - build-windows
621
+ - build-windows-msi
622
+ - build-macos
623
+ - build-ubuntu
624
+ - build-ubuntu-ssltests
625
+ - build-wasi
626
+ - test-hypothesis
627
+ - build-asan
628
+ - build-tsan
629
+ - cross-build-linux
627
630
- cifuzz
628
-
629
- runs-on : ubuntu-latest
631
+ if : always()
630
632
631
633
steps :
632
634
- name : Check whether the needed jobs succeeded or failed
633
635
uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
634
636
with :
635
637
allowed-failures : >-
636
- build_ubuntu_ssltests,
637
- build_windows_msi,
638
+ build-windows-msi,
639
+ build-ubuntu-ssltests,
640
+ test-hypothesis,
638
641
cifuzz,
639
- test_hypothesis,
640
642
allowed-skips : >-
641
643
${{
642
644
!fromJSON(needs.build-context.outputs.run-docs)
@@ -648,16 +650,23 @@ jobs:
648
650
${{
649
651
needs.build-context.outputs.run-tests != 'true'
650
652
&& '
651
- check_autoconf_regen,
652
- check_generated_files,
653
- build_macos,
654
- build_ubuntu,
655
- build_ubuntu_ssltests,
656
- build_wasi,
657
- build_windows,
658
- build_asan,
659
- build_tsan,
660
- test_hypothesis,
653
+ check-autoconf-regen,
654
+ check-generated-files,
655
+ build-macos,
656
+ build-ubuntu,
657
+ build-ubuntu-ssltests,
658
+ build-wasi,
659
+ test-hypothesis,
660
+ build-asan,
661
+ build-tsan,
662
+ cross-build-linux,
663
+ '
664
+ || ''
665
+ }}
666
+ ${{
667
+ !fromJSON(needs.build-context.outputs.run-windows-tests)
668
+ && '
669
+ build-windows,
661
670
'
662
671
|| ''
663
672
}}
0 commit comments