Skip to content

Commit b2841d0

Browse files
committed
Add fmt check for rust and cpp files
1 parent 6cb149b commit b2841d0

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/basic.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,20 @@ jobs:
5454
printenv | grep -E '^(PATH|LD_LIBRARY_PATH|LIBRARY_PATH|CPATH|C_INCLUDE_PATH|CPLUS_INCLUDE_PATH)=' >> $GITHUB_ENV
5555
icx --version
5656
sycl-ls --verbose
57-
57+
58+
- name: Check formatting
59+
run: cargo fmt --all -- --check
60+
61+
- name: Install clang-format
62+
run: |
63+
sudo apt-get update
64+
sudo apt-get install --yes clang-format
65+
66+
- name: Check C++ formatting
67+
run: |
68+
git ls-files -z -- ':(glob)**/*.cpp' ':(glob)**/*.hpp' ':(glob)**/*.h' \
69+
| xargs -0 --no-run-if-empty clang-format --dry-run --Werror
70+
5871
- name: Build
5972
run: cargo build --verbose
6073

0 commit comments

Comments
 (0)