mkdd/.github/workflows/build.yml

81 lines
2.3 KiB
YAML
Raw Normal View History

name: Build
on:
push:
pull_request:
# workflow that builds/verify a commit, this file is based of mkw-decomp's workflow
jobs:
build_windows:
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: actions/setup-python@v4
with:
2023-02-15 15:21:03 +00:00
python-version: '3.10'
architecture: 'x64'
- uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
with:
requirement_files: requirements.txt
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
- run: pip install -r requirements.txt
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
2023-08-18 18:23:45 +00:00
- name: Get Dependencies
2023-08-18 18:06:44 +00:00
env:
SECRET_LINK: ${{ secrets.MKDD_DEPS_LINK }}
2023-08-18 18:09:39 +00:00
run: |
2023-08-18 18:23:45 +00:00
# Download Dependencies
2023-08-18 18:25:04 +00:00
Invoke-WebRequest "$Env:SECRET_LINK" -OutFile .\build-dependencies.zip
2023-08-18 18:23:45 +00:00
# Extract Dependencies
2023-02-20 20:53:18 +00:00
Expand-Archive -Path build-dependencies.zip .\ -Force
# Clean up
Remove-Item '.\build-dependencies.zip'
- name: Build Debug
run: |
python configure.py -r us
2023-03-01 15:32:13 +00:00
ninja
- name: Print progress(Debug)
run: |
.\tools\ProgressCalculator.exe
2023-03-01 15:23:42 +00:00
- name: Clean Debug
run: |
ninja -t clean
- name: Build Release
run: |
python configure.py -r eu
ninja
- name: Print progress(Release)
run: |
2023-04-30 20:05:37 +00:00
.\tools\ProgressCalculator.exe
- name: Clean
run: |
ninja -t clean
# Remove files stored in build-dependencies
2023-02-20 20:59:33 +00:00
Remove-Item '.\tools\1.2.5\' -Recurse
2023-08-18 18:23:45 +00:00
Remove-Item '.\tools\1.2.5n\' -Recurse
2023-02-20 20:59:33 +00:00
Remove-Item '.\tools\1.3.2\' -Recurse
Remove-Item '.\tools\2.6\' -Recurse
Remove-Item '.\orig\MarioClub_us\main.dol'
Remove-Item '.\orig\Release_eu\main.dol'
2023-03-01 15:38:11 +00:00
Remove-Item '.\out\' -Recurse
2023-02-20 20:59:33 +00:00
Remove-Item '.\tools\devkitppc\' -Recurse
2023-03-01 15:38:11 +00:00
# Remove Items from build
2023-02-08 19:17:54 +00:00
Remove-Item '.\include\BuildtimeDat.bin'
Remove-Item '.\include\System.arc.bin'
Remove-Item '.\include\JSystem\JUtility\FontData\Ascfont_fix12.bfn'