ci: revise cache key so that a bump in any submodule will cause a cache miss
This commit is contained in:
parent
f51abf3b83
commit
363857461e
|
@ -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: |
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d1ed963f50825e9a13d89b94287a0721ea289bb4
|
||||
Subproject commit 99e9ed1734f39b3a79a435c091cc505b1d8c2d05
|
Loading…
Reference in New Issue