|
32 | 32 | run: | |
33 | 33 | fdfind . -e .c -e .h -X clang-format-${{ env.clang-format-version }} --dry-run --Werror |
34 | 34 |
|
| 35 | + cmake-formatting-check: |
| 36 | + name: CMake Formatting Check |
| 37 | + runs-on: ubuntu-24.04 |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + - name: Install cmake-format and fd-find |
| 41 | + run: | |
| 42 | + sudo apt-get update |
| 43 | + sudo apt-get -y install cmake-format fd-find |
| 44 | + - name: Check cmake-format |
| 45 | + run: | |
| 46 | + fdfind . -e cmake . -X cmake-format '{}' --in-place --config-files .cmake-format.py |
| 47 | + fdfind CMakeLists.txt . -X cmake-format '{}' --in-place --config-files .cmake-format.py |
| 48 | + git --no-pager diff --exit-code |
| 49 | +
|
35 | 50 | # Run unittests on modern-ish versions of gcc and clang. |
36 | 51 | # ----------------------------------------------------------------------------------------------- |
37 | 52 | unittest: |
|
75 | 90 | # Build windows package, release artifact (MSVC) |
76 | 91 | # ----------------------------------------------------------------------------------------------- |
77 | 92 | build_msvc: |
78 | | - needs: [unittest, formatting-check] |
| 93 | + needs: [unittest, formatting-check, cmake-formatting-check] |
79 | 94 |
|
80 | 95 | name: Build windows-amd64 (MSVC) |
81 | 96 | runs-on: windows-latest |
@@ -157,7 +172,7 @@ jobs: |
157 | 172 | # Build ubuntu package, release artifact |
158 | 173 | # ----------------------------------------------------------------------------------------------- |
159 | 174 | build_ubuntu: |
160 | | - needs: [unittest, formatting-check] |
| 175 | + needs: [unittest, formatting-check, cmake-formatting-check] |
161 | 176 |
|
162 | 177 | name: Build ubuntu-latest |
163 | 178 | runs-on: ubuntu-latest |
@@ -237,7 +252,7 @@ jobs: |
237 | 252 | # Build macos package, release artifact |
238 | 253 | # ----------------------------------------------------------------------------------------------- |
239 | 254 | build_macos-arm: |
240 | | - needs: [unittest, formatting-check] |
| 255 | + needs: [unittest, formatting-check, cmake-formatting-check] |
241 | 256 |
|
242 | 257 | name: Build macos-14 |
243 | 258 | runs-on: macos-14 |
@@ -297,7 +312,7 @@ jobs: |
297 | 312 | # Build windows package, release artifact (mingw-w64) |
298 | 313 | # ----------------------------------------------------------------------------------------------- |
299 | 314 | build_windows: |
300 | | - needs: [unittest, formatting-check] |
| 315 | + needs: [unittest, formatting-check, cmake-formatting-check] |
301 | 316 |
|
302 | 317 | name: Build windows-amd64 (mingw-w64) |
303 | 318 | runs-on: ubuntu-latest |
|
0 commit comments