dc: align local build CDI filename with the release artifact shape #85
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 | |
| - console: dc | |
| # KallistiOS + dc-chain built from source inside | |
| # dc/buildtools/Dockerfile -- see the Build (Dreamcast) step. | |
| image: "" | |
| artifacts: | | |
| dc/build/joypad-tester-dreamcast.cdi | |
| - console: n64 | |
| # LibDragon trunk built from source on top of the | |
| # libdragon toolchain image -- see the Build (N64) step. | |
| # The base image is amd64-only; ubuntu-latest CI runs are | |
| # already amd64 so --platform=linux/amd64 is a no-op there. | |
| image: "" | |
| artifacts: | | |
| n64/build/joypad-tester.z64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| 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: Build (Dreamcast) | |
| if: matrix.console == 'dc' | |
| run: | | |
| # KOS + dc-chain (sh4-elf gcc + arm-eabi gcc) get built from | |
| # source inside the toolchain image -- ~10-15 min the first | |
| # time, cached across CI runs via the docker layer cache. | |
| docker build -t joypad-tester-kos:ci dc/buildtools/ | |
| docker run --rm \ | |
| -v "${{ github.workspace }}":/workspace \ | |
| -w /workspace/dc \ | |
| -u "$(id -u):$(id -g)" \ | |
| joypad-tester-kos:ci \ | |
| make | |
| - name: Build (N64) | |
| if: matrix.console == 'n64' | |
| run: | | |
| # libdragon trunk gets compiled on top of the upstream | |
| # toolchain image (~5 min first run, layer-cached after). | |
| # The make_logo.py asset step needs Pillow for PNG decode. | |
| pip install --quiet Pillow | |
| cd n64 | |
| mkdir -p build | |
| docker build --platform=linux/amd64 -t joypad-tester-n64:ci buildtools/ | |
| python3 buildtools/make_logo.py | |
| docker run --rm \ | |
| --platform=linux/amd64 \ | |
| -v "$(pwd):/work" \ | |
| -u "$(id -u):$(id -g)" \ | |
| joypad-tester-n64:ci \ | |
| make | |
| cp -f joypad-tester.z64 build/joypad-tester.z64 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ matrix.console }}-${{ github.sha }} | |
| path: ${{ matrix.artifacts }} | |
| if-no-files-found: error | |
| retention-days: 7 |