From fbd7b7d3f2d16c5642c72ce995c3646d5a316bd6 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 16 May 2024 09:17:09 -1000 Subject: [PATCH] ci: cache ripgrep (for checkembedded files) --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8542e8581..1fdf80115 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: runs-on: ubuntu-24.04 env: # This workflow uses github's preinstalled ghc & stack on ubuntu. - # Keep these synced with the latest ghc version athttps://github.com/actions/runner-images/blob/ubuntu22/20240514.2/images/ubuntu/Ubuntu2404-Readme.md#haskell-tools + # Keep these synced with the latest ghc version at https://github.com/actions/runner-images/blob/ubuntu22/20240514.2/images/ubuntu/Ubuntu2404-Readme.md#haskell-tools # # caching id for this ghc's build artifacts: ghc: 982 @@ -119,9 +119,17 @@ jobs: && (grep -qE '^ *;' $$.gitlog || echo "do-all=true" >> $GITHUB_ENV)) \ || ( echo "could not identify commit range, continuing CI steps"; echo "do-all=true" >> $GITHUB_ENV ) + - name: Uncache extra tools (ripgrep) in /usr/bin + id: extratools + uses: actions/cache@v4 + with: + path: /usr/bin/rg + key: ${{ runner.os }}-extratools + if: env.do-all + - name: Check embedded files run: | - sudo apt install -y ripgrep + if [[ ! -x /usr/bin/rg ]]; then sudo apt install -y ripgrep; fi tools/checkembeddedfiles if: env.do-all