Create ci.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |