From f294141d6b4d6f3554f70736a4544638f17a2423 Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Mon, 25 Mar 2024 08:17:27 -0700 Subject: [PATCH 1/2] Makefile: add a `debug` target The `test` application is unnecessary for the end user, so for the default target, only build the bootstrap module. The new `debug` target will build everything. --- code/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/Makefile b/code/Makefile index 9cf38d5..7709239 100644 --- a/code/Makefile +++ b/code/Makefile @@ -15,14 +15,16 @@ include $(DEVKITARM)/ds_rules #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- -all: checklibtwl checkbootstrap checktest +all: checklibtwl checkbootstrap + +debug: all checktest #--------------------------------------------------------------------------------- checklibtwl: $(MAKE) -C libs/libtwl #--------------------------------------------------------------------------------- -checkbootstrap: +checkbootstrap: checklibtwl $(MAKE) -C bootstrap #--------------------------------------------------------------------------------- From 9a4eac64ddc9f02de271d1fcb395bf252029f57d Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Tue, 19 Mar 2024 09:29:03 -0700 Subject: [PATCH 2/2] Add GitHub Actions workflow This will compile GBARunner3.nds, then set up the zip file as follows: - /GBARunner3.nds - /_gba/configs/*.json (These are from the `configs` folder in project root.) --- .github/workflows/nightly.yml | 36 +++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/nightly.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..5fd8168 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,36 @@ +name: Build nightly + +on: + push: + paths-ignore: + - 'README.md' + - 'docs' + pull_request: + paths-ignore: + - 'README.md' + - 'docs' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: devkitpro/devkitarm + name: Build with Docker using devkitARM + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Make application + run: | + make -C code + - name: Prepare for build publishing + run: | + mkdir -p out/_gba/ + cp -f code/bootstrap/GBARunner3.nds out/ + cp -r configs out/_gba/ + - name: Publish build to GH Actions + uses: actions/upload-artifact@v4 + with: + path: out + name: GBARunner3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..376f330 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Build release + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + container: devkitpro/devkitarm + name: Build with Docker using devkitARM + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Make application + run: | + make -C code + - name: Prepare for build publishing + run: | + mkdir -p out/_gba/ + cp -f code/bootstrap/GBARunner3.nds out/ + cp -r configs out/_gba/ + - name: Publish build to GH Actions + uses: actions/upload-artifact@v4 + with: + path: out + name: GBARunner3 + - name: Package for release + run: | + cd out && zip -r ../GBARunner3.zip * + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + GBARunner3.zip