Skip to content

Commit 49f02be

Browse files
committed
Standardise workflow variables:
* Rename `config_hash` to `config-hash` * Rename `run_tests` to `run-tests` * Rename `run-win-msi` to `run-windows-msi` * Rename `run_hypothesis` to `run-hypothesis` * Rename `run_cifuzz` to `run-ci-fuzz`
1 parent 4169b46 commit 49f02be

File tree

3 files changed

+39
-39
lines changed

3 files changed

+39
-39
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# if: fromJSON(needs.check_source.outputs.run-docs)
3131
#
3232
# ${{
33-
# fromJSON(needs.check_source.outputs.run_tests)
33+
# fromJSON(needs.check_source.outputs.run-tests)
3434
# && 'truthy-branch'
3535
# || 'falsy-branch'
3636
# }}
@@ -52,7 +52,7 @@ jobs:
5252
image: ghcr.io/python/autoconf:2025.01.02.12581854023
5353
timeout-minutes: 60
5454
needs: check_source
55-
if: needs.check_source.outputs.run_tests == 'true'
55+
if: needs.check_source.outputs.run-tests == 'true'
5656
steps:
5757
- name: Install Git
5858
run: |
@@ -95,7 +95,7 @@ jobs:
9595
runs-on: ubuntu-24.04
9696
timeout-minutes: 60
9797
needs: check_source
98-
if: needs.check_source.outputs.run_tests == 'true'
98+
if: needs.check_source.outputs.run-tests == 'true'
9999
steps:
100100
- uses: actions/checkout@v4
101101
with:
@@ -110,7 +110,7 @@ jobs:
110110
with:
111111
path: config.cache
112112
# 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.check_source.outputs.config-hash }}-${{ env.pythonLocation }}
114114
- name: Install Dependencies
115115
run: sudo ./.github/workflows/posix-deps-apt.sh
116116
- name: Add ccache to PATH
@@ -154,7 +154,7 @@ jobs:
154154
Windows
155155
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156156
needs: check_source
157-
if: fromJSON(needs.check_source.outputs.run_tests)
157+
if: fromJSON(needs.check_source.outputs.run-tests)
158158
strategy:
159159
fail-fast: false
160160
matrix:
@@ -185,7 +185,7 @@ jobs:
185185
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
186186
Windows MSI${{ '' }}
187187
needs: check_source
188-
if: fromJSON(needs.check_source.outputs.run-win-msi)
188+
if: fromJSON(needs.check_source.outputs.run-windows-msi)
189189
strategy:
190190
matrix:
191191
arch:
@@ -201,7 +201,7 @@ jobs:
201201
macOS
202202
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
203203
needs: check_source
204-
if: needs.check_source.outputs.run_tests == 'true'
204+
if: needs.check_source.outputs.run-tests == 'true'
205205
strategy:
206206
fail-fast: false
207207
matrix:
@@ -226,7 +226,7 @@ jobs:
226226
free-threading: true
227227
uses: ./.github/workflows/reusable-macos.yml
228228
with:
229-
config_hash: ${{ needs.check_source.outputs.config_hash }}
229+
config_hash: ${{ needs.check_source.outputs.config-hash }}
230230
free-threading: ${{ matrix.free-threading }}
231231
os: ${{ matrix.os }}
232232

@@ -236,7 +236,7 @@ jobs:
236236
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237237
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
238238
needs: check_source
239-
if: needs.check_source.outputs.run_tests == 'true'
239+
if: needs.check_source.outputs.run-tests == 'true'
240240
strategy:
241241
matrix:
242242
bolt:
@@ -257,7 +257,7 @@ jobs:
257257
bolt: true
258258
uses: ./.github/workflows/reusable-ubuntu.yml
259259
with:
260-
config_hash: ${{ needs.check_source.outputs.config_hash }}
260+
config_hash: ${{ needs.check_source.outputs.config-hash }}
261261
bolt-optimizations: ${{ matrix.bolt }}
262262
free-threading: ${{ matrix.free-threading }}
263263
os: ${{ matrix.os }}
@@ -267,7 +267,7 @@ jobs:
267267
runs-on: ${{ matrix.os }}
268268
timeout-minutes: 60
269269
needs: check_source
270-
if: needs.check_source.outputs.run_tests == 'true'
270+
if: needs.check_source.outputs.run-tests == 'true'
271271
strategy:
272272
fail-fast: false
273273
matrix:
@@ -289,7 +289,7 @@ jobs:
289289
uses: actions/cache@v4
290290
with:
291291
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.check_source.outputs.config-hash }}
293293
- name: Register gcc problem matcher
294294
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
295295
- name: Install Dependencies
@@ -327,17 +327,17 @@ jobs:
327327
build_wasi:
328328
name: 'WASI'
329329
needs: check_source
330-
if: needs.check_source.outputs.run_tests == 'true'
330+
if: needs.check_source.outputs.run-tests == 'true'
331331
uses: ./.github/workflows/reusable-wasi.yml
332332
with:
333-
config_hash: ${{ needs.check_source.outputs.config_hash }}
333+
config_hash: ${{ needs.check_source.outputs.config-hash }}
334334

