From bfc65f4092d4c7ca37cb2e485dd0626d7f30a0eb Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 5 Jun 2022 10:12:56 +0200 Subject: [PATCH] Fix ccache saving on cache hit See boostorg/boost-ci#166 --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8d7b363..c8307d3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,20 +125,23 @@ jobs: fi git config --global pack.threads 0 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary' fetch-depth: ${{ matrix.coverage && '0' || '1' }} - name: Cache ccache - uses: actions/cache@v2 + uses: actions/cache@v3 if: env.B2_USE_CCACHE with: path: ~/.ccache - key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} + key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}} + restore-keys: | + ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}- + ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} - name: Fetch Boost.CI - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: boostorg/boost-ci ref: master