Merge pull request #149 from 4ms/nlc-port #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test firmware | |
on: | |
workflow_dispatch: | |
inputs: | |
limited_modules: | |
description: 'Build only a subset of modules' | |
default: false | |
type: boolean | |
push: | |
branches: | |
- main | |
tags: | |
- 'firmware-v[0-9]+.[0-9]+.[0-9]+' | |
paths: | |
- 'shared/**' | |
- 'firmware/**' | |
- '!firmware/bootloader/**' | |
- '!**.md' # Skip docs | |
- '!shared/svgextract' # Skip generator script (still run CI if generated files change) | |
- '!shared/gen_minblep' # Skip generator script (still run CI if generated files change) | |
- '!shared/tableGen' # Skip generator script (still run CI if generated files change) | |
jobs: | |
build: | |
strategy: | |
matrix: | |
gcc: ['12.2.Rel1'] # can add other versions if needed | |
name: "Build firmware" | |
runs-on: ubuntu-latest | |
container: ghcr.io/lnnrts/metamodule:latest | |
steps: | |
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc) | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
with: | |
release: ${{ matrix.gcc }} | |
- name: Install cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.26.x' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
token: ${{ secrets.CHECKOUT_TOKEN }} | |
- name: Build and test | |
if: ${{ ! inputs.limited_modules }} | |
run: cd firmware && make configure && make all | |
- name: Build and test | |
if: ${{ inputs.limited_modules }} | |
run: | | |
echo "4ms:EnOsc" >> firmware/lim | |
echo "4ms:ENVCA" >> firmware/lim | |
echo "Befaco:EvenVCO" >> firmware/lim | |
echo "HetrickCV:PhasorGen" >> firmware/lim | |
echo "AudibleInstruments:Braids" >> firmware/lim | |
cd firmware && make limit lim && make all | |
# Don't upload artifacts for each build, uses too much space on our account | |
# - name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: firmware | |
# path: | | |
# firmware/build/mp1corea7/medium/main.elf | |
# firmware/build/mp1corea7/medium/main.uimg | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/firmware-v') | |
with: | |
name: "Firmware Version: ${{ env.CI_REF_NAME }}" | |
files: | | |
firmware/build/mp1corea7/medium/main.uimg | |