mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-25 03:56:54 +01:00
Add ci workflow (#1)
Here is a simple(ish) CI for building the menu. I am sure it can be improved, but is a great starting point for developing further.
This commit is contained in:
parent
ed4c7b358b
commit
c4aaf3055b
104
.github/workflows/build.yml
vendored
Normal file
104
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
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
|
||||
./build.sh # release --force-clean
|
||||
|
||||
- name: Build rom
|
||||
run: |
|
||||
# chmod +x build.sh
|
||||
# ./build.sh # release --force-clean
|
||||
mkdir build
|
||||
make -j all
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: N64FlashcartMenu
|
||||
path: |
|
||||
./build/N64FlashcartMenu.z64
|
||||
if-no-files-found: ignore
|
||||
|
||||
finalize:
|
||||
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
|
||||
python ../tools/finalize.py N64FlashcartMenu.z64
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: N64FlashcartMenu
|
||||
path: |
|
||||
./build/sc64menu.n64
|
||||
if-no-files-found: ignore
|
||||
|
||||
# - name: Get release
|
||||
# if: github.event_name == 'release' && github.event.action == 'created'
|
||||
# id: get_release
|
||||
# uses: bruceadams/get-release@v1.3.2
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
# - name: Upload release asset
|
||||
# if: github.event_name == 'release' && github.event.action == 'created'
|
||||
# uses: actions/upload-release-asset@v1 # This will start failing soon due to needing node 12!
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
# asset_path: ./build/sc64menu.n64
|
||||
# asset_name: sc64menu
|
||||
# asset_content_type: application/zip
|
Loading…
Reference in New Issue
Block a user