mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-09-29 12:07:05 -07:00
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:
@@ -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-
|
||||
|
||||
@@ -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-
|
||||
|
||||
@@ -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-
|
||||
|
||||
Reference in New Issue
Block a user