mirror of
https://github.com/zeldaret/oot
synced 2026-05-23 06:54:24 -04:00
baf7ca83b1
* Migrate CI to Github Actions (#2740) Changes the CI system from Jenkins to Github Actions (GHA) as discussed on discord. I tried to adapt the original jenkinsfile as I could. One major difference from the old system is each version will now be built in parallel instead of sequentially. Also, the mapfiles will be uploaded as an GHA artifact to the Action workflow. I think having them easily available would be nice. This specific approach to handle GHA for decomp projects was adapted from the one used by the GC/Wii community. It is documented here https://github.com/encounter/dtk-template/blob/main/docs/github_actions.md There's a writeup about this adaptation for N64 projects [here](https://github.com/AngheloAlf/drmario64/pull/19). * Rename generate_patch_from_gha -> gha_fix_bss_and_generate_patch * Make check formatting always on the full repo * ruin z_fishing bss for CI testing purposes * fix not passing VERSION to tools/gha_fix_bss_and_generate_patch.sh * debugging gha_fix_bss_and_generate_patch.sh * fix the debugging... * git config safe.directory * rm debugging stuff from gha_fix_bss_and_generate_patch.sh * fix_bss gha-side machinery, attempt 1 * fix1 * fix2 * debug1 * checkout repo in merge_bss_fixes job * fix3 * fix4 * fix5 * some prettify * apply_fix_bss_patches.py complete * fix6 * generate_patch.sh is back * apply fix bss changes from gha! it works! * generate_patch.sh suggestion * ruin bss again for testing * unruin bss * Update .github/workflows/format.yml Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * update matrix version list * finalize apply_fix_bss_patches.py --------- Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
90 lines
2.9 KiB
YAML
90 lines
2.9 KiB
YAML
name: Build
|
|
|
|
# Build on every branch push, tag push, and pull request change:
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build_repo:
|
|
# This is a *private* build container.
|
|
container: ghcr.io/zeldaret/oot-build:main
|
|
|
|
name: Build repo (${{ matrix.version }})
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version:
|
|
- ntsc-1.0 # N64 NTSC 1.0 (Japan/US depending on REGION)
|
|
- ntsc-1.1 # N64 NTSC 1.1 (Japan/US depending on REGION)
|
|
- pal-1.0 # N64 PAL 1.0 (Europe)
|
|
- ntsc-1.2 # N64 NTSC 1.2 (Japan/US depending on REGION)
|
|
- pal-1.1 # N64 PAL 1.1 (Europe)
|
|
- gc-jp # GameCube Japan
|
|
- gc-jp-mq # GameCube Japan Master Quest
|
|
- gc-us # GameCube US
|
|
- gc-us-mq # GameCube US Master Quest
|
|
- gc-eu-dbg-2 # GameCube Europe/PAL Debug (earlier build)
|
|
- gc-eu-mq-dbg # GameCube Europe/PAL Master Quest Debug
|
|
- gc-eu-dbg # GameCube Europe/PAL Debug
|
|
- gc-eu # GameCube Europe/PAL
|
|
- gc-eu-mq # GameCube Europe/PAL Master Quest
|
|
- gc-jp-ce # GameCube Japan (Collector's Edition disc)
|
|
- ique-cn # iQue Player (Simplified Chinese)
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: git config safe.directory
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get install -y git build-essential binutils-mips-linux-gnu curl python3 python3-pip python3-venv libxml2-dev
|
|
|
|
- name: Get the dependency
|
|
run: ln -s /orig/${{ matrix.version }}/baserom.z64 baseroms/${{ matrix.version }}/baserom.z64
|
|
|
|
- name: Setup
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} setup
|
|
|
|
- name: Build ${{ matrix.version }}
|
|
id: build
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }}
|
|
|
|
- name: Fix BSS and generate patch
|
|
if: failure() && steps.build.outcome == 'failure'
|
|
uses: ./.github/actions/fix-bss-and-generate-patch
|
|
with:
|
|
version: ${{ matrix.version }}
|
|
|
|
- name: Upload map
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: oot-${{ matrix.version }}.map
|
|
path: build/${{ matrix.version }}/oot-${{ matrix.version }}.map
|
|
|
|
merge_bss_fixes:
|
|
name: Merge BSS fixes
|
|
runs-on: ubuntu-latest
|
|
needs: [build_repo]
|
|
if: '!cancelled()' # Run even if build_repo fails
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Download patches
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
pattern: fix_bss_*.patch
|
|
merge-multiple: true
|
|
|
|
- name: Apply patches
|
|
run: python3 .github/scripts/apply_fix_bss_patches.py
|
|
|
|
- name: Generate patch
|
|
run: .github/scripts/generate_patch.sh
|