From d23c6cbe7fee7517edc9fd08860e34b4c1a11bfa Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Tue, 11 Jan 2022 20:55:40 -0800 Subject: [PATCH] Unify ccache retrieve steps (#54311) We don't need the variants now that our compression and ccache limiting is better tuned. --- .github/workflows/matrix.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index ffb8b6cf7ae02..c2ecbc17f4c65 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -233,21 +233,15 @@ jobs: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" echo "::set-output name=ccache-path::$([ "$RUNNER_OS" = "macOS" ] && echo '/Users/runner/Library/Caches/ccache' || echo '~/.ccache')" shell: bash - - name: ccache cache files (master) - if: ${{ github.event_name == 'push' && env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }} + - name: ccache cache files + if: ${{ env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }} uses: actions/cache@v2 with: path: ${{ steps.get-vars.outputs.ccache-path }} # double-dash after compiler is not a typo, it is to disambiguate between g++- and g++-11- for restore key prefix matching - key: ccache-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.date }}-1 + key: ccache-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.date }} restore-keys: | ccache-${{ runner.os }}-${{ matrix.compiler }}-- - - name: ccache cache files (PR) - if: ${{ github.event_name == 'pull_request' && env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }} - uses: actions/cache@v2 - with: - path: ${{ steps.get-vars.outputs.ccache-path }} - key: ccache-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.date }} - uses: ammaraskar/gcc-problem-matcher@master - name: build and test if: ${{ env.SKIP == 'false' }}