2023-02-01 21:09:52 +00:00
|
|
|
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
|
2023-02-16 19:53:52 +00:00
|
|
|
uses: actions/checkout@v3
|
2023-02-01 21:09:52 +00:00
|
|
|
- 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'
|
2023-02-01 21:09:52 +00:00
|
|
|
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
|
2023-02-01 21:09:52 +00:00
|
|
|
# Clean up
|
|
|
|
Remove-Item '.\build-dependencies.zip'
|
|
|
|
|
2023-03-01 15:16:56 +00:00
|
|
|
- name: Build Debug
|
|
|
|
run: |
|
|
|
|
python configure.py -r us
|
2023-03-01 15:32:13 +00:00
|
|
|
ninja
|
2023-02-01 21:09:52 +00:00
|
|
|
|
2023-03-01 15:16:56 +00:00
|
|
|
- name: Print progress(Debug)
|
2023-02-01 21:09:52 +00:00
|
|
|
run: |
|
|
|
|
.\tools\ProgressCalculator.exe
|
|
|
|
|
2023-03-01 15:23:42 +00:00
|
|
|
- name: Clean Debug
|
|
|
|
run: |
|
|
|
|
ninja -t clean
|
|
|
|
|
2023-03-01 15:16:56 +00:00
|
|
|
- name: Build Release
|
2023-02-01 21:09:52 +00:00
|
|
|
run: |
|
2023-03-01 15:16:56 +00:00
|
|
|
python configure.py -r eu
|
|
|
|
ninja
|
|
|
|
|
|
|
|
- name: Print progress(Release)
|
|
|
|
run: |
|
2023-04-30 20:05:37 +00:00
|
|
|
.\tools\ProgressCalculator.exe
|
2023-03-01 15:16:56 +00:00
|
|
|
|
|
|
|
- name: Clean
|
|
|
|
run: |
|
|
|
|
ninja -t clean
|
2023-02-01 21:09:52 +00:00
|
|
|
# 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
|
2023-03-01 15:16:56 +00:00
|
|
|
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'
|