2023-02-22 18:12:50 +01:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- created
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ghcr.io/n64-tools/gcc-toolchain-mips64:latest # we use an unofficial container for the moment as git-submodules dont work in the official one!
|
|
|
|
credentials:
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.github_token }}
|
|
|
|
volumes:
|
|
|
|
- my_docker_volume:/volume_mount
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Check for dockerenv file
|
|
|
|
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 1 # we only require the last check-in, unless we want to create a changelog.
|
|
|
|
|
|
|
|
- name: Build libdragon
|
|
|
|
run: |
|
|
|
|
cd ./libdragon
|
2023-02-22 19:28:09 +01:00
|
|
|
# FIXME: this currently also builds the examples which adds to the build time.
|
2023-02-24 15:24:59 +01:00
|
|
|
# ./build.sh
|
|
|
|
# WORKAROUND: for CI
|
|
|
|
make -j libdragon
|
|
|
|
make install
|
|
|
|
make -j tools
|
|
|
|
make tools-install
|
|
|
|
make install-mk
|
|
|
|
|
|
|
|
- name: Build N64FlashcartMenu ROM
|
2023-02-22 18:12:50 +01:00
|
|
|
run: |
|
|
|
|
mkdir build
|
2023-02-24 15:24:59 +01:00
|
|
|
# TODO: split this to use params for each flashcart type.
|
2023-02-22 18:12:50 +01:00
|
|
|
make -j all
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: N64FlashcartMenu
|
|
|
|
path: |
|
|
|
|
./build/N64FlashcartMenu.z64
|
|
|
|
|
2023-02-24 15:24:59 +01:00
|
|
|
finalize-sc64-menu:
|
2023-02-22 18:12:50 +01:00
|
|
|
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: ./build
|
|
|
|
|
|
|
|
- name: Finalize rom
|
|
|
|
run: |
|
|
|
|
cd ./build
|
2023-02-27 04:29:36 +01:00
|
|
|
python ../tools/sc64/finalize.py N64FlashcartMenu.z64
|
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: |
|
|
|
|
./build/sc64menu.n64
|
|
|
|
if-no-files-found: ignore
|
|
|
|
|
2023-02-24 15:24:59 +01:00
|
|
|
|
|
|
|
# release-sc64-menu:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# needs: finalize-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."
|
|
|
|
|