From be37d8cf6cc8ce12c8d42966173b67f9901a23dd Mon Sep 17 00:00:00 2001 From: Niklas Friesen Date: Mon, 30 Mar 2026 20:13:18 +0200 Subject: [PATCH] CI: install devkitPro on runner instead of nested docker Nested docker run broke under act (empty /work, no Makefile). Use official install-devkitpro-pacman + dkp-pacman switch-dev on ubuntu-latest. Made-with: Cursor --- .github/workflows/build.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18e597e..28b6365 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,20 +12,31 @@ jobs: permissions: contents: read + env: + DEVKITPRO: /opt/devkitpro + steps: - name: Checkout uses: actions/checkout@v4 - # Build inside devkitPro image only. A job-level container would run every - # step there and break actions/checkout (needs Node). Same issue with `act`. - - name: Compile (Switch .nro) + # Install toolchain on the runner (no nested docker). Nested `docker run -v + # "$GITHUB_WORKSPACE"` fails under act: the mount points at an empty path. + - name: Install devkitPro run: | - docker run --rm \ - -v "${{ github.workspace }}:/work" \ - -w /work \ - -e DEVKITPRO=/opt/devkitpro \ - devkitpro/devkita64:latest \ - bash -lc 'make -j$(nproc)' + set -euo pipefail + wget -q -U "dkp-apt" -O ./install-devkitpro-pacman https://apt.devkitpro.org/install-devkitpro-pacman + chmod +x ./install-devkitpro-pacman + yes | sudo ./install-devkitpro-pacman + sudo dkp-pacman -Sy + sudo dkp-pacman -S switch-dev --noconfirm + + - name: Add devkitPro tools to PATH + run: | + echo "/opt/devkitpro/devkitA64/bin" >> "$GITHUB_PATH" + echo "/opt/devkitpro/tools/bin" >> "$GITHUB_PATH" + + - name: Compile (Switch .nro) + run: make -j$(nproc) - name: Upload .nro artifact uses: actions/upload-artifact@v4