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
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
@@ -199,8 +199,8 @@ jobs:
199
199
name : >-
200
200
Windows
201
201
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
202
- needs : check_source
203
- if : fromJSON(needs.check_source .outputs.run_tests )
202
+ needs : build-context
203
+ if : fromJSON(needs.build-context .outputs.run-tests )
204
204
strategy :
205
205
matrix :
206
206
arch :
@@ -218,8 +218,8 @@ jobs:
218
218
build_windows_msi :
219
219
name : >- # ${{ '' } is a hack to nest jobs under the same sidebar category
220
220
Windows MSI${{ '' }}
221
- needs : check_source
222
- if : fromJSON(needs.check_source .outputs.run-win -msi)
221
+ needs : build-context
222
+ if : fromJSON(needs.build-context .outputs.run-windows -msi)
223
223
strategy :
224
224
matrix :
225
225
arch :
@@ -234,8 +234,8 @@ jobs:
234
234
name : >-
235
235
macOS
236
236
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237
- needs : check_source
238
- if : needs.check_source .outputs.run_tests == 'true'
237
+ needs : build-context
238
+ if : needs.build-context .outputs.run-tests == 'true'
239
239
strategy :
240
240
fail-fast : false
241
241
matrix :
@@ -260,32 +260,32 @@ jobs:
260
260
free-threading : true
261
261
uses : ./.github/workflows/reusable-macos.yml
262
262
with :
263
- config_hash : ${{ needs.check_source .outputs.config_hash }}
263
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
264
264
free-threading : ${{ matrix.free-threading }}
265
265
os : ${{ matrix.os }}
266
266
267
267
build_ubuntu :
268
268
name : >-
269
269
Ubuntu
270
270
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
271
- needs : check_source
272
- if : needs.check_source .outputs.run_tests == 'true'
271
+ needs : build-context
272
+ if : needs.build-context .outputs.run-tests == 'true'
273
273
strategy :
274
274
matrix :
275
275
free-threading :
276
276
- false
277
277
# - true
278
278
uses : ./.github/workflows/reusable-ubuntu.yml
279
279
with :
280
- config_hash : ${{ needs.check_source .outputs.config_hash }}
280
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
281
281
free-threading : ${{ matrix.free-threading }}
282
282
283
283
build_ubuntu_ssltests :
284
284
name : ' Ubuntu SSL tests with OpenSSL'
285
285
runs-on : ${{ matrix.os }}
286
286
timeout-minutes : 60
287
- needs : check_source
288
- if : needs.check_source .outputs.run_tests == 'true'
287
+ needs : build-context
288
+ if : needs.build-context .outputs.run-tests == 'true'
289
289
strategy :
290
290
fail-fast : false
291
291
matrix :
@@ -306,7 +306,7 @@ jobs:
306
306
uses : actions/cache@v4
307
307
with :
308
308
path : config.cache
309
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
309
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
310
310
- name : Register gcc problem matcher
311
311
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
312
312
- name : Install dependencies
@@ -345,8 +345,8 @@ jobs:
345
345
name : " Hypothesis tests on Ubuntu"
346
346
runs-on : ubuntu-24.04
347
347
timeout-minutes : 60
348
- needs : check_source
349
- if : needs.check_source .outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
348
+ needs : build-context
349
+ if : needs.build-context .outputs.run-tests == 'true'
350
350
env :
351
351
OPENSSL_VER : 3.0.15
352
352
PYTHONSTRICTEXTENSIONBUILD : 1
@@ -393,7 +393,7 @@ jobs:
393
393
uses : actions/cache@v4
394
394
with :
395
395
path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
396
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
396
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
397
397
- name : Configure CPython out-of-tree
398
398
working-directory : ${{ env.CPYTHON_BUILDDIR }}
399
399
run : |
@@ -460,8 +460,8 @@ jobs:
460
460
name : ' Address sanitizer'
461
461
runs-on : ubuntu-22.04
462
462
timeout-minutes : 60
463
- needs : check_source
464
- if : needs.check_source .outputs.run_tests == 'true'
463
+ needs : build-context
464
+ if : needs.build-context .outputs.run-tests == 'true'
465
465
strategy :
466
466
matrix :
467
467
os : [ubuntu-24.04]
@@ -479,7 +479,7 @@ jobs:
479
479
uses : actions/cache@v4
480
480
with :
481
481
path : config.cache
482
- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source .outputs.config_hash }}
482
+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context .outputs.config-hash }}
483
483
- name : Register gcc problem matcher
484
484
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
485
485
- name : Install dependencies
@@ -523,23 +523,23 @@ jobs:
523
523
name : >-
524
524
Thread sanitizer
525
525
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
526
- needs : check_source
527
- if : needs.check_source .outputs.run_tests == 'true'
526
+ needs : build-context
527
+ if : needs.build-context .outputs.run-tests == 'true'
528
528
strategy :
529
529
matrix :
530
530
free-threading :
531
531
- false
532
532
uses : ./.github/workflows/reusable-tsan.yml
533
533
with :
534
- config_hash : ${{ needs.check_source .outputs.config_hash }}
534
+ config_hash : ${{ needs.build-context .outputs.config-hash }}
535
535
free-threading : ${{ matrix.free-threading }}
536
536
537
537
all-required-green : # This job does nothing and is only used for the branch protection
538
538
name : All required checks pass
539
539
if : always()
540
540
541
541
needs :
542
- - check_source # Transitive dependency, needed to access `run_tests ` value
542
+ - build-context # Transitive dependency, needed to access `run-tests ` value
543
543
- check-docs
544
544
- check_autoconf_regen
545
545
- check_generated_files
@@ -564,14 +564,14 @@ jobs:
564
564
test_hypothesis,
565
565
allowed-skips : >-
566
566
${{
567
- !fromJSON(needs.check_source .outputs.run-docs)
567
+ !fromJSON(needs.build-context .outputs.run-docs)
568
568
&& '
569
569
check-docs,
570
570
'
571
571
|| ''
572
572
}}
573
573
${{
574
- needs.check_source .outputs.run_tests != 'true'
574
+ needs.build-context .outputs.run-tests != 'true'
575
575
&& '
576
576
check_autoconf_regen,
577
577
check_generated_files,
@@ -581,12 +581,6 @@ jobs:
581
581
build_windows,
582
582
build_asan,
583
583
build_tsan,
584
- '
585
- || ''
586
- }}
587
- ${{
588
- !fromJSON(needs.check_source.outputs.run_hypothesis)
589
- && '
590
584
test_hypothesis,
591
585
'
592
586
|| ''
0 commit comments