-
Notifications
You must be signed in to change notification settings - Fork 38
42 lines (35 loc) · 1.1 KB
/
coding-styles.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
name: "Coding Style"
on:
push:
branches: [ main, ci-sandbox ]
pull_request:
branches: [ '**' ]
jobs:
clang-format:
name: "clang-format"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
sudo apt-get install -y clang-format clang-tidy
- name: Run clang-format
run:
python3 run-clang-format.py --style file -r src wasm bindings/python
- name: Prepare build, compilation database etc.
run: |
mkdir -p build
cd build
cmake \
-DUSE_WASM_COMPATIBLE_SOURCE=off -DCMAKE_EXPORT_COMPILE_COMMANDS=on \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
..
- name: Run clang-tidy
run: |
run-clang-tidy -p build "$PWD/src/.*"
run-clang-tidy -p build "$PWD/app/.*"