Skip to content

Commit 98033f1

Browse files
Add C++ CI workflow for linting and checking
1 parent 3a5533d commit 98033f1

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/cpp-ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: C++ CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint-and-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Run clang-format check
16+
uses: jidicula/clang-format-action@v4.11.0
17+
with:
18+
clang-format-version: '15'
19+
check-path: 'src'
20+
21+
- name: Install cppcheck
22+
run: sudo apt-get update && sudo apt-get install -y cppcheck
23+
24+
- name: Run cppcheck
25+
run: |
26+
cppcheck --enable=all --error-exitcode=1 --suppress=missingIncludeSystem src/ include/

0 commit comments

Comments
 (0)