File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Lint
2
+ on : [workflow_dispatch, pull_request]
3
+ env :
4
+ TERM : xterm-256color
5
+ CLANG_VERSION : 19
6
+
7
+ jobs :
8
+ clang-format :
9
+ name : Clang-Format
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Install clang-format
13
+ run : |
14
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
15
+ UBCN=$(lsb_release --short --codename)
16
+ sudo add-apt-repository "deb https://apt.llvm.org/${UBCN}/ llvm-toolchain-${UBCN}-${CLANG_VERSION} main"
17
+ sudo apt update || true
18
+ sudo apt install -y clang-format-${CLANG_VERSION}
19
+
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v4
22
+ with :
23
+ fetch-depth : 0
24
+ lfs : true
25
+
26
+ - name : Run clang-format
27
+ run : |
28
+ if ! git clang-format-${CLANG_VERSION} --binary=clang-format-${CLANG_VERSION} --diff --commit=origin/dev
29
+ then
30
+ echo -e "\033[1;31mCode style does not match clang-format"
31
+ exit 1
32
+ fi
You can’t perform that action at this time.
0 commit comments