From 8b0398c5e32483810e9975f4af5e447f4d25acdb Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Fri, 21 Jan 2022 19:25:47 +0100 Subject: ci: cache using ccache --- .github/workflows/check-query-files-and-compilation.yml | 9 ++++++++- .github/workflows/tests.yml | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/check-query-files-and-compilation.yml b/.github/workflows/check-query-files-and-compilation.yml index 003bf5c1..3d82eba7 100644 --- a/.github/workflows/check-query-files-and-compilation.yml +++ b/.github/workflows/check-query-files-and-compilation.yml @@ -61,11 +61,18 @@ jobs: uses: actions/cache@v2 with: path: ./parser/ - key: ${{ matrix.os }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua') }} + key: ${{ matrix.os }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua', './lua/nvim-treesitter/shell_selectors.lua') }} + + - name: ccache + if: matrix.os != 'windows-2022' + uses: hendrikmuhs/ccache-action@v1 + with: + key: ${{ matrix.os }}-${{ matrix.cc }} - name: Compile parsers Unix like if: matrix.os != 'windows-2022' run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" nvim --headless -c "TSInstallSync all" -c "q" - name: Compile parsers Windows diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f58f436..e2e6e26d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,10 +56,18 @@ jobs: uses: actions/cache@v2 with: path: ./parser/ - key: ${{ matrix.os }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua') }} + key: ${{ matrix.os }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua', './lua/nvim-treesitter/shell_selectors.lua') }} + + - name: ccache + if: matrix.os != 'windows-2022' + uses: hendrikmuhs/ccache-action@v1 + with: + key: ${{ matrix.os }}-${{ matrix.cc }} + - name: Compile parsers Unix like if: ${{ matrix.os != 'windows-latest' && steps.parsers-cache.outputs.cache-hit != 'true' }} run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" nvim --headless -c "TSInstallSync all" -c "q" - name: Tests -- cgit v1.2.3