Skip to content

Commit 697a5ba

Browse files
authored
add format ci (#65)
1 parent 48c3fbb commit 697a5ba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ jobs:
2121
run: |
2222
bazel test //...
2323
24+
format:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v1
28+
- name: Setup clang-format
29+
run: |
30+
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
31+
tar -xvf clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
32+
sudo mv ./clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-format /usr/local/bin
33+
rm -rf clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04/
34+
git clone https://github.com/Sarcasm/run-clang-format.git
35+
- name: Run clang-format
36+
run: find ./ -iname "*.h" -o -iname "*.cc" | xargs ./run-clang-format/run-clang-format.py
37+
2438
e2e-cpp:
2539
runs-on: ubuntu-latest
2640
steps:

0 commit comments

Comments
 (0)