335335
test_hypothesis:
336336
name: "Hypothesis tests on Ubuntu"
337337
runs-on: ubuntu-24.04
338338
timeout-minutes: 60
339339
needs: check_source
340-
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
340+
if: needs.check_source.outputs.run-tests == 'true' && needs.check_source.outputs.run-hypothesis == 'true'
341341
env:
342342
OPENSSL_VER: 3.0.15
343343
PYTHONSTRICTEXTENSIONBUILD: 1
@@ -384,7 +384,7 @@ jobs:
384384
uses: actions/cache@v4
385385
with:
386386
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.check_source.outputs.config-hash }}
388388
- name: Configure CPython out-of-tree
389389
working-directory: ${{ env.CPYTHON_BUILDDIR }}
390390
run: |
@@ -453,7 +453,7 @@ jobs:
453453
runs-on: ${{ matrix.os }}
454454
timeout-minutes: 60
455455
needs: check_source
456-
if: needs.check_source.outputs.run_tests == 'true'
456+
if: needs.check_source.outputs.run-tests == 'true'
457457
strategy:
458458
matrix:
459459
os: [ubuntu-24.04]
@@ -471,7 +471,7 @@ jobs:
471471
uses: actions/cache@v4
472472
with:
473473
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.check_source.outputs.config-hash }}
475475
- name: Register gcc problem matcher
476476
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
477477
- name: Install Dependencies
@@ -516,22 +516,22 @@ jobs:
516516
Thread sanitizer
517517
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
518518
needs: check_source
519-
if: needs.check_source.outputs.run_tests == 'true'
519+
if: needs.check_source.outputs.run-tests == 'true'
520520
strategy:
521521
matrix:
522522
free-threading:
523523
- false
524524
- true
525525
uses: ./.github/workflows/reusable-tsan.yml
526526
with:
527-
config_hash: ${{ needs.check_source.outputs.config_hash }}
527+
config_hash: ${{ needs.check_source.outputs.config-hash }}
528528
free-threading: ${{ matrix.free-threading }}
529529

530530
cross-build-linux:
531531
name: Cross build Linux
532532
runs-on: ubuntu-latest
533533
needs: check_source
534-
if: needs.check_source.outputs.run_tests == 'true'
534+
if: needs.check_source.outputs.run-tests == 'true'
535535
steps:
536536
- uses: actions/checkout@v4
537537
with:
@@ -542,7 +542,7 @@ jobs:
542542
uses: actions/cache@v4
543543
with:
544544
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.check_source.outputs.config-hash }}
546546
- name: Register gcc problem matcher
547547
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
548548
- name: Set build dir
@@ -572,7 +572,7 @@ jobs:
572572
runs-on: ubuntu-latest
573573
timeout-minutes: 60
574574
needs: check_source
575-
if: needs.check_source.outputs.run_cifuzz == 'true'
575+
if: needs.check_source.outputs.run-ci-fuzz == 'true'
576576
permissions:
577577
security-events: write
578578
strategy:
@@ -611,7 +611,7 @@ jobs:
611611
if: always()
612612

