From c3560ff845e5c03400a4beadf4c47e12465a007b Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Mon, 23 Jun 2025 18:42:26 +0200 Subject: [PATCH] Fix cmake lint workflow --- .github/workflows/cmake-lint.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cmake-lint.yml diff --git a/.github/workflows/cmake-lint.yml b/.github/workflows/cmake-lint.yml new file mode 100644 index 000000000..cd2029066 --- /dev/null +++ b/.github/workflows/cmake-lint.yml @@ -0,0 +1,26 @@ +name: CMake Lint + +on: + pull_request: + paths: + - "**/CMakeLists.txt" + - "**/*.cmake" + push: + paths: + - "**/CMakeLists.txt" + - "**/*.cmake" + workflow_dispatch: + +jobs: + cmake-lint: + name: Check CMake formatting + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install cmake-format + run: python3 -m pip install cmakelang + - name: Run cmake-format + run: | + files=$(git ls-files '**/CMakeLists.txt' 'cmake/*.cmake') + cmake-format --check $files