From 10eeddbccf502b7ffa1d64b86b97e541575b6f31 Mon Sep 17 00:00:00 2001 From: frostebite Date: Fri, 28 Aug 2026 15:24:29 +0100 Subject: [PATCH] fix(ci): scope Library cache key to unityVersion/buildProfile, not just platform+targetPlatform All StandaloneOSX matrix cells on macOS - three different Unity versions, plus two duplicate 6000.0.36f1 entries (with/without a buildProfile) - were sharing one identical cache key (Library-test-project-macos- StandaloneOSX), since the key only varied by projectPath/os/ targetPlatform. Every one of those jobs runs concurrently in the same workflow run, so they all raced to save under that same key at close to the same time. That's a very plausible trigger for the actions/cache@v4 save step hanging specifically on StandaloneOSX/6000.0.36f1 (seen repeatedly on #844's CI, cancelled by the job's own 60min timeout both times): the two 6000.0.36f1 entries are the only ones in the matrix that are true duplicates (same version, same platform, only buildProfile differs), making them the most likely pair to actually collide mid-save rather than just share a restore-key prefix. Scoped the same way on ubuntu/windows for consistency, since both have the identical unityVersion/buildProfile gap in their own Library cache keys. --- .github/workflows/build-tests-mac.yml | 2 +- .github/workflows/build-tests-ubuntu.yml | 2 +- .github/workflows/build-tests-windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-tests-mac.yml b/.github/workflows/build-tests-mac.yml index 2aef84ce..a05b169d 100644 --- a/.github/workflows/build-tests-mac.yml +++ b/.github/workflows/build-tests-mac.yml @@ -54,7 +54,7 @@ jobs: - uses: actions/cache@v4 with: path: ${{ matrix.projectPath }}/Library - key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }} + key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }} restore-keys: | Library-${{ matrix.projectPath }}-macos- Library- diff --git a/.github/workflows/build-tests-ubuntu.yml b/.github/workflows/build-tests-ubuntu.yml index 3c9ece82..d4639486 100644 --- a/.github/workflows/build-tests-ubuntu.yml +++ b/.github/workflows/build-tests-ubuntu.yml @@ -130,7 +130,7 @@ jobs: - uses: actions/cache@v4 with: path: ${{ matrix.projectPath }}/Library - key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }} + key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }} restore-keys: | Library-${{ matrix.projectPath }}-ubuntu- Library- diff --git a/.github/workflows/build-tests-windows.yml b/.github/workflows/build-tests-windows.yml index e3286a9c..5dc5f4bb 100644 --- a/.github/workflows/build-tests-windows.yml +++ b/.github/workflows/build-tests-windows.yml @@ -58,7 +58,7 @@ jobs: - uses: actions/cache@v4 with: path: ${{ matrix.projectPath }}/Library - key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }} + key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }} restore-keys: | Library-${{ matrix.projectPath }}-windows- Library-