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.
This commit is contained in:
frostebite
2026-08-28 15:24:29 +01:00
parent b69722c62e
commit 10eeddbccf
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ jobs:
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }} key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}-macos- Library-${{ matrix.projectPath }}-macos-
Library- Library-
+1 -1
View File
@@ -130,7 +130,7 @@ jobs:
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }} key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}-ubuntu- Library-${{ matrix.projectPath }}-ubuntu-
Library- Library-
+1 -1
View File
@@ -58,7 +58,7 @@ jobs:
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }} key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}-windows- Library-${{ matrix.projectPath }}-windows-
Library- Library-