-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (64 loc) · 2.1 KB
/
static_analysis.yml
File metadata and controls
68 lines (64 loc) · 2.1 KB
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
name: Static Analysis
on: [ push ]
jobs:
Clang-Tidy:
runs-on: ubuntu-latest
env:
CC: avr-gcc
CXX: avr-g++
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Clang-Tidy
run: |
sudo apt-get update
sudo apt-get install -y clang-tidy avr-libc binutils-avr gcc-avr protobuf-compiler python3-protobuf
- name: Set up Build
run: |
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --target FlightController.hex
cp build/compile_commands.json .
- name: Run Clang Tidy
run: run-clang-tidy -j$(nproc) -quiet | tee clangtidy.log
- name: Check Clang Tidy Result
run: if grep "error" clangtidy.log; then exit 1; fi;
Clang-Format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-tools python3
wget 'https://github.com/Sarcasm/run-clang-format/raw/39081c9c42768ab5e8321127a7494ad1647c6a2f/run-clang-format.py'
- name: Run Clang-Format
run: python3 run-clang-format.py --recursive --exclude ./build --color always .
Check-Doxygen-Without-External:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
- name: Prepare Doxyfile
run: sed -i "s/WARN_AS_ERROR\s*=\s*NO/WARN_AS_ERROR = YES/g" Doxyfile
- name: Run doxygen
run: doxygen
Check-Doxygen-With-External:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
- name: Prepare Doxyfile
run: sed -i "s/WARN_AS_ERROR\s*=\s*NO/WARN_AS_ERROR = YES/g" Doxyfile
- name: Run doxygen
run: doxygen