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,34 @@ 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
+ ${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
281
+ needs : build-context
282
+ if : needs.build-context.outputs.run-tests == 'true'
282
283
strategy :
283
284
matrix :
284
285
free-threading :
285
286
- false
286
287
- true
287
288
uses : ./.github/workflows/reusable-ubuntu.yml
288
289
with :
289
- config_hash : ${{ needs.check_source.outputs.config_hash }}
290
+ config_hash : ${{ needs.build-context.outputs.config-hash }}
291
+ bolt-optimizations : ${{ matrix.bolt }}
290
292
free-threading : ${{ matrix.free-threading }}
291
293
292
294
build_ubuntu_ssltests :
293
295
name : ' Ubuntu SSL tests with OpenSSL'
294
296
runs-on : ${{ matrix.os }}
295
297
timeout-minutes : 60
296
- needs : check_source
297
- if : needs.check_source .outputs.run_tests == 'true'
298
+ needs : build-context
299
+ if : needs.build-context .outputs.run-tests == 'true'
298
300
strategy :
299
301
fail-fast : false
300
302
matrix :
@@ -315,7 +317,7 @@ jobs:
315
317
uses : actions/cache@v4
316
318
with :
317
319
path : config.cache
318
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
320
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
319
321
- name : Register gcc problem matcher
320
322
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
321
323
- name : Install dependencies
@@ -352,18 +354,18 @@ jobs:
352
354
353
355
build_wasi :
354
356
name : ' WASI'
355
- needs : check_source
356
- if : needs.check_source .outputs.run_tests == 'true'
357
+ needs : build-context
358
+ if : needs.build-context .outputs.run-tests == 'true'
357
359
uses : ./.github/workflows/reusable-wasi.yml
358
360
with :
359
- config_hash : ${{ needs.check_source .outputs.config_hash }}
361
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
360
362
361
363
test_hypothesis :
362
364
name : " Hypothesis tests on Ubuntu"
363
365
runs-on : ubuntu-24.04
364
366
timeout-minutes : 60
365
- needs : check_source
366
- if : needs.check_source .outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
367
+ needs : build-context
368
+ if : needs.build-context .outputs.run-tests == 'true'
367
369
env :
368
370
OPENSSL_VER : 3.0.15
369
371
PYTHONSTRICTEXTENSIONBUILD : 1
@@ -410,7 +412,7 @@ jobs:
410
412
uses : actions/cache@v4
411
413
with :
412
414
path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
413
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
415
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
414
416
- name : Configure CPython out-of-tree
415
417
working-directory : ${{ env.CPYTHON_BUILDDIR }}
416
418
run : |
@@ -477,8 +479,8 @@ jobs:
477
479
name : ' Address sanitizer'
478
480
runs-on : ${{ matrix.os }}
479
481
timeout-minutes : 60
480
- needs : check_source
481
- if : needs.check_source .outputs.run_tests == 'true'
482
+ needs : build-context
483
+ if : needs.build-context .outputs.run-tests == 'true'
482
484
strategy :
483
485
matrix :
484
486
os : [ubuntu-24.04]
@@ -496,7 +498,7 @@ jobs:
496
498
uses : actions/cache@v4
497
499
with :
498
500
path : config.cache
499
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
501
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
500
502
- name : Register gcc problem matcher
501
503
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
502
504
- name : Install dependencies
@@ -540,25 +542,25 @@ jobs:
540
542
name : >-
541
543
Thread sanitizer
542
544
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
543
- needs : check_source
544
- if : needs.check_source .outputs.run_tests == 'true'
545
+ needs : build-context
546
+ if : needs.build-context .outputs.run-tests == 'true'
545
547
strategy :
546
548
matrix :
547
549
free-threading :
548
550
- false
549
551
- true
550
552
uses : ./.github/workflows/reusable-tsan.yml
551
553
with :
552
- config_hash : ${{ needs.check_source .outputs.config_hash }}
554
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
553
555
free-threading : ${{ matrix.free-threading }}
554
556
555
557
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
556
558
cifuzz :
557
559
name : CIFuzz
558
560
runs-on : ubuntu-latest
559
561
timeout-minutes : 60
560
- needs : check_source
561
- if : needs.check_source .outputs.run_cifuzz == 'true'
562
+ needs : build-context
563
+ if : needs.build-context .outputs.run-ci-fuzz == 'true'
562
564
permissions :
563
565
security-events : write
564
566
strategy :
@@ -597,7 +599,7 @@ jobs:
597
599
if : always()
598
600
599
601
needs :
600
- - check_source # Transitive dependency, needed to access `run_tests ` value
602
+ - build-context # Transitive dependency, needed to access `run-tests ` value
601
603
- check-docs
602
604
- check_autoconf_regen
603
605
- check_generated_files
@@ -625,14 +627,14 @@ jobs:
625
627
test_hypothesis,
626
628
allowed-skips : >-
627
629
${{
628
- !fromJSON(needs.check_source .outputs.run-docs)
630
+ !fromJSON(needs.build-context .outputs.run-docs)
629
631
&& '
630
632
check-docs,
631
633
'
632
634
|| ''
633
635
}}
634
636
${{
635
- needs.check_source .outputs.run_tests != 'true'
637
+ needs.build-context .outputs.run-tests != 'true'
636
638
&& '
637
639
check_autoconf_regen,
638
640
check_generated_files,
@@ -643,21 +645,15 @@ jobs:
643
645
build_windows,
644
646
build_asan,
645
647
build_tsan,
648
+ test_hypothesis,
646
649
'
647
650
|| ''
648
651
}}
649
652
${{
650
- !fromJSON(needs.check_source .outputs.run_cifuzz )
653
+ !fromJSON(needs.build-context .outputs.run-ci-fuzz )
651
654
&& '
652
655
cifuzz,
653
656
'
654
657
|| ''
655
658
}}
656
- ${{
657
- !fromJSON(needs.check_source.outputs.run_hypothesis)
658
- && '
659
- test_hypothesis,
660
- '
661
- || ''
662
- }}
663
659
jobs : ${{ toJSON(needs) }}
0 commit comments