better cache of nim and nimble in ci

This commit is contained in:
Ivan FB 2026-03-31 01:44:20 +02:00
parent 0607cc3ad3
commit b2214cfe05
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270

View File

@ -49,13 +49,16 @@ runs:
echo "MAKE_CMD=${MAKE_CMD}" >> $GITHUB_ENV
echo "CC_CMD=${CC_CMD}" >> $GITHUB_ENV
echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH
echo '${{ github.workspace }}/.nimble_runtime/bin' >> $GITHUB_PATH
- name: Restore Nim from cache
- name: Restore Nim and Nimble from cache
id: nim-cache
uses: actions/cache@v4
with:
path: '${{ github.workspace }}/nim'
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-${{ inputs.nim_ref }}
path: |
${{ github.workspace }}/nim
${{ github.workspace }}/.nimble_runtime
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-${{ inputs.nim_ref }}-nimble-0.20.1
- name: Build Nim
shell: ${{ inputs.shell }}
@ -67,7 +70,8 @@ runs:
QUICK_AND_DIRTY_COMPILER=1 QUICK_AND_DIRTY_NIMBLE=1 CC=${CC_CMD} \
bash build_nim.sh nim csources dist/nimble NimBinaries
- name: Install Nimble (pinned)
- name: Install Nimble v0.20.1
if: ${{ steps.nim-cache.outputs.cache-hit != 'true' }}
uses: nim-lang/setup-nimble-action@v1
with:
nimble-version: '0.20.1'