From 2d42f05b9e5ff2879e7e55052cd5491fb308dea5 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Thu, 21 May 2026 11:43:37 +0100 Subject: [PATCH] ci: cache ~/.nimble so builds don't re-resolve deps over the network Caching only nimbledeps/ was insufficient: make invokes `nimble `, which re-resolves dependencies on every build using ~/.nimble/pkgcache (nimble's git clone/version cache). That dir was not cached, so every cache-hit build re-cloned ~50 packages and intermittently failed when the runner's `git fetch --tags` flaked, breaking nimble's SAT solver. Add ~/.nimble to the cached paths (alongside nimbledeps/ + nimble.paths) so re-resolution is served from the local clone cache. Bump the cache version to v3 since the cached contents changed. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 5 ++++- .github/workflows/windows-build.yml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 979f16790..a1c2ff0de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ env: 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' + NIMBLE_CACHE_VERSION: 'v3' jobs: changes: # changes detection @@ -110,6 +110,7 @@ jobs: path: | nimbledeps/ nimble.paths + ~/.nimble 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 }}- @@ -191,6 +192,7 @@ jobs: path: | nimbledeps/ nimble.paths + ~/.nimble 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 }}- @@ -274,6 +276,7 @@ jobs: path: | nimbledeps/ nimble.paths + ~/.nimble 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 }}- diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 50588f7fc..035d0614d 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -12,7 +12,7 @@ env: 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' + NIMBLE_CACHE_VERSION: 'v3' jobs: build: @@ -97,6 +97,7 @@ jobs: path: | nimbledeps/ nimble.paths + ~/.nimble 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 }}-