From b2841d027838e21557bd16e4bfd5431d5d31893a Mon Sep 17 00:00:00 2001 From: Rafal Rudnicki Date: Wed, 22 Jul 2026 11:36:08 +0000 Subject: [PATCH] Add fmt check for rust and cpp files --- .github/workflows/basic.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 236d86d..713fa58 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -54,7 +54,20 @@ jobs: printenv | grep -E '^(PATH|LD_LIBRARY_PATH|LIBRARY_PATH|CPATH|C_INCLUDE_PATH|CPLUS_INCLUDE_PATH)=' >> $GITHUB_ENV icx --version sycl-ls --verbose - + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Install clang-format + run: | + sudo apt-get update + sudo apt-get install --yes clang-format + + - name: Check C++ formatting + run: | + git ls-files -z -- ':(glob)**/*.cpp' ':(glob)**/*.hpp' ':(glob)**/*.h' \ + | xargs -0 --no-run-if-empty clang-format --dry-run --Werror + - name: Build run: cargo build --verbose