Skip to content

Commit

Permalink
cache submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlin committed Apr 20, 2023
1 parent b40f39c commit afc6b01
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,23 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60



name: build-v2-${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Get submodules versions
id: submodules
shell: bash
run: |
echo "nim-hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT

- name: Cache nim
- name: Cache submodules
uses: actions/cache@v3
id: submodules-cache
with:
path: vendor/nimbus-build-system/vendor/Nim/bin
key: ${{ runner.os }}-nim-${{ steps.submodules.outputs.nim-hash }}
path: vendor/
key: ${{ runner.os }}-submodules-${{ hashFiles('./.gitmodules') }}

- name: Submodules
if: steps.submodules-cache.outputs.cache-hit != 'true'
run: git submodule update --init --recursive

- name: Build binaries
run: make V=1 LOG_LEVEL=DEBUG v2 tools
Expand Down

0 comments on commit afc6b01

Please sign in to comment.