mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
3dae99d86a
This will ensure the cache isn't used when an image upgrade changes the
compiler version, causing the build to fail.
(cherry picked from commit dd6b6f185b
)
27 lines
951 B
YAML
27 lines
951 B
YAML
name: 'Cache'
|
|
description: "This action caches neovim dependencies"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- if: ${{ matrix }}
|
|
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 }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**',
|
|
'.github/workflows/test.yml', 'CMakeLists.txt',
|
|
'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}
|