mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-09-29 12:07:05 -07:00
ci: add job-level timeout-minutes to bound hung post-run cleanup steps
Observed repeatedly this session on macOS specifically: a job whose real work (the "Run ./" step) completes successfully, but whose implicit "Post Run actions/cache@v4" cleanup step then hangs "in_progress" for 1.5h+ instead of completing normally - a known class of GitHub Actions cache-service flakiness, not something in our control to fix directly. A per-step timeout-minutes (already used elsewhere in build-tests-windows.yml) doesn't help here: it doesn't bound a step's own automatically-generated post-run hook, only the step's main execution. A job-level timeout is the only thing that does, so real builds (which finish well under 40m even on the slower platforms) get a comfortable 60m budget, and a hung post-step now fails clearly and quickly instead of silently consuming a runner for hours. Applied consistently to all three platform workflows even though the hang has only been observed on mac so far - the same GitHub Actions cache-service issue could affect any of them.
This commit is contained in:
@@ -12,6 +12,14 @@ jobs:
|
||||
buildForAllPlatformsMacOS:
|
||||
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
|
||||
runs-on: macos-latest
|
||||
# A per-step timeout doesn't bound an action's own implicit post-run
|
||||
# cleanup step (e.g. actions/cache@v4's cache-save), which is exactly
|
||||
# what's been observed hanging here - real builds finish in well under
|
||||
# 40m, but a hung "Post Run actions/cache@v4" step has left jobs stuck
|
||||
# "in_progress" for 1.5h+. A job-level timeout is the only thing that
|
||||
# bounds that too, converting a silent multi-hour hang into a clear,
|
||||
# fast failure.
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@@ -37,6 +37,10 @@ jobs:
|
||||
buildForAllPlatformsUbuntu:
|
||||
name: "${{ matrix.targetPlatform }} on ${{ matrix.unityVersion}}${{startsWith(matrix.buildProfile, 'Assets') && ' (via Build Profile)' || '' }}"
|
||||
runs-on: ubuntu-latest
|
||||
# See build-tests-mac.yml's matching comment - a per-step timeout doesn't
|
||||
# bound an action's own implicit post-run cleanup step, only a job-level
|
||||
# timeout does.
|
||||
timeout-minutes: 60
|
||||
# Known, disclosed gap (see #844's description and src/build-args.ts's own
|
||||
# header comment): the CLI always detects the Unity version from the
|
||||
# checked-out project's ProjectSettings/ProjectVersion.txt and has no flag
|
||||
|
||||
@@ -12,6 +12,10 @@ jobs:
|
||||
buildForAllPlatformsWindows:
|
||||
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
|
||||
runs-on: windows-2022
|
||||
# See build-tests-mac.yml's matching comment - a per-step timeout doesn't
|
||||
# bound an action's own implicit post-run cleanup step, only a job-level
|
||||
# timeout does.
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
Reference in New Issue
Block a user