forked from ssl-core/ssl-core
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.34 KB
/
common-cpp-build-run-tests-and-install.yaml
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
name: "Common C++ Library: Build, Run Tests and Install"
on:
pull_request:
paths: ["common/cpp/**"]
push:
branches:
- main
paths: ["common/cpp/**"]
workflow_dispatch:
jobs:
build_run_tests_and_install:
runs-on: ubuntu-latest
strategy:
matrix:
cpp:
[
{
container: ssl-core-cpp-mbed-base,
compiler: arm-none-eabi-g++,
flags: "-DCMAKE_CXX_FLAGS='--specs=nosys.specs'",
},
{ container: ssl-core-cpp-base, compiler: clang++, flags: "" },
{ container: ssl-core-cpp-base, compiler: g++, flags: "" },
]
container: robocin/${{matrix.cpp.container}}:latest
steps:
- uses: actions/checkout@v4
- shell: bash
run: ${{ matrix.cpp.compiler }} --version
- working-directory: common/cpp
shell: bash
run: |
set -e
cmake -B build \
-S . \
-G Ninja \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp.compiler }} \
${{ matrix.cpp.flags }}
cmake --build build
- working-directory: common/cpp
shell: bash
run: |
set -e
ctest --test-dir build
- working-directory: common/cpp
shell: bash
run: |
set -e
cmake --install build