ci: bump nimble deps cache key + add restore-keys

The nimbledeps cache key was based only on hashFiles(nimble.lock, ...),
which hasn't changed, so PRs kept restoring a stale, incomplete master
cache. GitHub caches are immutable per key, so that poisoned cache was
never refreshed and `make all` re-resolved/re-downloaded deps every run.

Add a bumpable NIMBLE_CACHE_VERSION token to abandon the poisoned cache
and restore-keys for warm starts. `nimble setup --localdeps` fully
installs the locked dep set, so a fresh v2 cache will be complete.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Igor Sirotin 2026-05-21 10:15:00 +01:00
parent b8cdcc8622
commit ee5aaa2001
No known key found for this signature in database
GPG Key ID: 0EABBCB40CB9AD4A

View File

@ -16,6 +16,8 @@ env:
NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none"
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:
changes: # changes detection
@ -108,7 +110,9 @@ jobs:
path: |
nimbledeps/
nimble.paths
key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }}
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'
@ -187,7 +191,9 @@ jobs:
path: |
nimbledeps/
nimble.paths
key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }}
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'
@ -268,7 +274,9 @@ jobs:
path: |
nimbledeps/
nimble.paths
key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }}
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'