From 5b3e9861a2df635558008ab5129a35d90145028a Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 19 Feb 2024 16:19:54 +0100 Subject: ci: simplify cache key Also ensure new matrix fields are automatically added to cache key. --- .github/workflows/test-queries.yml | 6 +++++- .github/workflows/tests.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/test-queries.yml b/.github/workflows/test-queries.yml index e1606f2fc..6b7772201 100644 --- a/.github/workflows/test-queries.yml +++ b/.github/workflows/test-queries.yml @@ -74,7 +74,11 @@ jobs: path: | ./parser/ ~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/ - key: ${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.nvim_tag }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua', './lua/nvim-treesitter/shell_command_selectors.lua') }} + key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles( + './lockfile.json', + './lua/nvim-treesitter/install.lua', + './lua/nvim-treesitter/parsers.lua', + './lua/nvim-treesitter/shell_command_selectors.lua') }} - name: Compile parsers run: $NVIM --headless -c "lua require'nvim-treesitter.install'.prefer_git=false" -c "TSInstallSync all" -c "q" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b3858b5de..8d71edeb0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,11 @@ jobs: path: | ./parser/ ~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/ - key: ${{ matrix.os }}-${{ matrix.cc }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua', './lua/nvim-treesitter/shell_selectors.lua') }} + key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles( + './lockfile.json', + './lua/nvim-treesitter/install.lua', + './lua/nvim-treesitter/parsers.lua', + './lua/nvim-treesitter/shell_selectors.lua') }} - name: Compile parsers Unix like if: ${{ runner.os != 'Windows' && steps.parsers-cache.outputs.cache-hit != 'true' }} -- cgit v1.2.3-70-g09d2