diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 50f1602cd..50588f7fc 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -11,6 +11,8 @@ env: NPROC: 4 NIM_VERSION: '2.2.4' NIMBLE_VERSION: '0.22.3' + # Bump to invalidate the nimble deps cache (GitHub caches are immutable per key). + NIMBLE_CACHE_VERSION: 'v2' jobs: build: @@ -88,6 +90,17 @@ jobs: run: | sed -i 's/68bb85cbfb1832ce4db43943911b046c3af3caab/a092a045d3a427d127a5334a6e59c76faff54686/g' nimble.lock + - name: Cache nimble deps + id: cache-nimbledeps + uses: actions/cache@v3 + with: + path: | + nimbledeps/ + nimble.paths + key: ${{ runner.os }}-nimbledeps-${{ env.NIMBLE_CACHE_VERSION }}-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + restore-keys: | + ${{ runner.os }}-nimbledeps-${{ env.NIMBLE_CACHE_VERSION }}-nimble${{ env.NIMBLE_VERSION }}- + - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' run: | @@ -95,7 +108,9 @@ jobs: nimble setup --localdeps -y make rebuild-nat-libs-nimbledeps CC=gcc make rebuild-bearssl-nimbledeps CC=gcc - touch nimbledeps/.nimble-setup + + - name: Refresh nimbledeps stamp + run: touch nimbledeps/.nimble-setup - name: Creating tmp directory run: mkdir -p tmp