|
11 | 11 | jobs: |
12 | 12 | c-format-check: |
13 | 13 | name: Check C Source Code Formatting |
14 | | - runs-on: 'ubuntu-latest' |
| 14 | + runs-on: "ubuntu-latest" |
15 | 15 | steps: |
16 | 16 | - uses: actions/checkout@v4 |
17 | 17 | - name: Check Source Format |
18 | 18 | run: | |
19 | 19 | clang-format -i -style=file {base,boreas,gmp,osp,util}/*.{c,h} |
20 | 20 | git diff --exit-code |
21 | 21 |
|
| 22 | + cmake-format-check: |
| 23 | + name: Check CMake Formatting |
| 24 | + runs-on: "ubuntu-latest" |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + - uses: greenbone/actions/uv@v3 |
| 28 | + with: |
| 29 | + install: gersemi |
| 30 | + - name: Check CMake Format |
| 31 | + id: check |
| 32 | + run: | |
| 33 | + gersemi --check . cmake |
| 34 | + - name: Report Diff |
| 35 | + if: ${{ failure() && steps.check.outcome == 'failure' }} |
| 36 | + run: | |
| 37 | + echo "## CMake Format Check" >> $GITHUB_STEP_SUMMARY |
| 38 | + gersemi --check --no-warn-about-unknown-commands . cmake >> $GITHUB_STEP_SUMMARY 2>&1 || true |
| 39 | + echo "## CMake Format Diff" >> $GITHUB_STEP_SUMMARY |
| 40 | + echo '```diff' >> $GITHUB_STEP_SUMMARY |
| 41 | + gersemi --diff . cmake >> $GITHUB_STEP_SUMMARY |
| 42 | + echo '```' >> $GITHUB_STEP_SUMMARY |
| 43 | +
|
22 | 44 | tests: |
23 | 45 | name: Unit Tests |
24 | | - runs-on: 'ubuntu-latest' |
| 46 | + runs-on: "ubuntu-latest" |
25 | 47 | container: debian:stable-slim |
26 | 48 | steps: |
27 | 49 | - name: Install git for Codecov uploader |
|
51 | 73 |
|
52 | 74 | scan-build: |
53 | 75 | name: Scan-build gvm-libs with clang |
54 | | - runs-on: 'ubuntu-latest' |
| 76 | + runs-on: "ubuntu-latest" |
55 | 77 | container: debian:stable-slim |
56 | 78 | steps: |
57 | 79 | - uses: actions/checkout@v4 |
|
0 commit comments