action.yml (1156B)
1 name: 'Cache' 2 description: "This action caches neovim dependencies" 3 runs: 4 using: "composite" 5 steps: 6 - run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV 7 shell: bash 8 9 - run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV 10 shell: bash 11 12 - if: ${{ matrix }} 13 run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV 14 shell: bash 15 16 - if: ${{ matrix.build }} 17 run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.build.*, '-') }}" >> $GITHUB_ENV 18 shell: bash 19 20 - id: image 21 run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT 22 shell: bash 23 24 # Avoid using '**/CMakeLists.txt' (or any pattern starting with '**/') even 25 # if it makes the expression below simpler. hashFiles() has a timer that 26 # will fail the job if it times out, which can happen if there are too many 27 # files to search through. 28 - uses: actions/cache@v4 29 with: 30 path: .deps 31 key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**', 32 '.github/**', 'CMakeLists.txt', 33 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}