generated from HyperloopUPV-H8/template-project
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.43 KB
/
build.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
name: Build Project
on:
workflow_call:
inputs:
preset:
description: |
'CMake preset to build the project, run `cmake --build --list-presets' to see a complete list of options'
required: true
type: string
default: 'nucleo-debug'
outputs:
build-artifact:
description: 'Build result artifact id for later use'
value: ${{ jobs.build.outputs.build-artifact }}
workflow_dispatch:
inputs:
preset:
description: |
'CMake preset to build the project, run `cmake --build --list-presets' to see a complete list of options'
required: true
type: string
default: 'nucleo-debug'
jobs:
build:
name: Build Project
runs-on: ubuntu-24.04
outputs:
build-artifact: ${{ steps.upload-build-artifact.outputs.artifact-id }}
container:
image: jmaralo/hyperloop-upv-firmware:0.3.0
steps:
- name: Clone Project
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
cmake --preset ${{ inputs.preset }} .
cmake --build --preset ${{ inputs.preset }}
- name: Upload Build
id: upload-build-artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.preset }}
path: out/build/latest.elf
retention-days: 7
compression-level: 0
if-no-files-found: error