File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 52
52
run : echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
53
53
54
54
- name : Restore Ccache cache
55
+ id : ccache-cache
55
56
uses : actions/cache/restore@v3
56
57
with :
57
58
path : ${{ env.CCACHE_DIR }}
63
64
64
65
- name : Save Ccache cache
65
66
uses : actions/cache/save@v3
66
- if : github.event_name != 'pull_request'
67
+ if : github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
67
68
with :
68
69
path : ${{ env.CCACHE_DIR }}
69
70
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
@@ -203,6 +204,7 @@ jobs:
203
204
Copy-Item -Path "$env:ChocolateyInstall\lib\ccache\tools\ccache-$env:CI_CCACHE_VERSION-windows-x86_64\ccache.exe" -Destination "C:\ccache\cl.exe"
204
205
205
206
- name : Restore Ccache cache
207
+ id : ccache-cache
206
208
uses : actions/cache/restore@v3
207
209
with :
208
210
path : ~/AppData/Local/ccache
@@ -243,7 +245,7 @@ jobs:
243
245
244
246
- name : Save Ccache cache
245
247
uses : actions/cache/save@v3
246
- if : github.event_name != 'pull_request'
248
+ if : github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
247
249
with :
248
250
path : ~/AppData/Local/ccache
249
251
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
You can’t perform that action at this time.
0 commit comments