mirror of
https://github.com/SwareJonge/mkdd.git
synced 2024-11-23 13:29:54 +00:00
81 lines
2.3 KiB
YAML
81 lines
2.3 KiB
YAML
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:
|
|
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'
|
|
|
|
- name: Get Dependencies
|
|
env:
|
|
SECRET_LINK: ${{ secrets.MKDD_DEPS_LINK }}
|
|
run: |
|
|
# Download Dependencies
|
|
Invoke-WebRequest "$Env:SECRET_LINK" -OutFile .\build-dependencies.zip
|
|
# Extract Dependencies
|
|
Expand-Archive -Path build-dependencies.zip .\ -Force
|
|
# Clean up
|
|
Remove-Item '.\build-dependencies.zip'
|
|
|
|
- name: Build Debug
|
|
run: |
|
|
python configure.py -r us
|
|
ninja
|
|
|
|
- name: Print progress(Debug)
|
|
run: |
|
|
.\tools\ProgressCalculator.exe
|
|
|
|
- name: Clean Debug
|
|
run: |
|
|
ninja -t clean
|
|
|
|
- name: Build Release
|
|
run: |
|
|
python configure.py -r eu
|
|
ninja
|
|
|
|
- name: Print progress(Release)
|
|
run: |
|
|
.\tools\ProgressCalculator.exe
|
|
|
|
- name: Clean
|
|
run: |
|
|
ninja -t clean
|
|
# Remove files stored in build-dependencies
|
|
Remove-Item '.\tools\1.2.5\' -Recurse
|
|
Remove-Item '.\tools\1.2.5n\' -Recurse
|
|
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'
|
|
Remove-Item '.\out\' -Recurse
|
|
Remove-Item '.\tools\devkitppc\' -Recurse
|
|
# Remove Items from build
|
|
Remove-Item '.\include\BuildtimeDat.bin'
|
|
Remove-Item '.\include\System.arc.bin'
|
|
Remove-Item '.\include\JSystem\JUtility\FontData\Ascfont_fix12.bfn'
|