Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/cmake-lint.yml
Original file line number Diff line number Diff line change
@@ -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
Loading