We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2bee5b commit 5b241e0Copy full SHA for 5b241e0
.github/workflows/ci.yml
@@ -99,6 +99,25 @@ jobs:
99
100
steps:
101
- uses: actions/checkout@v4
102
+ with:
103
+ fetch-depth: 2
104
+
105
+ - name: Check CMake files format
106
+ if: github.event_name == 'pull_request'
107
+ run: |
108
+ LIST_CHECK_FILES=$(git diff --name-only --diff-filter=d HEAD^1 HEAD | grep -E 'CMakeLists.txt$' | tr '\n' ' ')
109
110
+ echo "Changed files:"
111
+ echo "$LIST_CHECK_FILES"
112
+ if [[ -n ${LIST_CHECK_FILES} ]]
113
+ then
114
+ pip install cmake-format
115
+ for FILE in $LIST_CHECK_FILES; do
116
+ cmake-format --check $FILE
117
+ done
118
+ else
119
+ echo "Nothing to check with cmake-format"
120
+ fi
121
122
- name: Restore cached directories
123
id: restore-cache
0 commit comments