22
22
FORCE_COLOR : 1
23
23
24
24
jobs :
25
- check_source :
25
+ build-context :
26
26
name : Change detection
27
27
# To use boolean outputs from this job, parse them as JSON.
28
28
# Here's some examples:
29
29
#
30
- # if: fromJSON(needs.check_source .outputs.run-docs)
30
+ # if: fromJSON(needs.build-context .outputs.run-docs)
31
31
#
32
32
# ${{
33
- # fromJSON(needs.check_source .outputs.run_tests )
33
+ # fromJSON(needs.build-context .outputs.run-tests )
34
34
# && 'truthy-branch'
35
35
# || 'falsy-branch'
36
36
# }}
37
37
#
38
- uses : ./.github/workflows/reusable-change-detection .yml
38
+ uses : ./.github/workflows/reusable-context .yml
39
39
40
40
check-docs :
41
41
name : Docs
42
- needs : check_source
43
- if : fromJSON(needs.check_source .outputs.run-docs)
42
+ needs : build-context
43
+ if : fromJSON(needs.build-context .outputs.run-docs)
44
44
uses : ./.github/workflows/reusable-docs.yml
45
45
46
46
check_autoconf_regen :
51
51
container :
52
52
image : ghcr.io/python/autoconf:2025.01.02.12581854023
53
53
timeout-minutes : 60
54
- needs : check_source
55
- if : needs.check_source .outputs.run_tests == 'true'
54
+ needs : build-context
55
+ if : needs.build-context .outputs.run-tests == 'true'
56
56
steps :
57
57
- name : Install Git
58
58
run : |
94
94
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
95
95
runs-on : ubuntu-24.04
96
96
timeout-minutes : 60
97
- needs : check_source
98
- if : needs.check_source .outputs.run_tests == 'true'
97
+ needs : build-context
98
+ if : needs.build-context .outputs.run-tests == 'true'
99
99
steps :
100
100
- uses : actions/checkout@v4
101
101
with :
@@ -110,7 +110,7 @@ jobs:
110
110
with :
111
111
path : config.cache
112
112
# 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.check_source .outputs.config_hash }}-${{ env.pythonLocation }}
113
+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context .outputs.config-hash }}-${{ env.pythonLocation }}
114
114
- name : Install Dependencies
115
115
run : sudo ./.github/workflows/posix-deps-apt.sh
116
116
- name : Add ccache to PATH
@@ -153,8 +153,8 @@ jobs:
153
153
name : >-
154
154
Windows
155
155
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156
- needs : check_source
157
- if : fromJSON(needs.check_source .outputs.run_tests )
156
+ needs : build-context
157
+ if : fromJSON(needs.build-context .outputs.run-tests )
158
158
strategy :
159
159
fail-fast : false
160
160
matrix :
@@ -184,8 +184,8 @@ jobs:
184
184
build_windows_msi :
185
185
name : >- # ${{ '' } is a hack to nest jobs under the same sidebar category
186
186
Windows MSI${{ '' }}
187
- needs : check_source
188
- if : fromJSON(needs.check_source .outputs.run-win -msi)
187
+ needs : build-context
188
+ if : fromJSON(needs.build-context .outputs.run-windows -msi)
189
189
strategy :
190
190
matrix :
191
191
arch :
@@ -200,8 +200,8 @@ jobs:
200
200
name : >-
201
201
macOS
202
202
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
203
- needs : check_source
204
- if : needs.check_source .outputs.run_tests == 'true'
203
+ needs : build-context
204
+ if : needs.build-context .outputs.run-tests == 'true'
205
205
strategy :
206
206
fail-fast : false
207
207
matrix :
@@ -226,7 +226,7 @@ jobs:
226
226
free-threading : true
227
227
uses : ./.github/workflows/reusable-macos.yml
228
228
with :
229
- config_hash : ${{ needs.check_source .outputs.config_hash }}
229
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
230
230
free-threading : ${{ matrix.free-threading }}
231
231
os : ${{ matrix.os }}
232
232
@@ -235,8 +235,8 @@ jobs:
235
235
Ubuntu
236
236
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237
237
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
238
- needs : check_source
239
- if : needs.check_source .outputs.run_tests == 'true'
238
+ needs : build-context
239
+ if : needs.build-context .outputs.run-tests == 'true'
240
240
strategy :
241
241
matrix :
242
242
bolt :
@@ -257,7 +257,7 @@ jobs:
257
257
bolt : true
258
258
uses : ./.github/workflows/reusable-ubuntu.yml
259
259
with :
260
- config_hash : ${{ needs.check_source .outputs.config_hash }}
260
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
261
261
bolt-optimizations : ${{ matrix.bolt }}
262
262
free-threading : ${{ matrix.free-threading }}
263
263
os : ${{ matrix.os }}
@@ -266,8 +266,8 @@ jobs:
266
266
name : ' Ubuntu SSL tests with OpenSSL'
267
267
runs-on : ${{ matrix.os }}
268
268
timeout-minutes : 60
269
- needs : check_source
270
- if : needs.check_source .outputs.run_tests == 'true'
269
+ needs : build-context
270
+ if : needs.build-context .outputs.run-tests == 'true'
271
271
strategy :
272
272
fail-fast : false
273
273
matrix :
@@ -289,7 +289,7 @@ jobs:
289
289
uses : actions/cache@v4
290
290
with :
291
291
path : config.cache
292
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source .outputs.config_hash }}
292
+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_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
295
- name : Install Dependencies
@@ -326,18 +326,18 @@ jobs:
326
326
327
327
build_wasi :
328
328
name : ' WASI'
329
- needs : check_source
330
- if : needs.check_source .outputs.run_tests == 'true'
329
+ needs : build-context
330
+ if : needs.build-context .outputs.run-tests == 'true'
331
331
uses : ./.github/workflows/reusable-wasi.yml
332
332
with :
333
- config_hash : ${{ needs.check_source .outputs.config_hash }}
333
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
334
334
335
335
test_hypothesis :
336
336
name : " Hypothesis tests on Ubuntu"
337
337
runs-on : ubuntu-24.04
338
338
timeout-minutes : 60
339
- needs : check_source
340
- if : needs.check_source .outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
339
+ needs : build-context
340
+ if : needs.build-context .outputs.run-tests == 'true'
341
341
env :
342
342
OPENSSL_VER : 3.0.15
343
343
PYTHONSTRICTEXTENSIONBUILD : 1
@@ -384,7 +384,7 @@ jobs:
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.check_source .outputs.config_hash }}
387
+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_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 : |
@@ -452,8 +452,8 @@ jobs:
452
452
name : ' Address sanitizer'
453
453
runs-on : ${{ matrix.os }}
454
454
timeout-minutes : 60
455
- needs : check_source
456
- if : needs.check_source .outputs.run_tests == 'true'
455
+ needs : build-context
456
+ if : needs.build-context .outputs.run-tests == 'true'
457
457
strategy :
458
458
matrix :
459
459
os : [ubuntu-24.04]
@@ -471,7 +471,7 @@ jobs:
471
471
uses : actions/cache@v4
472
472
with :
473
473
path : config.cache
474
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source .outputs.config_hash }}
474
+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_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
477
- name : Install Dependencies
@@ -515,23 +515,23 @@ jobs:
515
515
name : >-
516
516
Thread sanitizer
517
517
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
518
- needs : check_source
519
- if : needs.check_source .outputs.run_tests == 'true'
518
+ needs : build-context
519
+ if : needs.build-context .outputs.run-tests == 'true'
520
520
strategy :
521
521
matrix :
522
522
free-threading :
523
523
- false
524
524
- true
525
525
uses : ./.github/workflows/reusable-tsan.yml
526
526
with :
527
- config_hash : ${{ needs.check_source .outputs.config_hash }}
527
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
528
528
free-threading : ${{ matrix.free-threading }}
529
529
530
530
cross-build-linux :
531
531
name : Cross build Linux
532
532
runs-on : ubuntu-latest
533
- needs : check_source
534
- if : needs.check_source .outputs.run_tests == 'true'
533
+ needs : build-context
534
+ if : needs.build-context .outputs.run-tests == 'true'
535
535
steps :
536
536
- uses : actions/checkout@v4
537
537
with :
@@ -542,7 +542,7 @@ jobs:
542
542
uses : actions/cache@v4
543
543
with :
544
544
path : config.cache
545
- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source .outputs.config_hash }}
545
+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context .outputs.config-hash }}
546
546
- name : Register gcc problem matcher
547
547
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
548
548
- name : Set build dir
@@ -571,8 +571,8 @@ jobs:
571
571
name : CIFuzz
572
572
runs-on : ubuntu-latest
573
573
timeout-minutes : 60
574
- needs : check_source
575
- if : needs.check_source .outputs.run_cifuzz == 'true'
574
+ needs : build-context
575
+ if : needs.build-context .outputs.run-ci-fuzz == 'true'
576
576
permissions :
577
577
security-events : write
578
578
strategy :
@@ -611,7 +611,7 @@ jobs:
611
611
if : always()
612
612
613
613
needs :
614
- - check_source # Transitive dependency, needed to access `run_tests ` value
614
+ - build-context # Transitive dependency, needed to access `run-tests ` value
615
615
- check-docs
616
616
- check_autoconf_regen
617
617
- check_generated_files
@@ -639,14 +639,14 @@ jobs:
639
639
test_hypothesis,
640
640
allowed-skips : >-
641
641
${{
642
- !fromJSON(needs.check_source .outputs.run-docs)
642
+ !fromJSON(needs.build-context .outputs.run-docs)
643
643
&& '
644
644
check-docs,
645
645
'
646
646
|| ''
647
647
}}
648
648
${{
649
- needs.check_source .outputs.run_tests != 'true'
649
+ needs.build-context .outputs.run-tests != 'true'
650
650
&& '
651
651
check_autoconf_regen,
652
652
check_generated_files,
@@ -657,21 +657,15 @@ jobs:
657
657
build_windows,
658
658
build_asan,
659
659
build_tsan,
660
+ test_hypothesis,
660
661
'
661
662
|| ''
662
663
}}
663
664
${{
664
- !fromJSON(needs.check_source .outputs.run_cifuzz )
665
+ !fromJSON(needs.build-context .outputs.run-ci-fuzz )
665
666
&& '
666
667
cifuzz,
667
668
'
668
669
|| ''
669
670
}}
670
- ${{
671
- !fromJSON(needs.check_source.outputs.run_hypothesis)
672
- && '
673
- test_hypothesis,
674
- '
675
- || ''
676
- }}
677
671
jobs : ${{ toJSON(needs) }}
0 commit comments