forked from SteveRussell33/Prism
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.97 KB
/
build-metamodule-plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build and release MetaModule plugin
on:
workflow_dispatch:
inputs:
SDK_branch:
description: 'MetaModule SDK branch'
required: true
type: choice
options:
- main
- v2.0-dev
do_release:
description: 'Create Release (must also tag!)'
required: true
default: false
type: boolean
jobs:
build-lin:
strategy:
matrix:
gcc: ['12.3.Rel1'] # can add other versions if needed
name: "Build firmware on linux"
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/[email protected]
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: Install linux dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Set Release Version
if: startsWith(github.ref, 'refs/tags/')
uses: FranzDiebold/github-env-vars-action@v2
- name: Build
run: |
mkdir -p metamodule-plugins
git clone -b ${{ inputs.SDK_branch }} https://github.com/4ms/metamodule-plugin-sdk --recursive
cmake -B build -G Ninja -DMETAMODULE_SDK_DIR=metamodule-plugin-sdk -DINSTALL_DIR=metamodule-plugins
cmake --build build
cd metamodule-plugins
for f in *.mmplugin; do mv $f ${{ env.CI_REF_NAME }}.mmplugin; done;
- name: Release
if: startsWith(github.ref, 'refs/tags/') && ${{ inputs.do_release }}
uses: softprops/action-gh-release@v1
with:
name: "Release: ${{ env.CI_REF_NAME }}"
files: |
metamodule-plugins/*.mmplugin