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:
frostebite
2026-08-28 00:25:17 +01:00
parent 2a59f4ad3d
commit bc9c43afd7
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -12,6 +12,14 @@ jobs:
buildForAllPlatformsMacOS: buildForAllPlatformsMacOS:
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }} name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
runs-on: macos-latest 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: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
+4
View File
@@ -37,6 +37,10 @@ jobs:
buildForAllPlatformsUbuntu: buildForAllPlatformsUbuntu:
name: "${{ matrix.targetPlatform }} on ${{ matrix.unityVersion}}${{startsWith(matrix.buildProfile, 'Assets') && ' (via Build Profile)' || '' }}" name: "${{ matrix.targetPlatform }} on ${{ matrix.unityVersion}}${{startsWith(matrix.buildProfile, 'Assets') && ' (via Build Profile)' || '' }}"
runs-on: ubuntu-latest 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 # 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 # header comment): the CLI always detects the Unity version from the
# checked-out project's ProjectSettings/ProjectVersion.txt and has no flag # checked-out project's ProjectSettings/ProjectVersion.txt and has no flag
@@ -12,6 +12,10 @@ jobs:
buildForAllPlatformsWindows: buildForAllPlatformsWindows:
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }} name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
runs-on: windows-2022 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: strategy:
fail-fast: false fail-fast: false
matrix: matrix: