Skip to content

Commit 716c23d

Browse files
committed
Check C++ formatting in CI
1 parent f262bae commit 716c23d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/build-ton-linux-x86-64-werror.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Ubuntu TON -Werror build (shared, x86-64)
1+
name: Lint
22

33
on: [push, pull_request, workflow_dispatch, workflow_call]
44

55
jobs:
6-
build:
6+
lint:
77
runs-on: ubuntu-24.04
88

99
steps:
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
wget https://apt.llvm.org/llvm.sh
2929
chmod +x llvm.sh
30-
sudo ./llvm.sh 21 clang
30+
sudo ./llvm.sh 21 all
3131
3232
# TODO: Preserve ccache cache between runs once we get rid of warning suppression mappings.
3333

@@ -41,3 +41,9 @@ jobs:
4141
-DTON_USE_LLD=On \
4242
-DTON_WERROR_BUILD=On
4343
ninja -C build
44+
45+
- name: Check C++ formatting
46+
run: |
47+
# TODO: Run clang-format only on changed files.
48+
clang-format-21 -i $(git ls-files '*.h' '*.hpp' '*.cpp' ':!^example/android/third_party' ':!^tolk/')
49+
git diff --exit-code

0 commit comments

Comments
 (0)