From a8c4ac49957cbbdff6c91fcabc85c89465a57add Mon Sep 17 00:00:00 2001 From: ThomasTJdev Date: Wed, 6 Aug 2025 21:40:36 +0200 Subject: [PATCH 1/5] update workflow --- .github/workflows/main.yml | 69 +++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8b4ae0..8b313e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,25 +16,64 @@ jobs: - windows-latest - macOS-latest version: - - stable + - binary:stable + - binary:1.6.8 steps: - - uses: actions/checkout@v1 - - uses: jiro4989/setup-nim-action@master - with: - nim-version: ${{ matrix.version }} + - uses: actions/checkout@v4 - - name: Print Nim version - run: nim -v - - name: Print Nimble version - run: nimble -v + # + # Nim + # + - name: Cache Nim binaries + uses: actions/cache@v4 + with: + path: | + nimdir + ~/.nimble + key: "nim-${{ matrix.version }}-${{ matrix.os }}" - - name: Nimble Refresh - run: nimble -y refresh + - name: Check for cached Nim binaries + id: nim-binaries-cache + run: | + if [ -f "nimdir/bin/nim" ]; then + echo "found=true" >> $GITHUB_OUTPUT + else + echo "found=false" >> $GITHUB_OUTPUT + fi - - name: Nimble Install dependencies - run: nimble -y install --depsOnly + - name: Install Nim (if not cached) + if: steps.nim-binaries-cache.outputs.found == 'false' + uses: iffy/install-nim@v5 + with: + version: ${{ matrix.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Build binaries - run: nimble build -d:release \ No newline at end of file + - name: Add cached Nim to PATH + if: steps.nim-binaries-cache.outputs.found == 'true' + run: | + echo "${{ github.workspace }}/nimdir/bin" >> $GITHUB_PATH + echo "$HOME/.nimble/bin" >> $GITHUB_PATH + + + # + # Nim + # + - name: Print Nim version + run: | + nim -v + + - name: Print Nimble version + run: | + nimble -v + + - name: Nimble Refresh + run: nimble -y refresh + + - name: Nimble Install dependencies + run: nimble -y install --depsOnly + + - name: Build binaries + run: nimble build -d:release \ No newline at end of file From 601ff8fbf36ef9b3caf330e05f640ba0d7043174 Mon Sep 17 00:00:00 2001 From: ThomasTJdev Date: Wed, 6 Aug 2025 21:42:42 +0200 Subject: [PATCH 2/5] mac nim binary not available --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b313e9..2492373 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,8 +16,10 @@ jobs: - windows-latest - macOS-latest version: - - binary:stable - - binary:1.6.8 + - stable + - 1.6.8 + # - binary:stable + # - binary:1.6.8 steps: - uses: actions/checkout@v4 From 2a49b3d1e91b78ff89665c1ceb0b36558e25da61 Mon Sep 17 00:00:00 2001 From: ThomasTJdev Date: Wed, 6 Aug 2025 21:44:40 +0200 Subject: [PATCH 3/5] 1.6.18 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2492373..0151441 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,9 +17,9 @@ jobs: - macOS-latest version: - stable - - 1.6.8 + - 1.6.18 # - binary:stable - # - binary:1.6.8 + # - binary:1.6.18 steps: - uses: actions/checkout@v4 From da0e8dc4ee1c81dd1902865d122bae4f7ed225f3 Mon Sep 17 00:00:00 2001 From: ThomasTJdev Date: Wed, 6 Aug 2025 21:45:37 +0200 Subject: [PATCH 4/5] only linux --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0151441..d4e7d0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,13 +13,13 @@ jobs: matrix: os: - ubuntu-latest - - windows-latest - - macOS-latest + # - windows-latest + # - macOS-latest version: - - stable - - 1.6.18 - # - binary:stable - # - binary:1.6.18 + # - stable + # - 1.6.18 + - binary:stable + - binary:1.6.18 steps: - uses: actions/checkout@v4 From 86be0f7189c1d219f6aac51a162ad4cb25e67fc9 Mon Sep 17 00:00:00 2001 From: ThomasTJdev Date: Thu, 7 Aug 2025 05:08:41 +0200 Subject: [PATCH 5/5] Allow dispatching --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4e7d0c..8fc216c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + workflow_dispatch: jobs: build: