[wip] refactor step for calculating cache-key components

This commit is contained in:
Michael Bradley, Jr 2022-09-20 07:38:14 -05:00
parent 992d9485ff
commit 583815ecba
No known key found for this signature in database
GPG Key ID: D0307DBCF21A9A58
1 changed files with 7 additions and 6 deletions

View File

@ -57,17 +57,18 @@ jobs:
# Add executables built with Go to PATH # Add executables built with Go to PATH
echo "${HOME}/go/bin" >> ${GITHUB_PATH} echo "${HOME}/go/bin" >> ${GITHUB_PATH}
- name: Calculate Testground commit hash used in cache key - name: Calculate cache-key components
id: calc-testground-hash id: calc-cache-key-components
run: echo "::set-output name=hash::$(git rev-parse $(git branch --show-current))" run: |
working-directory: testground cd ../testground
echo "::set-output name=hash::$(git rev-parse $(git branch --show-current))"
# - name: Restore Testground executable from cache # - name: Restore Testground executable from cache
# id: testground-exe-cache # id: testground-exe-cache
# uses: actions/cache@v3 # uses: actions/cache@v3
# with: # with:
# path: ~/go/bin/testground # 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 }} # key: ${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.nim_branch }}-testground_commit-${{ steps.calc-cache-key-components.outputs.hash }}-cache_nonce:${{ matrix.cache_nonce }}
- name: Build Testground executable - name: Build Testground executable
if: steps.testground-exe-cache.outputs.cache-hit != 'true' if: steps.testground-exe-cache.outputs.cache-hit != 'true'
@ -77,7 +78,7 @@ jobs:
- name: Start Testground executable - name: Start Testground executable
run: testground daemon & run: testground daemon &
- name: Build and run default Codex Testground plan - name: Build and run a Codex Testground plan with custom options
run: | run: |
make \ make \
TESTGROUND_PLAN=simple_libp2p \ TESTGROUND_PLAN=simple_libp2p \