Skip to content

Build and release plugins #5

Build and release plugins

Build and release plugins #5

Workflow file for this run

name: Build and release plugins
on:
workflow_dispatch:
inputs:
plugin:
description: 'Plugin to build'
required: true
type: choice
options:
- Airwindows
- Bogaudio
- chowdsp
- CountModula
- Geodesics
- kocmoc
- NANO
- OrangeLine
- VCV-Fundamental
- Valley
- "./"
linux_x64:
description: 'Build on Linux x64'
required: true
default: true
type: boolean
win_x64:
description: 'build on Windows x64'
required: true
default: false
type: boolean
mac_x64:
description: 'build on Mac x64'
required: true
default: false
type: boolean
mac_arm:
description: 'build on Mac arm'
required: true
default: false
type: boolean
push:
branches:
- release # make a new release of all modules
- fix-ci # for debugging
tags:
- 'plugin-api-v[0-9]+.[0-9]+.[0-9]+'
- 'debug-*'
paths:
- '!**.md' # Skip docs
jobs:
build-lin:
if: ${{ github.event_name == 'push' || inputs.linux_x64 }}
strategy:
matrix:
gcc: ['12.2.Rel1'] # can add other versions if needed
name: "Build firmware"
runs-on: ubuntu-24.04
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/actions-setup-cmake@v1.13
with:
cmake-version: '3.26.x'
- name: Git setup
run: git config --global --add safe.directory '*'
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
run: |
cd ${{ inputs.plugin }}
cmake -B build
cmake --build build
- name: Set Release Version
if: startsWith(github.ref, 'refs/tags/plugin-api-v')
uses: FranzDiebold/github-env-vars-action@v2
- name: Release
if: startsWith(github.ref, 'refs/tags/plugin-api-v')
uses: softprops/action-gh-release@v1
with:
name: "Plugins: API Version ${{ env.CI_REF_NAME }}"
files: |
metamodule-plugins/*.mmplugin
build-win:
if: ${{ inputs.win_x64 }}
name: "Build firmware on windows"
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Install windows dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git make mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja
path-type: inherit
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '12.2.Rel1'
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
run: |
cmake -B build
cmake --build build