From b2214cfe0521818add902bfd29990f0ddaf86263 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Tue, 31 Mar 2026 01:44:20 +0200 Subject: [PATCH] better cache of nim and nimble in ci --- .github/actions/install_nim/action.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/install_nim/action.yml b/.github/actions/install_nim/action.yml index 005d5696c..320d7b081 100644 --- a/.github/actions/install_nim/action.yml +++ b/.github/actions/install_nim/action.yml @@ -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'