Skip to content

Commit 919322e

Browse files
authored
Re-fix msvc ccache eviction after discovering original issue was just a typo (#83749)
Co-authored-by: Andrew Krieger <[email protected]>
1 parent 0fa5bea commit 919322e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/msvc-full-features.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,24 @@ jobs:
141141
run: |
142142
msbuild -m -p:Configuration=Release -p:Platform=x64 "-target:Cataclysm-vcpkg-static;Cataclysm-test-vcpkg-static;JsonFormatter-vcpkg-static;zzip" msvc-full-features/Cataclysm-vcpkg-static.sln
143143
144-
- name: Post-build ccache manipulation
145-
if: ${{ !failure() }}
144+
- name: Get ccache cache age cutoff
145+
id: get-cache-age
146146
run: |
147-
'${{ env.CDDA_CCACHE_PATH }}ccache.exe' -s -v
148147
NOW=`/bin/date +%s`
149148
DELTA=$(( $NOW - ${{ steps.get-vars.outputs.datetime-seconds }} ))
150-
'${{ env.CDDA_CCACHE_PATH }}ccache.exe' --evict-older-than ${DELTA}s
151-
'${{ env.CDDA_CCACHE_PATH }}ccache.exe' -s -v
152-
'${{ env.CDDA_CCACHE_PATH }}ccache.exe' -M ${{ env.CCACHE_LIMIT }}
153-
'${{ env.CDDA_CCACHE_PATH }}ccache.exe' -c
154-
'${{ env.CDDA_CCACHE_PATH }}ccache.exe' -s -v
149+
echo "ccache-age=${DELTA}" >> $GITHUB_OUTPUT
155150
shell: bash
156151

152+
- name: Post-build ccache manipulation
153+
if: ${{ !failure() }}
154+
run: |
155+
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -s -v
156+
${{ env.CDDA_CCACHE_PATH }}\ccache.exe --evict-older-than ${{ steps.get-cache-age.outputs.ccache-age }}s
157+
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -s -v
158+
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -M ${{ env.CCACHE_LIMIT }}
159+
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -c
160+
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -s -v
161+
157162
- name: clear ccache on PRs
158163
if: ${{ github.ref_name != 'master' }}
159164
run: |

0 commit comments

Comments
 (0)