-
Notifications
You must be signed in to change notification settings - Fork 906
43 lines (35 loc) · 934 Bytes
/
cpp.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
name: C++ SDK
on:
push:
paths:
- 'src/cc/flwr/**'
pull_request:
paths:
- 'src/cc/flwr/**'
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-format cmake g++ clang-tidy cppcheck
- name: Check Formatting
run: |
find src/cc/flwr -name '*.cpp' -or -name '*.h' | xargs clang-format -i
git diff --exit-code
# - name: Build
# run: |
# mkdir build
# cd build
# cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../src/cc/flwr
# make
- name: Run clang-tidy
run: |
find src/cc/flwr -name '*.cpp' | xargs clang-tidy
- name: Run cppcheck
run: |
cppcheck --enable=all --suppress=missingIncludeSystem src/cc/flwr/