File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -217,11 +217,16 @@ jobs:
217
217
- name : Checkout repository
218
218
uses : actions/checkout@v3
219
219
220
+ - name : Prepare ccache
221
+ # Get cache location of ccache
222
+ id : ccache-prepare
223
+ run : |
224
+ echo "ccachedir=$(cygpath -m $(ccache -k cache_dir))" >> $GITHUB_OUTPUT
225
+
220
226
- name : Compilation cache
221
227
uses : actions/cache@v3
222
228
with :
223
- # It looks like this path needs to be hard-coded.
224
- path : C:/msys64/home/runneradmin/.ccache
229
+ path : ${{ steps.ccache-prepare.outputs.ccachedir }}
225
230
# We include the commit sha in the cache key, as new cache entries are
226
231
# only created if there is no existing entry for the key yet.
227
232
key : ccache-msys2-${{ matrix.msystem }}-${{ matrix.idx }}-${{ matrix.build-type }}-${{ github.ref }}-${{ github.sha }}
@@ -234,9 +239,10 @@ jobs:
234
239
# Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota.
235
240
run : |
236
241
which ccache
237
- test -d ~/.ccache || mkdir -p ~/.ccache
238
- echo "max_size = 250M" > ~/.ccache/ccache.conf
239
- echo "compression = true" >> ~/.ccache/ccache.conf
242
+ test -d ${{ steps.ccache-prepare.outputs.ccachedir }} || mkdir -p ${{ steps.ccache-prepare.outputs.ccachedir }}
243
+ echo "max_size = 250M" > ${{ steps.ccache-prepare.outputs.ccachedir }}/ccache.conf
244
+ echo "compression = true" >> ${{ steps.ccache-prepare.outputs.ccachedir }}/ccache.conf
245
+ ccache -p
240
246
ccache -s
241
247
echo $HOME
242
248
cygpath -w $HOME
You can’t perform that action at this time.
0 commit comments