N64FlashcartMenu/.github/workflows/build.yml
Robin Jones 029e1cf638
Improve dev container (#4)
* build against libdragon unstable

* remove libPng

* Fix build warnings

* Add remote deploy

* Switch to ubuntu latest image

* Improve readme
2023-06-04 16:57:31 +01:00

97 lines
2.4 KiB
YAML

name: build
on:
push:
pull_request:
release:
types:
- created
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# - name: Check for dockerenv file
# run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
- 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: 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
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
# 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."