From 363857461e5cf73e440fbe7971d07b62b1132a79 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Tue, 5 Jan 2021 12:36:09 -0600 Subject: [PATCH] ci: revise cache key so that a bump in any submodule will cause a cache miss --- .github/workflows/test.yml | 12 +++++++++++- vendor/nim-sqlcipher | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfd3c63..c5a0a7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,11 @@ jobs: steps: + - name: Install awk (gawk) and coreutils via Homebrew + if: matrix.platform.os == 'macos' + run: | + brew install coreutils gawk + - name: Link Homebrew OpenSSL 1.1 to /usr/local/opt/openssl if: matrix.platform.os == 'macos' run: | @@ -77,12 +82,17 @@ jobs: fetch-depth: 0 submodules: recursive + - name: Calculate cache key from submodules tree + id: calc-cache-key + run: | + echo "::set-output name=hash::$(git submodule foreach --quiet --recursive 'git rev-parse $(git rev-parse --abbrev-ref HEAD)' | sha1sum | awk '{print $1}')" + - uses: actions/cache@v2 with: path: | vendor/nimbus-build-system/vendor/Nim/bin vendor/status-go/build/bin - key: ${{ matrix.platform.os }}-${{ env.NPROC }}-nim-statusgo-${{ hashFiles('.gitmodules') }} + key: ${{ matrix.platform.os }}-${{ steps.calc-cache-key.outputs.hash }} - name: Install and build dependencies run: | diff --git a/vendor/nim-sqlcipher b/vendor/nim-sqlcipher index d1ed963..99e9ed1 160000 --- a/vendor/nim-sqlcipher +++ b/vendor/nim-sqlcipher @@ -1 +1 @@ -Subproject commit d1ed963f50825e9a13d89b94287a0721ea289bb4 +Subproject commit 99e9ed1734f39b3a79a435c091cc505b1d8c2d05