diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b5b4f6..b65b2e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,6 +45,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: | @@ -67,10 +72,15 @@ 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 - key: ${{ matrix.platform.os }}-${{ env.NPROC }}-nim-${{ hashFiles('.gitmodules') }} + key: ${{ matrix.platform.os }}-${{ steps.calc-cache-key.outputs.hash }} - name: Install and build dependencies run: |