From 4ecd0e095b8b488a899c39f3dc50dce6cb8c1601 Mon Sep 17 00:00:00 2001 From: Tao He Date: Tue, 12 Jan 2021 20:25:11 +0800 Subject: [PATCH] Refresh cache every month, since the cache is immutable Signed-off-by: Tao He --- .github/workflows/build-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0f6fe84..d8fd158 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -21,13 +21,17 @@ jobs: with: submodules: true + - name: Get time + run: | + date +'%Y-%m' > snapshot.txt + - name: Cache for cccahe uses: actions/cache@v2 with: path: /home/runner/.ccache - key: ${{ runner.os }}-ccache + key: ${{ runner.os }}-ccache-${{ hashFiles('**/snapshot.txt') }} restore-keys: | - ${{ runner.os }}-ccache + ${{ runner.os }}-ccache- - name: Install dependencies for Linux if: runner.os == 'Linux'