Add nuon/ subdir (baseline -- v0.1.0, no release yet) #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build verification | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| jobs: | |
| build: | |
| name: build (${{ matrix.console }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - console: gcn | |
| image: ghcr.io/extremscorner/libogc2:latest | |
| artifacts: | | |
| gcn/joypad-tester-gamecube.dol | |
| gcn/joypad-tester-wii.dol | |
| gcn/opening.bnr | |
| - console: gba | |
| image: devkitpro/devkitarm:latest | |
| artifacts: | | |
| gba/build/joypad/joypad_mb.gba | |
| gba/build/joypad/joypad_payload.c | |
| gba/build/tester/tester_mb.gba | |
| gba/build/tester/tester_payload.c | |
| - console: pce | |
| # HuC is built from source inside pce/buildtools/Dockerfile, | |
| # so no upstream image — see the Build (PC Engine) step. | |
| image: "" | |
| artifacts: | | |
| pce/build/joypad-tester.pce | |
| - console: 3do | |
| # trapexit/3do-devkit cloned at pinned commit inside | |
| # 3do/buildtools/Dockerfile -- see the Build (3DO) step. | |
| image: "" | |
| artifacts: | | |
| 3do/build/joypad-tester.iso | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Pillow (for banner generation) | |
| if: matrix.console == 'gcn' | |
| run: pip install --quiet Pillow | |
| - name: Generate banner | |
| if: matrix.console == 'gcn' | |
| working-directory: ${{ matrix.console }} | |
| run: python3 buildtools/make_banner.py opening.bnr | |
| - name: Generate screensaver logo header | |
| if: matrix.console == 'gcn' | |
| working-directory: ${{ matrix.console }} | |
| run: python3 buildtools/make_logo.py | |
| - name: Build (gamecube target) | |
| if: matrix.console == 'gcn' | |
| run: | | |
| docker run --rm \ | |
| -v "${{ github.workspace }}":/workspace \ | |
| -w /workspace/${{ matrix.console }} \ | |
| -u "$(id -u):$(id -g)" \ | |
| ${{ matrix.image }} \ | |
| bash -c "apt-get install -y -qq --no-install-recommends -t bookworm-backports xorriso 2>/dev/null; TARGET_CONSOLE=gamecube make" | |
| - name: Build (wii target) | |
| if: matrix.console == 'gcn' | |
| run: | | |
| docker run --rm \ | |
| -v "${{ github.workspace }}":/workspace \ | |
| -w /workspace/${{ matrix.console }} \ | |
| -u "$(id -u):$(id -g)" \ | |
| ${{ matrix.image }} \ | |
| bash -c "TARGET_CONSOLE=wii make" | |
| - name: Build (GBA — both variants) | |
| if: matrix.console == 'gba' | |
| run: | | |
| docker run --rm \ | |
| -v "${{ github.workspace }}":/workspace \ | |
| -w /workspace/gba \ | |
| -u "$(id -u):$(id -g)" \ | |
| ${{ matrix.image }} \ | |
| make | |
| - name: Build (PC Engine) | |
| if: matrix.console == 'pce' | |
| run: | | |
| docker build -t joypad-tester-huc:ci pce/buildtools/ | |
| docker run --rm \ | |
| -v "${{ github.workspace }}":/workspace \ | |
| -w /workspace/pce \ | |
| -u "$(id -u):$(id -g)" \ | |
| joypad-tester-huc:ci \ | |
| make | |
| - name: Build (3DO) | |
| if: matrix.console == '3do' | |
| run: | | |
| # ubuntu-latest is x86_64, so the --platform=linux/amd64 in | |
| # the Dockerfile is a no-op (no emulation needed). The | |
| # devkit + i386/wine setup gets cached in the image so only | |
| # the first run is slow. | |
| cd 3do | |
| mkdir -p build .wine-home | |
| docker build --platform=linux/amd64 -t joypad-tester-3do:ci buildtools/ | |
| docker run --rm \ | |
| --platform=linux/amd64 \ | |
| -v "$(pwd):/work" \ | |
| -u "$(id -u):$(id -g)" \ | |
| -e HOME=/work/.wine-home \ | |
| joypad-tester-3do:ci \ | |
| bash -c " | |
| set -e | |
| cp /work/src/main.cpp /opt/3do-devkit/src/main.cpp | |
| cd /opt/3do-devkit | |
| make NAME=joypad-tester | |
| cp iso/joypad-tester.iso /work/build/joypad-tester.iso | |
| " | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.console }}-${{ github.sha }} | |
| path: ${{ matrix.artifacts }} | |
| if-no-files-found: error | |
| retention-days: 7 |