mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-12-01 06:54:14 +01:00
121 lines
3.0 KiB
YAML
121 lines
3.0 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
release:
|
|
types:
|
|
- created
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-sc64-menu:
|
|
runs-on: ubuntu-latest
|
|
|
|
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: Login to GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Install pinned version of devcontainers cli (https://github.com/devcontainers/ci/issues/252#issuecomment-1654523080)
|
|
shell: bash
|
|
run: |
|
|
npm install --global @devcontainers/cli@0.50.0
|
|
|
|
- name: Build N64FlashcartMenu ROM
|
|
uses: devcontainers/ci@v0.3
|
|
with:
|
|
push: never
|
|
runCmd: |
|
|
mkdir build
|
|
mkdir output
|
|
# TODO: split this to use params for each flashcart type.
|
|
make
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: N64FlashcartMenu
|
|
path: |
|
|
./output/N64FlashcartMenu.z64
|
|
./build/N64FlashcartMenu.elf
|
|
|
|
minify-sc64-menu:
|
|
runs-on: ubuntu-latest
|
|
needs: build-sc64-menu
|
|
|
|
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
|
|
path: ./
|
|
|
|
- name: Finalize ROM
|
|
run: |
|
|
# make all
|
|
python ./tools/sc64/minify.py ./build/N64FlashcartMenu.elf ./output/N64FlashcartMenu.z64 ./output/sc64menu.n64
|
|
continue-on-error: false
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: SC64-Menu
|
|
path: |
|
|
./output/sc64menu.n64
|
|
if-no-files-found: ignore
|
|
|
|
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
|
|
|
|
|
|
# release-sc64-menu:
|
|
# runs-on: ubuntu-latest
|
|
# needs: minify-sc64-menu
|
|
|
|
# steps:
|
|
# - name: Generate release
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# run: |
|
|
# echo "still release preview. Check actions for build assets."
|
|
|