-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 975 Bytes
/
code-analysis.yml
File metadata and controls
44 lines (35 loc) · 975 Bytes
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
name: Code Analysis
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
permissions:
contents: read
env:
DEBIAN_FRONTEND: noninteractive
TZ: Europe/Oslo
jobs:
code_analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential \
cmake libyaml-dev cppcheck clang-tidy
- name: Run CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DSCONF_ENABLE_CLANG_TIDY=on \
-DSCONF_ENABLE_CPPCHECK=on -Werror=dev
- name: Build code
run: cmake --build build
- name: Run Clang-Tidy
run: cmake --build build --target check-clang-tidy
- name: Run Cppcheck
run: cmake --build build --target check-cppcheck