From 485e53244a06f3adbb8754c93dbe212fd0420301 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Thu, 21 May 2026 11:16:08 +0100 Subject: [PATCH] ci: add nimble deps caching to Windows build The Windows build referenced steps.cache-nimbledeps.outputs.cache-hit but never defined a Cache nimble deps step, so the condition was always true and nimble deps were never cached on Windows. Add the cache step with the same versioned key + restore-keys as the Linux/macOS jobs, and move the .nimble-setup stamp touch into its own unconditional step so a cache hit doesn't re-trigger `nimble setup`. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/windows-build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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