mirror of
https://github.com/zeldaret/af.git
synced 2026-09-26 13:33:16 -04:00
4ddba04604
* Generate decomp.dev progress reports - Wire up CI to generate decomp.dev progress reports (using the objdiff report format) and upload them as GHA artifacts, by using `mapfile_parser`. - This also adds a `decomp.yaml` file, which is used by `mapfile_parser` to generate the objdiff reports. - The `progress.py` script used to locally visualize the current progress has been updated to parse objdiff reports too. - `mapfile_parser` 2.13.0 or above is now required. - Delete the old `upload_frogress.py` script. Once we have this we can create an af entry in [decomp.dev](https://decomp.dev/). I'll talk with Encounter to migrate the old frogress progress into decomp.dev too * Activate venv
119 lines
4.1 KiB
YAML
119 lines
4.1 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/af-build:main
|
|
# Prevent running outside zeldaret/af as fetching the container would fail anyway.
|
|
if: ${{ github.repository == 'zeldaret/af' }}
|
|
|
|
name: Build repo (${{ matrix.version }})
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version:
|
|
- jp # N64 Japan
|
|
|
|
env:
|
|
WARNINGS_CHECK: 1
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- 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
|
|
|
|
- name: Get the dependency
|
|
run: ln -s /orig/${{ matrix.version }}/baserom.z64 baseroms/${{ matrix.version }}/baserom.z64
|
|
|
|
# The compiler archives are embedded in the runner image, to avoid downloading them from GitHub (during make setup), which occasionally fails.
|
|
- name: Provide compiler archives
|
|
run: |
|
|
mkdir -p tools/compiler_archives/
|
|
ln -s /compiler_archives tools/compiler_archives/archives
|
|
|
|
- name: venv
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} venv
|
|
|
|
- name: Setup
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} setup 2> >(tee tools/warnings_count/warnings_setup_new.txt)
|
|
|
|
- name: Check setup warnings
|
|
run: ./tools/warnings_count/compare_warnings.sh setup
|
|
|
|
- name: Lib
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} lib 2> >(tee tools/warnings_count/warnings_lib_new.txt)
|
|
|
|
- name: Check lib warnings
|
|
run: ./tools/warnings_count/compare_warnings.sh lib
|
|
|
|
- name: Extract
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} extract 2> >(tee tools/warnings_count/warnings_extract_new.txt)
|
|
|
|
- name: Check extract warnings
|
|
run: ./tools/warnings_count/compare_warnings.sh extract
|
|
|
|
- name: Build ${{ matrix.version }}
|
|
id: build
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} rom 2> >(tee tools/warnings_count/warnings_build_new.txt)
|
|
|
|
- name: Check build uncompressed warnings
|
|
run: ./tools/warnings_count/compare_warnings.sh build
|
|
|
|
- name: Compress ${{ matrix.version }}
|
|
run: make -j $(nproc) VERSION=${{ matrix.version }} compress 2> >(tee tools/warnings_count/warnings_compress_new.txt)
|
|
|
|
- name: Check compress warnings
|
|
run: ./tools/warnings_count/compare_warnings.sh compress
|
|
|
|
- name: Show warnings
|
|
if: failure() && steps.build.outcome == 'failure'
|
|
run: cat tools/warnings_count/warnings_setup_new.txt tools/warnings_count/warnings_assets_new.txt tools/warnings_count/warnings_disasm_new.txt tools/warnings_count/warnings_build_new.txt tools/warnings_count/warnings_compress_new.txt
|
|
|
|
- name: Generate objdiff report
|
|
run: |
|
|
. .venv/bin/activate
|
|
python3 -m mapfile_parser objdiff_report report.json --version ${{ matrix.version }}
|
|
|
|
- name: Upload progress report artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: ${{ matrix.version }}_report
|
|
path: report.json
|
|
|
|
- name: Upload map
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: animalforest-${{ matrix.version }}.map
|
|
path: build/animalforest-${{ matrix.version }}.map
|
|
if-no-files-found: error
|
|
|
|
# This job does not do anything, its purpose is to be used as a status check in GitHub rules.
|
|
all_versions_built:
|
|
name: All versions built
|
|
needs: [build_repo]
|
|
runs-on: ubuntu-latest
|
|
# Solution 1 from https://github.com/actions/runner/issues/2566#issuecomment-3053484216
|
|
if: ${{ always() && github.repository == 'zeldaret/af' }}
|
|
steps:
|
|
- run: |
|
|
if [ "${{ needs.build_repo.result }}" != "success" ]; then
|
|
exit 1
|
|
fi
|