From ac2fdd440b2e964ede7a28cb47ad841b4c33561c Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Sun, 14 Dec 2025 10:28:20 -0800 Subject: [PATCH] workflow: add build pipeline --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4d789ed --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build USB examples + +on: + push: + branches: ["develop"] + paths-ignore: + - 'README.md' + pull_request: + branches: ["develop"] + paths-ignore: + - 'README.md' + +jobs: + build: + strategy: + matrix: + example: [ + "mass-storage", + "usb-speaker", + "usb-video" + ] + runs-on: ubuntu-latest + container: devkitpro/devkitarm:20241104 + name: Build with Docker using devkitARM + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Build example + run: | + cd examples/${{ matrix.example }} + make + - name: Publish build to GH Actions + uses: actions/upload-artifact@v4 + with: + path: examples/${{ matrix.example }}/${{ matrix.example }}.nds + name: ${{ matrix.example }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4fd3e62 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Build USB examples release + +on: + release: + types: [published] + +jobs: + build: + strategy: + matrix: + example: [ + "mass-storage", + "usb-speaker", + "usb-video" + ] + runs-on: ubuntu-latest + container: devkitpro/devkitarm:20241104 + name: Build with Docker using devkitARM + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Build example + run: | + cd examples/${{ matrix.example }} + make + - name: Publish build to GH Actions + uses: actions/upload-artifact@v4 + with: + path: examples/${{ matrix.example }}/${{ matrix.example }}.nds + name: ${{ matrix.example }} + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + examples/${{ matrix.example }}/${{ matrix.example }}.nds