-
Notifications
You must be signed in to change notification settings - Fork 3
83 lines (70 loc) · 2.48 KB
/
common_function_lint.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
77
78
79
80
81
82
83
# This is a workflow to get source code and check the coding style using clang-format and cppcheck
name: CommonFunctionLints
on:
# # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow every time a commit is pushed to the repository
push:
branches:
- '**'
paths:
- 'F01_Common_Functions/**'
- '.github/workflows/common_function_lint.yml'
- '.github/workflows/taskRunner/common_functions/runCpplint.sh'
- '.github/workflows/taskRunner/common_functions/runCppcheck.sh'
- '.github/workflows/taskRunner/common_functions/runGoogleStyleCheck.sh'
# Allows you to run this workflow every time a pull request is opened or updated
pull_request:
branches:
- '**'
jobs:
# Job
Cpplint:
# environment
runs-on: ubuntu-latest
steps:
# step to checkout the source code
- name: Checkout source code
uses: actions/checkout@main
# step to install tools
- name: Install Cpplint
run: pip install cpplint
# Step to check tool versions
- name: Tool Versions
run: |
cpplint --version
# step to run cpplint
- name: Run Cpplint
run: |
chmod +x .github/workflows/taskRunner/common_functions/runCpplint.sh
.github/workflows/taskRunner/common_functions/runCpplint.sh
# Job
Cppcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@main
- name: Install Cppcheck
run: sudo apt-get install -y cppcheck
- name: Tool Versions
run: |
cppcheck --version
- name: Run Cppcheck
run: |
chmod +x .github/workflows/taskRunner/common_functions/runCppcheck.sh
.github/workflows/taskRunner/common_functions/runCppcheck.sh
# Job
GoogleStyleCheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Install clang-format
run: sudo apt-get install clang-format
- name: Tool Versions
run: |
clang-format --version
# - name: Run clang-format google style check
# run: |
# chmod +x .github/workflows/taskRunner/common_functions/runGoogleStyleCheck.sh
# .github/workflows/taskRunner/common_functions/runGoogleStyleCheck.sh