-
-
Notifications
You must be signed in to change notification settings - Fork 23.7k
CI: Don't include commit sha in cache key, ensure caches don't stay reserved #104076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,12 +48,6 @@ jobs: | |
| distribution: temurin | ||
| java-version: 17 | ||
|
|
||
| - name: Restore Godot build cache | ||
| uses: ./.github/actions/godot-cache-restore | ||
| with: | ||
| cache-name: ${{ matrix.cache-name }} | ||
| continue-on-error: true | ||
|
|
||
| - name: Setup Python and SCons | ||
| uses: ./.github/actions/godot-deps | ||
|
|
||
|
|
@@ -68,6 +62,12 @@ jobs: | |
| - name: Extract pre-built Android Swappy Frame Pacing Library | ||
| run: 7za x -y swappy/godot-swappy.7z -o${{github.workspace}}/thirdparty/swappy-frame-pacing | ||
|
|
||
| - name: Restore Godot build cache | ||
| uses: ./.github/actions/godot-cache-restore | ||
| with: | ||
| cache-name: ${{ matrix.cache-name }} | ||
| continue-on-error: true | ||
|
|
||
| - name: Compilation | ||
| uses: ./.github/actions/godot-build | ||
| with: | ||
|
|
@@ -78,6 +78,7 @@ jobs: | |
| scons-cache-limit: ${{ matrix.cache-limit }} | ||
|
|
||
| - name: Save Godot build cache | ||
| if: always() | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes it run even if previous steps fail, which ensures that if the cache was locked, it gets unlocked. If the job fails before
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I haven't tested though is what happens if the job is canceled (e.g. by pushing a new commit to the PR branch). Let's test this in this PR and makes sure it also runs this steps and unlocks the cache key. |
||
| uses: ./.github/actions/godot-cache-save | ||
| with: | ||
| cache-name: ${{ matrix.cache-name }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved the cache restore and save as close as possible to the compiling step to minimal the time where the cache is locked.