Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build Framethrower Denise

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Remove Firmware build folder
run: rm -rf Firmware/build

- name: Install Dependencies
run: sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib

- name: Get Pico SDK
run: git clone --branch 2.1.0 --recurse-submodules https://github.com/raspberrypi/pico-sdk.git

- name: Create Build
run: |
rm -rf build
mkdir -p build

- name: Build Framethrower Denise
uses: threeal/cmake-action@v2
id: cmake
with:
source-dir: Firmware
options: |
PICO_SDK_PATH=${{ github.workspace }}/pico-sdk

- name: List Files
run: ls -lh Firmware/build/**

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
Firmware/build/*.uf2
Firmware/build/*.bin

release:
needs: build
runs-on: ubuntu-latest

steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: output

- name: Create Draft Release
uses: softprops/action-gh-release@v2.2.2
#if: github.ref == 'refs/heads/main'
with:
tag_name: latest
draft: true
files: |
output/**/*.uf2
output/**/*.bin

- name: Create Tagged Release
uses: softprops/action-gh-release@v2.2.2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
output/**/*.uf2
output/**/*.bin