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:
217217 - name : Checkout repository
218218 uses : actions/checkout@v3
219219
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+
220226 - name : Compilation cache
221227 uses : actions/cache@v3
222228 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 }}
225230 # We include the commit sha in the cache key, as new cache entries are
226231 # only created if there is no existing entry for the key yet.
227232 key : ccache-msys2-${{ matrix.msystem }}-${{ matrix.idx }}-${{ matrix.build-type }}-${{ github.ref }}-${{ github.sha }}
@@ -234,9 +239,10 @@ jobs:
234239 # Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota.
235240 run : |
236241 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
240246 ccache -s
241247 echo $HOME
242248 cygpath -w $HOME
You can’t perform that action at this time.
0 commit comments