-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 1.81 KB
/
static_analysis.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
70
71
72
73
74
75
76
---
name: static_analysis
'on':
workflow_dispatch:
push:
branches:
- master
pull_request:
env:
build_path: ${{github.workspace}}/build
jobs:
static_analysis_build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
compiler:
- clang++
clang_tidy:
- clang-tidy
build_type:
- Release
- Debug
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install static analysis tools
run: |
sudo apt-get install ${{matrix.clang_tidy}}
sudo apt-get install cppcheck
- name: Install boost
run: |
sudo apt-get update
sudo apt-get install libboost-all-dev
- name: Display boost version
run: |
dpkg -s libboost-dev | grep Version
- name: Create Build Environment
run: cmake -E make_directory ${{env.build_path}}
- name: Display versions
run: |
${{matrix.compiler}} --version
cmake --version
cppcheck --version
${{matrix.clang_tidy}} --version
- name: Configure CMake
working-directory: ${{env.build_path}}
run: >
cmake ../
-D CMAKE_BUILD_TYPE=${{matrix.build_type}}
-D CMAKE_CXX_COMPILER=${{matrix.compiler}}
-D ENABLE_CLANG_TIDY=ON -D CLANG_TIDY_NAME=${{matrix.clang_tidy}}
-D ENABLE_CPPCHECK=ON
-D ENABLE_BOOST_TESTS=ON -D ENABLE_TESTING=ON
- name: Build with ${{matrix.clang_tidy}} and cppcheck
working-directory: ${{env.build_path}}
run: |
cmake --build . --config ${{matrix.build_type}}
- name: Test
working-directory: ${{env.build_path}}
run: ctest -C ${{matrix.build_type}}
...