2022-12-05 03:57:52 -07:00
|
|
|
name: 'Cache'
|
|
|
|
description: "This action caches neovim dependencies"
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2023-10-22 04:30:32 -07:00
|
|
|
- run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV
|
|
|
|
shell: bash
|
|
|
|
|
2023-02-09 14:25:44 -07:00
|
|
|
- run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
|
2022-12-05 03:57:52 -07:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- if: ${{ matrix }}
|
|
|
|
run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV
|
|
|
|
shell: bash
|
|
|
|
|
2023-10-20 06:12:37 -07:00
|
|
|
- if: ${{ matrix.build }}
|
|
|
|
run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.build.*, '-') }}" >> $GITHUB_ENV
|
|
|
|
shell: bash
|
|
|
|
|
2023-06-10 07:36:37 -07:00
|
|
|
- id: image
|
|
|
|
run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT
|
|
|
|
shell: bash
|
|
|
|
|
2022-12-05 03:57:52 -07:00
|
|
|
# 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.
|
2024-01-20 03:55:50 -07:00
|
|
|
- uses: actions/cache@v4
|
2022-12-05 03:57:52 -07:00
|
|
|
with:
|
2023-03-09 04:27:20 -07:00
|
|
|
path: .deps
|
2023-06-10 07:36:37 -07:00
|
|
|
key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**',
|
2023-09-27 08:53:06 -07:00
|
|
|
'.github/**', 'CMakeLists.txt',
|
2022-12-05 03:57:52 -07:00
|
|
|
'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}
|