Skip to content

Commit 6ac8605

Browse files
committed
Add clang-format job
Change-Id: I325a3843e9b35eb92d911d3f8c6ed55976962950
1 parent 42995cb commit 6ac8605

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: .github/workflows/main.yml

+15
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,21 @@ jobs:
130130
- name: Print ccache stats
131131
run: docker-compose run ${{ matrix.config.image }} ccache -s
132132

133+
clang-format:
134+
name: Check Style
135+
runs-on: macos-13
136+
timeout-minutes: 60
137+
strategy:
138+
fail-fast: false
139+
steps:
140+
- uses: actions/checkout@v1
141+
- name: Run clang-format
142+
run: |
143+
git diff -U0 --no-color --relative HEAD^ | $(brew --prefix llvm@15)/share/clang/clang-format-diff.py -i -p1 -regex ".*\.(cxx|cpp|hpp|h)" -v
144+
- name: Check diff
145+
run: git diff --exit-code
146+
147+
133148
build-macos:
134149
name: Build on macOS
135150
runs-on: macos-11

0 commit comments

Comments
 (0)