From 7733f4c1363823a5d38dbe156d313b559088acf3 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 14 Mar 2026 13:51:29 -0700 Subject: [PATCH] Add cmake-format job --- .github/workflows/lint.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a4ff460..87900ac9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,12 +5,14 @@ on: paths: - '**.h' - '**.cc' + - '**.cmake' + - '**/CMakeLists.txt' permissions: contents: read jobs: - format_code: + clang-format: runs-on: ubuntu-latest steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -26,3 +28,17 @@ jobs: find include src -name '*.h' -o -name '*.cc' | \ xargs clang-format-21 -i -style=file -fallback-style=none git diff --exit-code + + cmake-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + + - name: Install cmake-format + run: pip install cmakelang + + - name: Run cmake-format + run: | + find . -name CMakeLists.txt -o -name '*.cmake' | \ + xargs cmake-format -i + git diff --exit-code