ci: cache ~/.nimble so builds don't re-resolve deps over the network

Caching only nimbledeps/ was insufficient: make invokes `nimble <task>`,
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) <noreply@anthropic.com>
This commit is contained in:
Igor Sirotin 2026-05-21 11:43:37 +01:00
parent 485e53244a
commit 2d42f05b9e
No known key found for this signature in database
GPG Key ID: 0EABBCB40CB9AD4A
2 changed files with 6 additions and 2 deletions

View File

@ -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 }}-

View File

@ -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 }}-