613613
needs:
614-
- check_source # Transitive dependency, needed to access `run_tests` value
614+
- check_source # Transitive dependency, needed to access `run-tests` value
615615
- check-docs
616616
- check_autoconf_regen
617617
- check_generated_files
@@ -646,7 +646,7 @@ jobs:
646646
|| ''
647647
}}
648648
${{
649-
needs.check_source.outputs.run_tests != 'true'
649+
needs.check_source.outputs.run-tests != 'true'
650650
&& '
651651
check_autoconf_regen,
652652
check_generated_files,
@@ -661,14 +661,14 @@ jobs:
661661
|| ''
662662
}}
663663
${{
664-
!fromJSON(needs.check_source.outputs.run_cifuzz)
664+
!fromJSON(needs.check_source.outputs.run-ci-fuzz)
665665
&& '
666666
cifuzz,
667667
'
668668
|| ''
669669
}}
670670
${{
671-
!fromJSON(needs.check_source.outputs.run_hypothesis)
671+
!fromJSON(needs.check_source.outputs.run-hypothesis)
672672
&& '
673673
test_hypothesis,
674674
'

.github/workflows/reusable-change-detection.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@ on: # yamllint disable-line rule:truthy
2323
# || 'falsy-branch'
2424
# }}
2525
#
26-
config_hash:
26+
config-hash:
2727
description: Config hash value for use in cache keys
2828
value: ${{ jobs.compute-changes.outputs.config-hash }} # str
2929
run-docs:
3030
description: Whether to build the docs
3131
value: ${{ jobs.compute-changes.outputs.run-docs || false }} # bool
32-
run_tests:
32+
run-tests:
3333
description: Whether to run the regular tests
3434
value: ${{ jobs.compute-changes.outputs.run-tests || false }} # bool
35-
run-win-msi:
35+
run-windows-msi:
3636
description: Whether to run the MSI installer smoke tests
3737
value: >- # bool
38-
${{ jobs.compute-changes.outputs.run-win-msi || false }}
39-
run_hypothesis:
38+
${{ jobs.compute-changes.outputs.run-windows-msi || false }} # bool
39+
run-hypothesis:
4040
description: Whether to run the Hypothesis tests
4141
value: >- # bool
42-
${{ jobs.compute-changes.outputs.run-hypothesis || false }}
43-
run_cifuzz:
42+
${{ jobs.compute-changes.outputs.run-hypothesis || false }} # bool
43+
run-ci-fuzz:
4444
description: Whether to run the CIFuzz job
4545
value: >- # bool
46-
${{ jobs.compute-changes.outputs.run-cifuzz || false }}
46+
${{ jobs.compute-changes.outputs.run-ci-fuzz || false }} # bool
4747
4848
jobs:
4949
compute-changes:
@@ -52,11 +52,11 @@ jobs:
5252
timeout-minutes: 10
5353
outputs:
5454
config-hash: ${{ steps.config-hash.outputs.hash }}
55-
run-cifuzz: ${{ steps.changes.outputs.run-cifuzz }}
55+
run-ci-fuzz: ${{ steps.changes.outputs.run-ci-fuzz }}
5656
run-docs: ${{ steps.changes.outputs.run-docs }}
5757
run-hypothesis: ${{ steps.changes.outputs.run-hypothesis }}
5858
run-tests: ${{ steps.changes.outputs.run-tests }}
59-
run-win-msi: ${{ steps.changes.outputs.run-win-msi }}
59+
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
6060
steps:
6161
- uses: actions/setup-python@v5
6262
with:

Tools/build/compute-changes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ def write_github_output(outputs: Outputs) -> None:
180180
return
181181

182182
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f:
183-
f.write(f"run-cifuzz={bool_lower(outputs.run_ci_fuzz)}\n")
183+
f.write(f"run-ci-fuzz={bool_lower(outputs.run_ci_fuzz)}\n")
184184
f.write(f"run-docs={bool_lower(outputs.run_docs)}\n")
185185
f.write(f"run-hypothesis={bool_lower(outputs.run_hypothesis)}\n")
186186
f.write(f"run-tests={bool_lower(outputs.run_tests)}\n")
187-
f.write(f"run-win-msi={bool_lower(outputs.run_windows_msi)}\n")
187+
f.write(f"run-windows-msi={bool_lower(outputs.run_windows_msi)}\n")
188188

189189

190190
def bool_lower(value: bool, /) -> str:

0 commit comments

Comments
 (0)