-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.29 KB
/
ci.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
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
compiler: [gcc]
include:
- build_type: Debug
compiler: clang
steps:
- uses: actions/checkout@v4
- run: echo "::add-matcher::.github/workflows/gcc_matcher.json"
- uses: carlosperate/arm-none-eabi-gcc-action@v1
- run: pip install elf-size-analyze
- if: matrix.compiler == 'clang'
run: sudo apt-get update && sudo apt-get install llvm
- uses: actions/cache@v3
with:
path: target/_deps
key: v1/${{github.workflow}}/${{runner.os}}/cmake/${{matrix.compiler}}/${{matrix.build_type}}
- run: |
cmake -B 'target/${{matrix.build_type}}' \
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' \
-DDEPENDENCIES_DIR='target/_deps' \
-DUPLOAD_TOOL=OFF \
-DCMAKE_COLOR_DIAGNOSTICS=ON \
-DCMAKE_TOOLCHAIN_FILE='cmake/arm_${{matrix.compiler}}_toolchain.cmake'
- run: cmake --build 'target/${{matrix.build_type}}' --config '${{matrix.build_type}}' --parallel "$(nproc)"
- run: elf-size-analyze --rom --ram 'target/${{matrix.build_type}}/firmware.elf'