From e0a57217eea52a32cd9bed7e6b4f9d8a4c3adb03 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Mon, 19 Sep 2022 17:06:15 -0500 Subject: [PATCH] [wip] setup cache --- .github/workflows/testground.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/testground.yml b/.github/workflows/testground.yml index 0ad73b61..47a04429 100644 --- a/.github/workflows/testground.yml +++ b/.github/workflows/testground.yml @@ -57,22 +57,21 @@ jobs: # Add executables built with Go to PATH echo "${HOME}/go/bin" >> ${GITHUB_PATH} - # - name: Restore Testground executable from cache - # id: testground-exe-cache - # uses: actions/cache@v3 - # with: - # path: ~/go/bin/testground - # key: ${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.nim_branch }}-${{ ... }}-cache_nonce:${{ matrix.cache_nonce }} + - name: Calculate Testground commit hash used in cache key + id: calc-testground-hash + run: | + echo "::set-output name=hash::$(git rev-parse $(git branch --show-current))" + working-directory: testground - # - name: Build and start Testground daemon - # run: | - # mkdir -p ${HOME}/repos && cd ${HOME}/repos - # git clone https://github.com/testground/testground.git && cd testground - # make install - # export PATH="${HOME}/go/bin:${PATH}" - # testground daemon & + - name: Restore Testground executable from cache + id: testground-exe-cache + uses: actions/cache@v3 + with: + path: ~/go/bin/testground + key: ${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.nim_branch }}-testground_commit-${{ steps.calc-testground-hash.outputs.hash }}-cache_nonce:${{ matrix.cache_nonce }} - name: Build Testground executable + if: steps.testground-exe-cache.outputs.cache-hit != 'true' run: make install working-directory: testground