Skip to content

Commit 8cb3617

Browse files
fix: invalidate stale Library cache and include src/Packages in hash
1 parent c83d39d commit 8cb3617

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/ui-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ jobs:
5757
if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform
5858
with:
5959
path: Library
60-
key: Library-${{ matrix.targetPlatform }}-${{ hashFiles(format('{0}/Assets/**', matrix.projectPath), format('{0}/Packages/**', matrix.projectPath), format('{0}/ProjectSettings/**', matrix.projectPath)) }}
60+
key: Library-${{ matrix.targetPlatform }}-v2-${{ hashFiles(format('{0}/Assets/**', matrix.projectPath), format('{0}/Packages/**', matrix.projectPath), format('{0}/ProjectSettings/**', matrix.projectPath), 'src/Packages/**') }}
6161
restore-keys: |
62-
Library-${{ matrix.targetPlatform }}
63-
Library-
62+
Library-${{ matrix.targetPlatform }}-v2-
6463
- name: Build project
6564
if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform
6665
uses: game-ci/unity-builder@v4
@@ -196,9 +195,9 @@ jobs:
196195
uses: actions/cache@v3
197196
with:
198197
path: sample-unity6/Library
199-
key: Library-Unity6-Windows-${{ hashFiles('sample-unity6/Assets/**', 'sample-unity6/Packages/**', 'sample-unity6/ProjectSettings/**') }}
198+
key: Library-Unity6-Windows-v2-${{ hashFiles('sample-unity6/Assets/**', 'sample-unity6/Packages/**', 'sample-unity6/ProjectSettings/**', 'src/Packages/**') }}
200199
restore-keys: |
201-
Library-Unity6-Windows-
200+
Library-Unity6-Windows-v2-
202201
- name: Setup symlinks for Unity 6 Windows
203202
run: .\setup-symlinks.ps1
204203
- name: Verify symlinks were created

0 commit comments

Comments
 (0)