-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.53 KB
/
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
name: analysis
on:
pull_request:
branches:
- master
jobs:
code_style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2-beta
with:
fetch-depth: 1
- uses: actions/cache@v1
name: Setup pip cache
id: analysis-tools-pip-cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Setup Python
uses: actions/setup-python@v1
with:
version: 3.x
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run CMake Coding Style Check
run: |
cmake-format --version
cmake-format -i $(find ./cmake -name '*.cmake')
cmake-format -i $(find . -name CMakeLists.txt)
git diff --exit-code
- name: Run Cpplint Check
if: always()
run: cpplint --counting=detailed --recursive src include
- name: Run C++ Coding Style Check
if: always()
run: |
clang-format --version
clang-format -i $(find ./src -name '*.cpp')
clang-format -i $(find ./src -name '*.hpp')
clang-format -i $(find ./include -name '*.cpp')
clang-format -i $(find ./include -name '*.hpp')
git diff --exit-code
- name: Run Shell Check
if: always()
run: shellcheck tests/*.sh