From 8e20aa1462bf6dcadc338835df529a6d568431b1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 24 Jun 2022 17:58:29 +0200 Subject: [PATCH] Fix ccache saving on cache hit (#70) 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 66fd3062..6a626eb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,20 +126,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