Skip to content

Commit

Permalink
Unify ccache retrieve steps (#54311)
Browse files Browse the repository at this point in the history
We don't need the variants now that our compression and ccache limiting is better tuned.
  • Loading branch information
kevingranade authored Jan 12, 2022
1 parent 2057907 commit d23c6cb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++-<date> and g++-11-<date> 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' }}
Expand Down

0 comments on commit d23c6cb

Please sign in to comment.