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_abi :
47
47
name : ' Check if the ABI has changed'
48
48
runs-on : ubuntu-22.04 # 24.04 causes spurious errors
49
- needs : check_source
50
- if : needs.check_source .outputs.run_tests == 'true'
49
+ needs : build-context
50
+ if : needs.build-context .outputs.run-tests == 'true'
51
51
steps :
52
52
- uses : actions/checkout@v4
53
53
with :
96
96
container :
97
97
image : ghcr.io/python/autoconf:2024.10.16.11360930377
98
98
timeout-minutes : 60
99
- needs : check_source
100
- if : needs.check_source .outputs.run_tests == 'true'
99
+ needs : build-context
100
+ if : needs.build-context .outputs.run-tests == 'true'
101
101
steps :
102
102
- name : Install Git
103
103
run : |
@@ -137,8 +137,8 @@ jobs:
137
137
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
138
138
runs-on : ubuntu-24.04
139
139
timeout-minutes : 60
140
- needs : check_source
141
- if : needs.check_source .outputs.run_tests == 'true'
140
+ needs : build-context
141
+ if : needs.build-context .outputs.run-tests == 'true'
142
142
steps :
143
143
- uses : actions/checkout@v4
144
144
with :
@@ -153,7 +153,7 @@ jobs:
153
153
with :
154
154
path : config.cache
155
155
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
156
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}-${{ env.pythonLocation }}
156
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}-${{ env.pythonLocation }}
157
157
- name : Install dependencies
158
158
run : sudo ./.github/workflows/posix-deps-apt.sh
159
159
- name : Add ccache to PATH
@@ -196,8 +196,8 @@ jobs:
196
196
name : >-
197
197
Windows
198
198
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
199
- needs : check_source
200
- if : fromJSON(needs.check_source .outputs.run_tests )
199
+ needs : build-context
200
+ if : fromJSON(needs.build-context .outputs.run-tests )
201
201
strategy :
202
202
fail-fast : false
203
203
matrix :
@@ -227,8 +227,8 @@ jobs:
227
227
build_windows_msi :
228
228
name : >- # ${{ '' } is a hack to nest jobs under the same sidebar category
229
229
Windows MSI${{ '' }}
230
- needs : check_source
231
- if : fromJSON(needs.check_source .outputs.run-win -msi)
230
+ needs : build-context
231
+ if : fromJSON(needs.build-context .outputs.run-windows -msi)
232
232
strategy :
233
233
matrix :
234
234
arch :
@@ -243,8 +243,8 @@ jobs:
243
243
name : >-
244
244
macOS
245
245
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
246
- needs : check_source
247
- if : needs.check_source .outputs.run_tests == 'true'
246
+ needs : build-context
247
+ if : needs.build-context .outputs.run-tests == 'true'
248
248
strategy :
249
249
fail-fast : false
250
250
matrix :
@@ -269,32 +269,32 @@ jobs:
269
269
free-threading : true
270
270
uses : ./.github/workflows/reusable-macos.yml
271
271
with :
272
- config_hash : ${{ needs.check_source .outputs.config_hash }}
272
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
273
273
free-threading : ${{ matrix.free-threading }}
274
274
os : ${{ matrix.os }}
275
275
276
276
build_ubuntu :
277
277
name : >-
278
278
Ubuntu
279
279
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
280
- needs : check_source
281
- if : needs.check_source .outputs.run_tests == 'true'
280
+ needs : build-context
281
+ if : needs.build-context .outputs.run-tests == 'true'
282
282
strategy :
283
283
matrix :
284
284
free-threading :
285
285
- false
286
286
- true
287
287
uses : ./.github/workflows/reusable-ubuntu.yml
288
288
with :
289
- config_hash : ${{ needs.check_source .outputs.config_hash }}
289
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
290
290
free-threading : ${{ matrix.free-threading }}
291
291
292
292
build_ubuntu_ssltests :
293
293
name : ' Ubuntu SSL tests with OpenSSL'
294
294
runs-on : ${{ matrix.os }}
295
295
timeout-minutes : 60
296
- needs : check_source
297
- if : needs.check_source .outputs.run_tests == 'true'
296
+ needs : build-context
297
+ if : needs.build-context .outputs.run-tests == 'true'
298
298
strategy :
299
299
fail-fast : false
300
300
matrix :
@@ -315,7 +315,7 @@ jobs:
315
315
uses : actions/cache@v4
316
316
with :
317
317
path : config.cache
318
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
318
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
319
319
- name : Register gcc problem matcher
320
320
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
321
321
- name : Install dependencies
@@ -352,18 +352,18 @@ jobs:
352
352
353
353
build_wasi :
354
354
name : ' WASI'
355
- needs : check_source
356
- if : needs.check_source .outputs.run_tests == 'true'
355
+ needs : build-context
356
+ if : needs.build-context .outputs.run-tests == 'true'
357
357
uses : ./.github/workflows/reusable-wasi.yml
358
358
with :
359
- config_hash : ${{ needs.check_source .outputs.config_hash }}
359
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
360
360
361
361
test_hypothesis :
362
362
name : " Hypothesis tests on Ubuntu"
363
363
runs-on : ubuntu-24.04
364
364
timeout-minutes : 60
365
- needs : check_source
366
- if : needs.check_source .outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
365
+ needs : build-context
366
+ if : needs.build-context .outputs.run-tests == 'true'
367
367
env :
368
368
OPENSSL_VER : 3.0.15
369
369
PYTHONSTRICTEXTENSIONBUILD : 1
@@ -410,7 +410,7 @@ jobs:
410
410
uses : actions/cache@v4
411
411
with :
412
412
path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
413
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
413
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
414
414
- name : Configure CPython out-of-tree
415
415
working-directory : ${{ env.CPYTHON_BUILDDIR }}
416
416
run : |
@@ -477,8 +477,8 @@ jobs:
477
477
name : ' Address sanitizer'
478
478
runs-on : ${{ matrix.os }}
479
479
timeout-minutes : 60
480
- needs : check_source
481
- if : needs.check_source .outputs.run_tests == 'true'
480
+ needs : build-context
481
+ if : needs.build-context .outputs.run-tests == 'true'
482
482
strategy :
483
483
matrix :
484
484
os : [ubuntu-24.04]
@@ -496,7 +496,7 @@ jobs:
496
496
uses : actions/cache@v4
497
497
with :
498
498
path : config.cache
499
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
499
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
500
500
- name : Register gcc problem matcher
501
501
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
502
502
- name : Install dependencies
@@ -540,25 +540,25 @@ jobs:
540
540
name : >-
541
541
Thread sanitizer
542
542
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
543
- needs : check_source
544
- if : needs.check_source .outputs.run_tests == 'true'
543
+ needs : build-context
544
+ if : needs.build-context .outputs.run-tests == 'true'
545
545
strategy :
546
546
matrix :
547
547
free-threading :
548
548
- false
549
549
- true
550
550
uses : ./.github/workflows/reusable-tsan.yml
551
551
with :
552
- config_hash : ${{ needs.check_source .outputs.config_hash }}
552
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
553
553
free-threading : ${{ matrix.free-threading }}
554
554
555
555
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
556
556
cifuzz :
557
557
name : CIFuzz
558
558
runs-on : ubuntu-latest
559
559
timeout-minutes : 60
560
- needs : check_source
561
- if : needs.check_source .outputs.run_cifuzz == 'true'
560
+ needs : build-context
561
+ if : needs.build-context .outputs.run-ci-fuzz == 'true'
562
562
permissions :
563
563
security-events : write
564
564
strategy :
@@ -597,7 +597,7 @@ jobs:
597
597
if : always()
598
598
599
599
needs :
600
- - check_source # Transitive dependency, needed to access `run_tests ` value
600
+ - build-context # Transitive dependency, needed to access `run-tests ` value
601
601
- check-docs
602
602
- check_autoconf_regen
603
603
- check_generated_files
@@ -625,14 +625,14 @@ jobs:
625
625
test_hypothesis,
626
626
allowed-skips : >-
627
627
${{
628
- !fromJSON(needs.check_source .outputs.run-docs)
628
+ !fromJSON(needs.build-context .outputs.run-docs)
629
629
&& '
630
630
check-docs,
631
631
'
632
632
|| ''
633
633
}}
634
634
${{
635
- needs.check_source .outputs.run_tests != 'true'
635
+ needs.build-context .outputs.run-tests != 'true'
636
636
&& '
637
637
check_autoconf_regen,
638
638
check_generated_files,
@@ -643,21 +643,15 @@ jobs:
643
643
build_windows,
644
644
build_asan,
645
645
build_tsan,
646
+ test_hypothesis,
646
647
'
647
648
|| ''
648
649
}}
649
650
${{
650
- !fromJSON(needs.check_source .outputs.run_cifuzz )
651
+ !fromJSON(needs.build-context .outputs.run-ci-fuzz )
651
652
&& '
652
653
cifuzz,
653
654
'
654
655
|| ''
655
656
}}
656
- ${{
657
- !fromJSON(needs.check_source.outputs.run_hypothesis)
658
- && '
659
- test_hypothesis,
660
- '
661
- || ''
662
- }}
663
657
jobs : ${{ toJSON(needs) }}
0 commit comments