mirror of
https://github.com/apple/swift-nio
synced 2026-11-22 04:30:41 +00:00
Add a job timeout to the shared test matrix workflow (#3762)
Add a configurable job timeout to `swift_test_matrix.yml`. ### Motivation: Matrix jobs have no timeout, so a stalled nightly toolchain build runs until the 6-hour limit. From Sep 27 to Oct 10, apple/swift-nio-quic had 139 such jobs (about 50,000 runner minutes), all on Linux nightly-main legs. ### Modifications: Add a `timeout_minutes` input (default 120) and use it as the `execute-matrix` job timeout. ### Result: Stalled jobs are cancelled after 2 hours instead of 6. The longest successful matrix job I found was 81 minutes (grpc-swift-2 Examples), so current callers fit, and they can raise the limit if needed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
e12881f2a6
commit
7ea45a9750
1 file changed
+5
@@ -14,6 +14,10 @@ on:
|
||||
type: string
|
||||
description: "The test matrix definition."
|
||||
required: true
|
||||
timeout_minutes:
|
||||
type: number
|
||||
description: "The maximum time in minutes each matrix job may run before it is cancelled."
|
||||
default: 120
|
||||
|
||||
# We will cancel previously triggered workflow runs
|
||||
concurrency:
|
||||
@@ -24,6 +28,7 @@ jobs:
|
||||
execute-matrix:
|
||||
name: ${{ matrix.config.platform }} (${{ matrix.config.name }})
|
||||
runs-on: ${{ matrix.config.runner }}
|
||||
timeout-minutes: ${{ inputs.timeout_minutes }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(inputs.matrix_string) }}
|
||||
|
||||
Reference in new issue
Block a user