Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59c3eb4

Browse files
authored
[3.12] GH-103180: Set a timeout for every job in GitHub Actions (GH-130375) (#130432)
(cherry picked from commit d0a1e5c)
1 parent f452b81 commit 59c3eb4

7 files changed

+43
-45
lines changed

.github/workflows/build.yml

+36-38
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
if: fromJSON(needs.build-context.outputs.run-docs)
4444
uses: ./.github/workflows/reusable-docs.yml
4545

46-
check_abi:
46+
check-abi:
4747
name: 'Check if the ABI has changed'
4848
runs-on: ubuntu-22.04
4949
needs: build-context
@@ -88,7 +88,7 @@ jobs:
8888
name: abi-data
8989
path: ./Doc/data/*.abi
9090

91-
check_autoconf_regen:
91+
check-autoconf-regen:
9292
name: 'Check if Autoconf files are up to date'
9393
# Don't use ubuntu-latest but a specific version to make the job
9494
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
@@ -131,7 +131,7 @@ jobs:
131131
exit 1
132132
fi
133133
134-
check_generated_files:
134+
check-generated-files:
135135
name: 'Check if generated files are up to date'
136136
# Don't use ubuntu-latest but a specific version to make the job
137137
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
@@ -195,7 +195,7 @@ jobs:
195195
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
196196
run: make check-c-globals
197197

198-
build_windows:
198+
build-windows:
199199
name: >-
200200
Windows
201201
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -215,7 +215,7 @@ jobs:
215215
arch: ${{ matrix.arch }}
216216
free-threading: ${{ matrix.free-threading }}
217217

218-
build_windows_msi:
218+
build-windows-msi:
219219
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
220220
Windows MSI${{ '' }}
221221
needs: build-context
@@ -230,7 +230,7 @@ jobs:
230230
with:
231231
arch: ${{ matrix.arch }}
232232

233-
build_macos:
233+
build-macos:
234234
name: >-
235235
macOS
236236
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -264,7 +264,7 @@ jobs:
264264
free-threading: ${{ matrix.free-threading }}
265265
os: ${{ matrix.os }}
266266

267-
build_ubuntu:
267+
build-ubuntu:
268268
name: >-
269269
Ubuntu
270270
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -280,7 +280,7 @@ jobs:
280280
config_hash: ${{ needs.build-context.outputs.config-hash }}
281281
free-threading: ${{ matrix.free-threading }}
282282

283-
build_ubuntu_ssltests:
283+
build-ubuntu-ssltests:
284284
name: 'Ubuntu SSL tests with OpenSSL'
285285
runs-on: ${{ matrix.os }}
286286
timeout-minutes: 60
@@ -341,7 +341,7 @@ jobs:
341341
- name: SSL tests
342342
run: ./python Lib/test/ssltests.py
343343

344-
test_hypothesis:
344+
test-hypothesis:
345345
name: "Hypothesis tests on Ubuntu"
346346
runs-on: ubuntu-24.04
347347
timeout-minutes: 60
@@ -455,8 +455,7 @@ jobs:
455455
name: hypothesis-example-db
456456
path: .hypothesis/examples/
457457

458-
459-
build_asan:
458+
build-asan:
460459
name: 'Address sanitizer'
461460
runs-on: ubuntu-22.04
462461
timeout-minutes: 60
@@ -519,7 +518,7 @@ jobs:
519518
- name: Tests
520519
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
521520

522-
build_tsan:
521+
build-tsan:
523522
name: >-
524523
Thread sanitizer
525524
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -536,32 +535,31 @@ jobs:
536535

537536
all-required-green: # This job does nothing and is only used for the branch protection
538537
name: All required checks pass
539-
if: always()
540-
538+
runs-on: ubuntu-latest
539+
timeout-minutes: 5
541540
needs:
542541
- build-context # Transitive dependency, needed to access `run-tests` value
543542
- check-docs
544-
- check_autoconf_regen
545-
- check_generated_files
546-
- build_macos
547-
- build_ubuntu
548-
- build_ubuntu_ssltests
549-
- build_windows
550-
- build_windows_msi
551-
- test_hypothesis
552-
- build_asan
553-
- build_tsan
554-
555-
runs-on: ubuntu-latest
543+
- check-autoconf-regen
544+
- check-generated-files
545+
- build-windows
546+
- build-windows-msi
547+
- build-macos
548+
- build-ubuntu
549+
- build-ubuntu-ssltests
550+
- test-hypothesis
551+
- build-asan
552+
- build-tsan
553+
if: always()
556554

557555
steps:
558556
- name: Check whether the needed jobs succeeded or failed
559557
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
560558
with:
561559
allowed-failures: >-
562-
build_ubuntu_ssltests,
563-
build_windows_msi,
564-
test_hypothesis,
560+
build-windows-msi,
561+
build-ubuntu-ssltests,
562+
test-hypothesis,
565563
allowed-skips: >-
566564
${{
567565
!fromJSON(needs.build-context.outputs.run-docs)
@@ -573,21 +571,21 @@ jobs:
573571
${{
574572
needs.build-context.outputs.run-tests != 'true'
575573
&& '
576-
check_autoconf_regen,
577-
check_generated_files,
578-
build_macos,
579-
build_ubuntu,
580-
build_ubuntu_ssltests,
581-
build_asan,
582-
build_tsan,
583-
test_hypothesis,
574+
check-autoconf-regen,
575+
check-generated-files,
576+
build-macos,
577+
build-ubuntu,
578+
build-ubuntu-ssltests,
579+
test-hypothesis,
580+
build-asan,
581+
build-tsan,
584582
'
585583
|| ''
586584
}}
587585
${{
588586
!fromJSON(needs.build-context.outputs.run-windows-tests)
589587
&& '
590-
build_windows,
588+
build-windows,
591589
'
592590
|| ''
593591
}}

.github/workflows/documentation-links.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
permissions:
2121
pull-requests: write
22+
timeout-minutes: 5
2223

2324
steps:
2425
- uses: readthedocs/actions/preview@v1

.github/workflows/reusable-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
build_doc:
15+
build-doc:
1616
name: 'Docs'
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 60

.github/workflows/reusable-macos.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ env:
1919
FORCE_COLOR: 1
2020

2121
jobs:
22-
build_macos:
22+
build-macos:
2323
name: build and test (${{ inputs.os }})
24+
runs-on: ${{ inputs.os }}
2425
timeout-minutes: 60
2526
env:
2627
HOMEBREW_NO_ANALYTICS: 1
2728
HOMEBREW_NO_AUTO_UPDATE: 1
2829
HOMEBREW_NO_INSTALL_CLEANUP: 1
2930
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
3031
PYTHONSTRICTEXTENSIONBUILD: 1
31-
runs-on: ${{ inputs.os }}
3232
steps:
3333
- uses: actions/checkout@v4
3434
with:

.github/workflows/reusable-tsan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
FORCE_COLOR: 1
1717

1818
jobs:
19-
build_tsan_reusable:
19+
build-tsan-reusable:
2020
name: 'Thread sanitizer'
2121
runs-on: ubuntu-24.04
2222
timeout-minutes: 60

.github/workflows/reusable-ubuntu.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ env:
1616
FORCE_COLOR: 1
1717

1818
jobs:
19-
build_ubuntu_reusable:
19+
build-ubuntu-reusable:
2020
name: 'build and test'
21-
timeout-minutes: 60
2221
runs-on: ${{ matrix.os }}
22+
timeout-minutes: 60
2323
strategy:
2424
fail-fast: false
2525
matrix:

.github/workflows/stale.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
jobs:
88
stale:
99
if: github.repository_owner == 'python'
10-
1110
runs-on: ubuntu-latest
1211
permissions:
1312
pull-requests: write

0 commit comments

Comments
 (0)