From 69074b51d4978af8184d43de0be730f2ee8b8e16 Mon Sep 17 00:00:00 2001 From: treeform Date: Sun, 23 Aug 2026 14:52:28 -0700 Subject: [PATCH] Move CI to setup-nim-action@v6 (Nimby 0.2.0) Nimby 0.2.0 makes workspaces explicit and refuses to create one inside a Git checkout, so installing in the checkout root no longer works. Create the workspace in the checkout's parent instead, so shady sits inside it next to its dependencies and nim finds nim.cfg by walking up. Also drop -g. Under 0.2.0 a global install writes no nim.cfg at all, so packages land on disk but stay invisible to the compiler: the install step goes green and the build then fails with "cannot open file". docs.yml moves off jiro4989/setup-nim-action + nimble onto the same Nimby workspace and nim doc, matching build.yml. Co-Authored-By: Claude Opus 5 --- .github/workflows/build.yml | 21 ++++++++++++++++++--- .github/workflows/docs.yml | 29 ++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89cba53..178f001 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,22 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: treeform/setup-nim-action@v5 - - run: nimby install -g shady.nimble + - uses: actions/checkout@v5 + - uses: treeform/setup-nim-action@v6 + + # Nimby installs packages as siblings of the workspace root, so the + # workspace has to be the parent of this checkout: shady then sits inside + # it next to its dependencies and nim finds nim.cfg by walking up. + - name: Create a Nimby workspace + shell: bash + run: | + cd .. + nimby create + + - name: Install dependencies + shell: bash + run: | + cd .. + nimby install shady/shady.nimble + - run: nim r tests/test_shady.nim \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 683a6b5..f7e25d5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,21 +4,36 @@ on: branches: - master env: - nim-version: 'stable' nim-src: src/${{ github.event.repository.name }}.nim deploy-dir: .gh-pages jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: jiro4989/setup-nim-action@v1 - with: - nim-version: ${{ env.nim-version }} - - run: nimble install -Y - - run: nimble doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }} + - uses: actions/checkout@v5 + - uses: treeform/setup-nim-action@v6 + + # Nimby installs packages as siblings of the workspace root, so the + # workspace has to be the parent of this checkout: shady then sits inside + # it next to its dependencies and nim finds nim.cfg by walking up. + - name: Create a Nimby workspace + shell: bash + run: | + cd .. + nimby create + + - name: Install dependencies + shell: bash + run: | + cd .. + nimby install shady/shady.nimble + + - name: Generate documentation + run: nim doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }} + - name: "Copy to index.html" run: cp ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html + - name: Deploy documents uses: peaceiris/actions-gh-pages@v3 with: