mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 18:02:16 +00:00
* Remove and move comments to the correct procedures * Fix regular SDL compilation * Move animation data from Asm to C * Layout the anim macros in a common way. Add Big Endian support to them (I think?) * add CI for sdl objs, fix some of the build on linux * make native macos work --------- Co-authored-by: bitten2up <bitten2up@courvix.com> Co-authored-by: Oliver Bell <freshollie@gmail.com>
147 lines
4.7 KiB
YAML
147 lines
4.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
pull_request_target:
|
|
|
|
jobs:
|
|
format:
|
|
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork || github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork}}
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout PR
|
|
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target'}}
|
|
uses: actions/checkout@master
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Checkout
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: actions/checkout@master
|
|
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt update && sudo apt install clang-format-13
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
make check_format
|
|
|
|
build:
|
|
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork || github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork}}
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout PR
|
|
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target'}}
|
|
uses: actions/checkout@master
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Checkout
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: actions/checkout@master
|
|
|
|
- name: Checkout gh-pages
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: actions/checkout@master
|
|
with:
|
|
path: gh-pages
|
|
ref: gh-pages
|
|
|
|
- name: Checkout agbcc
|
|
uses: actions/checkout@master
|
|
with:
|
|
path: agbcc
|
|
repository: SAT-R/agbcc
|
|
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt update && sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi xorg-dev
|
|
python3 -m pip install gitpython
|
|
# build-essential, git, and libpng-dev are already installed
|
|
# gcc-arm-none-eabi is only needed for the modern build
|
|
# as an alternative to dkP
|
|
|
|
- name: Install agbcc
|
|
run: |
|
|
./build.sh
|
|
./install.sh ../
|
|
working-directory: agbcc
|
|
|
|
- name: Compare
|
|
run: make -j${nproc}
|
|
|
|
- name: Progress
|
|
run: |
|
|
python3 scripts/progress.py text
|
|
|
|
- name: Generate reports
|
|
if: ${{ github.event_name == 'push' }}
|
|
run: |
|
|
mkdir -p gh-pages/reports
|
|
mkdir -p gh-pages/maps
|
|
python3 scripts/progress.py csv >> gh-pages/reports/progress-sa2-nonmatching.csv
|
|
python3 scripts/progress.py csv -m >> gh-pages/reports/progress-sa2-matching.csv
|
|
python3 scripts/progress.py shield-json > gh-pages/reports/progress-sa2-shield.json
|
|
echo "REPORTS_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV
|
|
cp sa2.map gh-pages/maps/${GITHUB_SHA}.map
|
|
|
|
#- name: Japan
|
|
#run: |
|
|
#make clean
|
|
#make japan -j${nproc}
|
|
|
|
- name: Europe
|
|
run: |
|
|
make clean
|
|
make europe -j${nproc}
|
|
|
|
- name: Update reports
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: EndBug/add-and-commit@v7
|
|
with:
|
|
branch: gh-pages
|
|
cwd: "./gh-pages"
|
|
add: "reports maps"
|
|
message: ${{ env.REPORTS_COMMIT_MSG }}
|
|
|
|
platforms_linux:
|
|
strategy:
|
|
matrix:
|
|
platform: ["sdl", "sdl_win32", "win32"]
|
|
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork || github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork}}
|
|
runs-on: ubuntu-22.04
|
|
name: Linux build ${{ matrix.platform }}
|
|
steps:
|
|
- name: Checkout PR
|
|
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target'}}
|
|
uses: actions/checkout@master
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Checkout
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: actions/checkout@master
|
|
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt update && sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi xorg-dev libsdl2-dev gcc-mingw-w64 libarchive-tools
|
|
|
|
- name: Checkout agbcc
|
|
uses: actions/checkout@master
|
|
with:
|
|
path: agbcc
|
|
repository: SAT-R/agbcc
|
|
|
|
- name: Install agbcc
|
|
run: |
|
|
./build.sh
|
|
./install.sh ../
|
|
working-directory: agbcc
|
|
|
|
- name: ${{ matrix.platform }}
|
|
run: |
|
|
make clean
|
|
make -j${nproc} ${{ matrix.platform }}
|