Skip to content

Commit

Permalink
ci: add runner image version to cache key
Browse files Browse the repository at this point in the history
This will ensure the cache isn't used when an image upgrade changes the
compiler version, causing the build to fail.
  • Loading branch information
dundargoc authored Jun 10, 2023
1 parent b6d2f49 commit c53953b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ runs:
run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV
shell: bash

- id: image
run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT
shell: bash

# Avoid using '**/CMakeLists.txt' (or any pattern starting with '**/') even
# if it makes the expression below simpler. hashFiles() has a timer that
# will fail the job if it times out, which can happen if there are too many
# files to search through.
- uses: actions/cache@v3
with:
path: .deps
key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**',
key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**',
'.github/workflows/test.yml', 'CMakeLists.txt',
'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}

0 comments on commit c53953b

Please sign in to comment.