From bc9c43afd79cd1f210789f26816ae2c60b5bba37 Mon Sep 17 00:00:00 2001 From: frostebite Date: Fri, 28 Aug 2026 00:25:17 +0100 Subject: [PATCH] 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. --- .github/workflows/build-tests-mac.yml | 8 ++++++++ .github/workflows/build-tests-ubuntu.yml | 4 ++++ .github/workflows/build-tests-windows.yml | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/.github/workflows/build-tests-mac.yml b/.github/workflows/build-tests-mac.yml index 090f1d69..2aef84ce 100644 --- a/.github/workflows/build-tests-mac.yml +++ b/.github/workflows/build-tests-mac.yml @@ -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: diff --git a/.github/workflows/build-tests-ubuntu.yml b/.github/workflows/build-tests-ubuntu.yml index c0e6277d..3c9ece82 100644 --- a/.github/workflows/build-tests-ubuntu.yml +++ b/.github/workflows/build-tests-ubuntu.yml @@ -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 diff --git a/.github/workflows/build-tests-windows.yml b/.github/workflows/build-tests-windows.yml index a3db753a..e3286a9c 100644 --- a/.github/workflows/build-tests-windows.yml +++ b/.github/workflows/build-tests-windows.yml @@ -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: