@@ -51,17 +51,17 @@ jobs:
5151 - name : Extract project archive
5252 run : tar -xvzf test-project.tar.gz
5353
54- - name : Cache Unity Library
55- uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
54+ - name : Restore Unity Library cache
55+ uses : actions/cache/restore @27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
5656 with :
5757 path : samples/IntegrationTest/Library
58- key : Library-IntegrationTest -windows-${{ env.UNITY_VERSION }}-v2
58+ key : it-library -windows-${{ env.UNITY_VERSION }}-${{ github.run_id }}
5959 restore-keys : |
60- Library-IntegrationTest -windows-${{ env.UNITY_VERSION }}-
60+ it-library -windows-${{ env.UNITY_VERSION }}-
6161
6262 - name : Restore cached build without Sentry
6363 id : cache-build-nosentry
64- uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
64+ uses : actions/cache/restore @27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
6565 with :
6666 path : samples/IntegrationTest/Build-NoSentry
6767 key : build-nosentry-Windows-${{ inputs.unity-version }}
7070 if : steps.cache-build-nosentry.outputs.cache-hit != 'true'
7171 run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform Windows -BuildDirName "Build-NoSentry"
7272
73+ - name : Save cached build without Sentry
74+ if : github.ref == 'refs/heads/main' && steps.cache-build-nosentry.outputs.cache-hit != 'true'
75+ uses : actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
76+ with :
77+ path : samples/IntegrationTest/Build-NoSentry
78+ key : build-nosentry-Windows-${{ inputs.unity-version }}
79+
7380 - name : Download UPM package
7481 uses : ./.github/actions/wait-for-artifact
7582 with :
@@ -148,6 +155,13 @@ jobs:
148155 path : test-app-desktop.tar.gz
149156 retention-days : 14
150157
158+ - name : Save Unity Library cache
159+ if : github.ref == 'refs/heads/main'
160+ uses : actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
161+ with :
162+ path : samples/IntegrationTest/Library
163+ key : it-library-windows-${{ env.UNITY_VERSION }}-${{ github.run_id }}
164+
151165 - name : Upload IntegrationTest project on failure
152166 if : ${{ failure() }}
153167 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
0 commit comments