2023-07-09 00:52:39 +02:00
|
|
|
name: Build
|
2023-02-22 18:12:50 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- created
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2023-07-09 00:52:39 +02:00
|
|
|
build-sc64-menu:
|
2023-02-22 18:12:50 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
2023-06-04 17:57:31 +02:00
|
|
|
submodules: recursive
|
2023-02-22 18:12:50 +01:00
|
|
|
fetch-depth: 1 # we only require the last check-in, unless we want to create a changelog.
|
|
|
|
|
2023-05-28 20:56:38 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2023-02-24 15:24:59 +01:00
|
|
|
- name: Build N64FlashcartMenu ROM
|
2023-05-28 20:56:38 +02:00
|
|
|
uses: devcontainers/ci@v0.3
|
|
|
|
with:
|
|
|
|
push: never
|
|
|
|
runCmd: |
|
|
|
|
mkdir build
|
|
|
|
mkdir output
|
|
|
|
# TODO: split this to use params for each flashcart type.
|
|
|
|
make
|
2023-02-22 18:12:50 +01:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: N64FlashcartMenu
|
|
|
|
path: |
|
2023-03-12 20:43:16 +01:00
|
|
|
./output/N64FlashcartMenu.z64
|
|
|
|
./build/N64FlashcartMenu.elf
|
2023-02-22 18:12:50 +01:00
|
|
|
|
2023-03-12 20:43:16 +01:00
|
|
|
minify-sc64-menu:
|
2023-02-22 18:12:50 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-07-09 00:52:39 +02:00
|
|
|
needs: build-sc64-menu
|
2023-02-22 18:12:50 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.11.x'
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 1 # we only require the last check-in, unless we want to create a changelog.
|
|
|
|
|
|
|
|
- name: Download ROM artifact
|
|
|
|
id: download-rom-artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: N64FlashcartMenu
|
2023-03-12 20:43:16 +01:00
|
|
|
path: ./
|
2023-02-22 18:12:50 +01:00
|
|
|
|
2023-07-09 00:52:39 +02:00
|
|
|
- name: Finalize ROM
|
2023-02-22 18:12:50 +01:00
|
|
|
run: |
|
2023-03-13 00:19:28 +01:00
|
|
|
# make all
|
2023-03-12 20:43:16 +01:00
|
|
|
python ./tools/sc64/minify.py ./build/N64FlashcartMenu.elf ./output/N64FlashcartMenu.z64 ./output/sc64menu.n64
|
2023-02-24 15:24:59 +01:00
|
|
|
continue-on-error: false
|
2023-02-22 18:12:50 +01:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-02-24 15:24:59 +01:00
|
|
|
name: SC64-Menu
|
2023-02-22 18:12:50 +01:00
|
|
|
path: |
|
2023-03-12 20:43:16 +01:00
|
|
|
./output/sc64menu.n64
|
2023-02-22 18:12:50 +01:00
|
|
|
if-no-files-found: ignore
|
|
|
|
|
2023-07-09 00:52:39 +02:00
|
|
|
generate-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# needs: build-sc64-menu
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 1 # we only require the last check-in, unless we want to create a changelog.
|
|
|
|
|
|
|
|
- name: Run Doxygen
|
|
|
|
uses: mattnotmitt/doxygen-action@1.9.5
|
|
|
|
with:
|
|
|
|
doxyfile-path: './Doxyfile'
|
|
|
|
|
|
|
|
# - name: Deploy
|
|
|
|
# uses: peaceiris/actions-gh-pages@v3
|
|
|
|
# with:
|
|
|
|
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# publish_dir: ./docs
|
|
|
|
|
2023-02-24 15:24:59 +01:00
|
|
|
|
|
|
|
# release-sc64-menu:
|
|
|
|
# runs-on: ubuntu-latest
|
2023-03-12 20:43:16 +01:00
|
|
|
# needs: minify-sc64-menu
|
2023-02-24 15:24:59 +01:00
|
|
|
|
|
|
|
# steps:
|
|
|
|
# - name: Generate release
|
|
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
|
|
# run: |
|
|
|
|
# echo "still release preview. Check actions for build assets."
|
|
|
|
|