Skip to content

Commit f137d2a

Browse files
committed
Add check format to the ci
1 parent b2bee5b commit f137d2a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ jobs:
189189
run: |
190190
sudo apt install -y gdb python3-pytest
191191
192+
- name: Install cmake-format
193+
run: |
194+
pip install cmake-format
195+
196+
- name: Check CMake files format
197+
run: |
198+
LIST_CHECK_FILES=$(git diff --name-only --diff-filter=d HEAD~1 | grep -E 'CMakeLists.txt$' | tr '\n' ' ')
199+
for FILE in $LIST_CHECK_FILES; do
200+
cmake-format --check $FILE
201+
done
202+
192203
- name: Run cmake
193204
run: |
194205
cmake -S . -B build_debug ${{matrix.cmake-flags}}

0 commit comments

Comments
 (0)