diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28b6365..846d770 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,37 +5,31 @@ on: branches: [main, master] pull_request: branches: [main, master] + workflow_dispatch: jobs: switch: + name: Build runs-on: ubuntu-latest + container: + # Switch homebrew uses devkitA64 + libnx (not devkitARM) + image: devkitpro/devkita64:latest permissions: contents: read - env: - DEVKITPRO: /opt/devkitpro - steps: + # actions/checkout needs Node; devkitPro images omit it by default + - name: Install dependencies + run: apt-get update && apt-get install -y nodejs + - name: Checkout uses: actions/checkout@v4 - - # 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: | - 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" + with: + clean: true - name: Compile (Switch .nro) + env: + DEVKITPRO: /opt/devkitpro run: make -j$(nproc) - name: Upload .nro artifact