Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
louist103 authored Nov 11, 2023
1 parent d60d163 commit 53c41a1
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Build and Deploy

on:
pull_request:
push:
branches:
- main

jobs:
build:
runs-on: self-hosted

strategy:
matrix:
python-version: [3.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Check formatting
run: bash -c "tools/check_format.sh 2>&1 | tee tools/check_format.txt"

- name: Check relocs
run: bash -c "tools/reloc_spec_check.sh"

- name: Install Python dependencies
run: python -m pip install -r requirements.txt

- name: Copy ROM
run: cp /usr/local/etc/roms/mm.us.rev1.z64 baserom.mm.us.rev1.z64

- name: Setup
run: bash -c "make -j setup 2> >(tee tools/warnings_count/warnings_setup_new.txt)"

- name: Check setup warnings
run: bash -c "./tools/warnings_count/compare_warnings.sh setup"

- name: Assets
run: bash -c "make -j assets 2> >(tee tools/warnings_count/warnings_assets_new.txt)"

- name: Check assets warnings
run: bash -c "./tools/warnings_count/compare_warnings.sh assets"

- name: Disasm
run: bash -c "make -j disasm 2> >(tee tools/warnings_count/warnings_disasm_new.txt)"

- name: Check disasm warnings
run: bash -c "./tools/warnings_count/compare_warnings.sh disasm"

- name: Build
run: bash -c "make -j uncompressed 2> >(tee tools/warnings_count/warnings_build_new.txt)"

- name: Check build warnings
run: bash -c "./tools/warnings_count/compare_warnings.sh build"

- name: Compress
run: bash -c "make -j compressed 2> >(tee tools/warnings_count/warnings_compress_new.txt)"

- name: Check compress warnings
run: bash -c "./tools/warnings_count/compare_warnings.sh compress"

post-build:
runs-on: self-hosted

steps:
- name: Display warnings on failure
if: failure()
run: cat tools/check_format.txt tools/warnings_count/warnings_setup_new.txt tools/warnings_count/warnings_disasm_new.txt tools/warnings_count/warnings_build_new.txt

- name: Clean workspace
run: git clean -fdX

0 comments on commit 53c41a1

Please sign in to comment.