|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
1 | 18 | name: Build and test |
2 | 19 |
|
3 | 20 | on: |
@@ -158,22 +175,29 @@ jobs: |
158 | 175 | ./mvnw install -DskipTests |
159 | 176 | ./mvnw javadoc:javadoc |
160 | 177 |
|
161 | | - formatting-check: |
162 | | - name: "C++ format check" |
163 | | - runs-on: ubuntu-22.04 |
| 178 | + cpp-linter: |
| 179 | + runs-on: ubuntu-24.04 |
164 | 180 | steps: |
165 | | - - name: Checkout repository |
166 | | - uses: actions/checkout@v4 |
167 | | - - name: Run build |
| 181 | + - uses: actions/checkout@v4 |
| 182 | + - uses: cpp-linter/cpp-linter-action@v2.13.3 |
| 183 | + id: linter |
| 184 | + continue-on-error: true |
| 185 | + env: |
| 186 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 187 | + with: |
| 188 | + style: file |
| 189 | + tidy-checks: file |
| 190 | + files-changed-only: true |
| 191 | + lines-changed-only: true |
| 192 | + thread-comments: true |
| 193 | + ignore: 'build|cmake_modules|conan|dev|docker|examples|java|site' |
| 194 | + database: build/compile_commands.json |
| 195 | + extra-args: #-Wno-unused-parameter |
| 196 | + - name: Fail fast?! |
| 197 | + if: steps.linter.outputs.checks-failed != 0 |
168 | 198 | run: | |
169 | | - mkdir build |
170 | | - cd build |
171 | | - cmake .. -DBUILD_JAVA=OFF -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DSTOP_BUILD_ON_WARNING=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DBUILD_CPP_ENABLE_METRICS=1 |
172 | | - make |
173 | | - - name: Check clang-tidy |
174 | | - run: cd build && make check-clang-tidy |
175 | | - - name: Check clang-format |
176 | | - run: cd build && make check-format |
| 199 | + echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}" |
| 200 | + exit 1 |
177 | 201 |
|
178 | 202 | license-check: |
179 | 203 | name: "License Check" |
|
0 commit comments