mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.12] GH-103180: Set a timeout for every job in GitHub Actions (GH-130375) (#130432)
(cherry picked from commit d0a1e5c222)
This commit is contained in:
parent
f452b81b8d
commit
59c3eb48f9
7 changed files with 43 additions and 45 deletions
74
.github/workflows/build.yml
vendored
74
.github/workflows/build.yml
vendored
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
if: fromJSON(needs.build-context.outputs.run-docs)
|
||||
uses: ./.github/workflows/reusable-docs.yml
|
||||
|
||||
check_abi:
|
||||
check-abi:
|
||||
name: 'Check if the ABI has changed'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build-context
|
||||
|
|
@ -88,7 +88,7 @@ jobs:
|
|||
name: abi-data
|
||||
path: ./Doc/data/*.abi
|
||||
|
||||
check_autoconf_regen:
|
||||
check-autoconf-regen:
|
||||
name: 'Check if Autoconf files are up to date'
|
||||
# Don't use ubuntu-latest but a specific version to make the job
|
||||
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
|
||||
|
|
@ -131,7 +131,7 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
check_generated_files:
|
||||
check-generated-files:
|
||||
name: 'Check if generated files are up to date'
|
||||
# Don't use ubuntu-latest but a specific version to make the job
|
||||
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
|
||||
|
|
@ -195,7 +195,7 @@ jobs:
|
|||
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
|
||||
run: make check-c-globals
|
||||
|
||||
build_windows:
|
||||
build-windows:
|
||||
name: >-
|
||||
Windows
|
||||
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
|
||||
|
|
@ -215,7 +215,7 @@ jobs:
|
|||
arch: ${{ matrix.arch }}
|
||||
free-threading: ${{ matrix.free-threading }}
|
||||
|
||||
build_windows_msi:
|
||||
build-windows-msi:
|
||||
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
|
||||
Windows MSI${{ '' }}
|
||||
needs: build-context
|
||||
|
|
@ -230,7 +230,7 @@ jobs:
|
|||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
build_macos:
|
||||
build-macos:
|
||||
name: >-
|
||||
macOS
|
||||
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
|
||||
|
|
@ -264,7 +264,7 @@ jobs:
|
|||
free-threading: ${{ matrix.free-threading }}
|
||||
os: ${{ matrix.os }}
|
||||
|
||||
build_ubuntu:
|
||||
build-ubuntu:
|
||||
name: >-
|
||||
Ubuntu
|
||||
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
|
||||
|
|
@ -280,7 +280,7 @@ jobs:
|
|||
config_hash: ${{ needs.build-context.outputs.config-hash }}
|
||||
free-threading: ${{ matrix.free-threading }}
|
||||
|
||||
build_ubuntu_ssltests:
|
||||
build-ubuntu-ssltests:
|
||||
name: 'Ubuntu SSL tests with OpenSSL'
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
|
|
@ -341,7 +341,7 @@ jobs:
|
|||
- name: SSL tests
|
||||
run: ./python Lib/test/ssltests.py
|
||||
|
||||
test_hypothesis:
|
||||
test-hypothesis:
|
||||
name: "Hypothesis tests on Ubuntu"
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
|
|
@ -455,8 +455,7 @@ jobs:
|
|||
name: hypothesis-example-db
|
||||
path: .hypothesis/examples/
|
||||
|
||||
|
||||
build_asan:
|
||||
build-asan:
|
||||
name: 'Address sanitizer'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
|
@ -519,7 +518,7 @@ jobs:
|
|||
- name: Tests
|
||||
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
|
||||
|
||||
build_tsan:
|
||||
build-tsan:
|
||||
name: >-
|
||||
Thread sanitizer
|
||||
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
|
||||
|
|
@ -536,32 +535,31 @@ jobs:
|
|||
|
||||
all-required-green: # This job does nothing and is only used for the branch protection
|
||||
name: All required checks pass
|
||||
if: always()
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
needs:
|
||||
- build-context # Transitive dependency, needed to access `run-tests` value
|
||||
- check-docs
|
||||
- check_autoconf_regen
|
||||
- check_generated_files
|
||||
- build_macos
|
||||
- build_ubuntu
|
||||
- build_ubuntu_ssltests
|
||||
- build_windows
|
||||
- build_windows_msi
|
||||
- test_hypothesis
|
||||
- build_asan
|
||||
- build_tsan
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
- check-autoconf-regen
|
||||
- check-generated-files
|
||||
- build-windows
|
||||
- build-windows-msi
|
||||
- build-macos
|
||||
- build-ubuntu
|
||||
- build-ubuntu-ssltests
|
||||
- test-hypothesis
|
||||
- build-asan
|
||||
- build-tsan
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
- name: Check whether the needed jobs succeeded or failed
|
||||
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
|
||||
with:
|
||||
allowed-failures: >-
|
||||
build_ubuntu_ssltests,
|
||||
build_windows_msi,
|
||||
test_hypothesis,
|
||||
build-windows-msi,
|
||||
build-ubuntu-ssltests,
|
||||
test-hypothesis,
|
||||
allowed-skips: >-
|
||||
${{
|
||||
!fromJSON(needs.build-context.outputs.run-docs)
|
||||
|
|
@ -573,21 +571,21 @@ jobs:
|
|||
${{
|
||||
needs.build-context.outputs.run-tests != 'true'
|
||||
&& '
|
||||
check_autoconf_regen,
|
||||
check_generated_files,
|
||||
build_macos,
|
||||
build_ubuntu,
|
||||
build_ubuntu_ssltests,
|
||||
build_asan,
|
||||
build_tsan,
|
||||
test_hypothesis,
|
||||
check-autoconf-regen,
|
||||
check-generated-files,
|
||||
build-macos,
|
||||
build-ubuntu,
|
||||
build-ubuntu-ssltests,
|
||||
test-hypothesis,
|
||||
build-asan,
|
||||
build-tsan,
|
||||
'
|
||||
|| ''
|
||||
}}
|
||||
${{
|
||||
!fromJSON(needs.build-context.outputs.run-windows-tests)
|
||||
&& '
|
||||
build_windows,
|
||||
build-windows,
|
||||
'
|
||||
|| ''
|
||||
}}
|
||||
|
|
|
|||
1
.github/workflows/documentation-links.yml
vendored
1
.github/workflows/documentation-links.yml
vendored
|
|
@ -19,6 +19,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- uses: readthedocs/actions/preview@v1
|
||||
|
|
|
|||
2
.github/workflows/reusable-docs.yml
vendored
2
.github/workflows/reusable-docs.yml
vendored
|
|
@ -12,7 +12,7 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_doc:
|
||||
build-doc:
|
||||
name: 'Docs'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
|
|
|
|||
4
.github/workflows/reusable-macos.yml
vendored
4
.github/workflows/reusable-macos.yml
vendored
|
|
@ -19,8 +19,9 @@ env:
|
|||
FORCE_COLOR: 1
|
||||
|
||||
jobs:
|
||||
build_macos:
|
||||
build-macos:
|
||||
name: build and test (${{ inputs.os }})
|
||||
runs-on: ${{ inputs.os }}
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
HOMEBREW_NO_ANALYTICS: 1
|
||||
|
|
@ -28,7 +29,6 @@ jobs:
|
|||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||
PYTHONSTRICTEXTENSIONBUILD: 1
|
||||
runs-on: ${{ inputs.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/reusable-tsan.yml
vendored
2
.github/workflows/reusable-tsan.yml
vendored
|
|
@ -16,7 +16,7 @@ env:
|
|||
FORCE_COLOR: 1
|
||||
|
||||
jobs:
|
||||
build_tsan_reusable:
|
||||
build-tsan-reusable:
|
||||
name: 'Thread sanitizer'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
|
|
|
|||
4
.github/workflows/reusable-ubuntu.yml
vendored
4
.github/workflows/reusable-ubuntu.yml
vendored
|
|
@ -16,10 +16,10 @@ env:
|
|||
FORCE_COLOR: 1
|
||||
|
||||
jobs:
|
||||
build_ubuntu_reusable:
|
||||
build-ubuntu-reusable:
|
||||
name: 'build and test'
|
||||
timeout-minutes: 60
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
|||
1
.github/workflows/stale.yml
vendored
1
.github/workflows/stale.yml
vendored
|
|
@ -7,7 +7,6 @@ on:
|
|||
jobs:
|
||||
stale:
|
||||
if: github.repository_owner == 'python'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue