Skip to content

Commit b61231d

Browse files
ci: promote clang-tidy diff gate to blocking, fold into ok (#73)
1 parent d7750db commit b61231d

2 files changed

Lines changed: 35 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
pull-requests: read
1919
outputs:
2020
code: ${{ steps.filter.outputs.code }}
21+
cpp: ${{ steps.cppfilter.outputs.cpp }}
2122
steps:
2223
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2324
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
@@ -28,6 +29,22 @@ jobs:
2829
code:
2930
- '**'
3031
- '!**/*.md'
32+
# Separate OR-filter (default quantifier) for the C++ sources the clang-tidy
33+
# gate lints, so it skips (and the ok gate stays green) on non-C++ PRs.
34+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
35+
id: cppfilter
36+
with:
37+
filters: |
38+
cpp:
39+
- '**/*.c'
40+
- '**/*.cc'
41+
- '**/*.cpp'
42+
- '**/*.cxx'
43+
- '**/*.h'
44+
- '**/*.hh'
45+
- '**/*.hpp'
46+
- '**/*.hxx'
47+
- '.clang-tidy'
3148
3249
python-lint:
3350
name: Python Linting (ruff)
@@ -320,10 +337,27 @@ jobs:
320337
- name: Check formatting
321338
run: git ls-files '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | xargs clang-format --dry-run --Werror
322339

340+
clang-tidy:
341+
name: Clang-Tidy (changed lines)
342+
needs: [changes]
343+
if: needs.changes.outputs.cpp == 'true'
344+
permissions:
345+
contents: read
346+
uses: anolishq/.github/.github/workflows/clang-tidy-diff.yml@9869a5f4bee7da9c7c1dc9bae033cd0137c4801d # clang-tidy-diff
347+
with:
348+
# x64-linux (not the gate's x64-linux-static default) so we reuse the warm
349+
# vcpkg cache the server-enabled CI lane writes — its closure (grpc+protobuf
350+
# +json+yaml+gtest) is exactly ci-linux-tidy's. With the static default the
351+
# configure step rebuilt grpc from source cold and hit the 30-min timeout.
352+
triplet: x64-linux
353+
configure-preset: ci-linux-tidy
354+
apt-packages: graphviz
355+
blocking: true
356+
323357
ok:
324358
name: ok
325359
if: always()
326-
needs: [changes, python-lint, python-typecheck, linux-matrix, strict-dimensional-validation, windows-core, windows-diagram, diagram-render-smoke, version-sync, cpp-format]
360+
needs: [changes, python-lint, python-typecheck, linux-matrix, strict-dimensional-validation, windows-core, windows-diagram, diagram-render-smoke, version-sync, cpp-format, clang-tidy]
327361
runs-on: ubuntu-24.04
328362
timeout-minutes: 5
329363
steps:

.github/workflows/clang-tidy.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)