name: CI on: push: branches: - master - upcoming pull_request: env: GAME_REVISION: 0 GAME_LANGUAGE: ENGLISH COMPARE: 0 UNUSED_ERROR: 1 DEPRECATED_ERROR: 1 jobs: build-emerald: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install binutils run: | sudo apt-get update sudo apt-get install -y binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi libpng-dev python3 - name: Cache build tools uses: actions/cache@v4 with: path: | tools/bin2c/bin2c tools/gbafix/gbafix tools/gbagfx/gbagfx tools/jsonproc/jsonproc tools/mapjson/mapjson tools/mid2agb/mid2agb tools/preproc/preproc tools/ramscrgen/ramscrgen tools/rsfont/rsfont tools/scaninc/scaninc tools/trainerproc/trainerproc tools/compresSmol/compresSmol tools/compresSmol/compresSmolTilemap tools/wav2agb/wav2agb key: tools-${{ runner.os }}-${{ hashFiles('tools/*/Makefile', 'tools/**/*.c', 'tools/**/*.cpp', 'tools/**/*.h') }} - name: ROM (Emerald) env: GAME_VERSION: EMERALD run: make -j$(nproc) -O all build-firered: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install binutils run: | sudo apt-get update sudo apt-get install -y binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi libpng-dev python3 - name: Cache build tools uses: actions/cache@v4 with: path: | tools/bin2c/bin2c tools/gbafix/gbafix tools/gbagfx/gbagfx tools/jsonproc/jsonproc tools/mapjson/mapjson tools/mid2agb/mid2agb tools/preproc/preproc tools/ramscrgen/ramscrgen tools/rsfont/rsfont tools/scaninc/scaninc tools/trainerproc/trainerproc tools/compresSmol/compresSmol tools/compresSmol/compresSmolTilemap tools/wav2agb/wav2agb key: tools-${{ runner.os }}-${{ hashFiles('tools/*/Makefile', 'tools/**/*.c', 'tools/**/*.cpp', 'tools/**/*.h') }} - name: ROM (Firered) run: make firered -j$(nproc) -O build-leafgreen: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install binutils run: | sudo apt-get update sudo apt-get install -y binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi libpng-dev python3 - name: Cache build tools uses: actions/cache@v4 with: path: | tools/bin2c/bin2c tools/gbafix/gbafix tools/gbagfx/gbagfx tools/jsonproc/jsonproc tools/mapjson/mapjson tools/mid2agb/mid2agb tools/preproc/preproc tools/ramscrgen/ramscrgen tools/rsfont/rsfont tools/scaninc/scaninc tools/trainerproc/trainerproc tools/compresSmol/compresSmol tools/compresSmol/compresSmolTilemap tools/wav2agb/wav2agb key: tools-${{ runner.os }}-${{ hashFiles('tools/*/Makefile', 'tools/**/*.c', 'tools/**/*.cpp', 'tools/**/*.h') }} - name: ROM (Leafgreen) run: make leafgreen -j$(nproc) -O release: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install binutils run: | sudo apt-get update sudo apt-get install -y binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi libpng-dev python3 - name: Cache build tools uses: actions/cache@v4 with: path: | tools/bin2c/bin2c tools/gbafix/gbafix tools/gbagfx/gbagfx tools/jsonproc/jsonproc tools/mapjson/mapjson tools/mid2agb/mid2agb tools/preproc/preproc tools/ramscrgen/ramscrgen tools/rsfont/rsfont tools/scaninc/scaninc tools/trainerproc/trainerproc tools/compresSmol/compresSmol tools/compresSmol/compresSmolTilemap tools/wav2agb/wav2agb key: tools-${{ runner.os }}-${{ hashFiles('tools/*/Makefile', 'tools/**/*.c', 'tools/**/*.cpp', 'tools/**/*.h') }} - name: Release env: GAME_VERSION: EMERALD run: make -j$(nproc) release test: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install binutils run: | sudo apt-get update sudo apt-get install -y binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi libpng-dev python3 - name: Cache build tools uses: actions/cache@v4 with: path: | tools/bin2c/bin2c tools/gbafix/gbafix tools/gbagfx/gbagfx tools/jsonproc/jsonproc tools/mapjson/mapjson tools/mid2agb/mid2agb tools/preproc/preproc tools/ramscrgen/ramscrgen tools/rsfont/rsfont tools/scaninc/scaninc tools/trainerproc/trainerproc tools/compresSmol/compresSmol tools/compresSmol/compresSmolTilemap tools/wav2agb/wav2agb tools/patchelf/patchelf tools/mgba-rom-test-hydra/mgba-rom-test-hydra key: tools-check-${{ runner.os }}-${{ hashFiles('tools/*/Makefile', 'tools/**/*.c', 'tools/**/*.cpp', 'tools/**/*.h') }} - name: Test env: GAME_VERSION: EMERALD TEST: 1 run: make -j$(nproc) check # Gate job: satisfies the "build" branch protection rule. # Passes only when all parallel build/test jobs succeed. build: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest needs: [build-emerald, build-firered, build-leafgreen, release, test] steps: - name: All builds passed run: echo "All builds and tests passed." docs_validate: if: github.actor != 'allcontributors[bot]' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Check that SUMMARY.md includes markdown doc files run: .github/docs_validate/inclusive_summary.py allcontributors: if: github.actor == 'allcontributors[bot]' runs-on: ubuntu-latest needs: [] steps: - name: Automatically pass for allcontributors run: echo "CI automatically passes for allcontributors" && exit 0