Skip to content

Commit 8d3fc93

Browse files
ci: lint full C++ surface via ci-linux-tidy preset (#59)
* ci: lint full C++ surface via ci-linux-tidy preset The clang-tidy gate used ci-linux-release-server, which (a) omits the diagram tool + examples from compile_commands, so changes there were silently un-linted despite the paths filter matching them, and (b) writes to build-server/, which the gate's -path build/<preset> never finds — so the gate had no compile DB at all. Add a dedicated ci-linux-tidy preset (tests + server + json + yaml + diagram + examples; fuzz stays clang-only) using the default build/<preset> dir, and point the caller at it with apt-packages: graphviz for the diagram tool's link deps. Re-pin clang-tidy-diff.yml to the SHA carrying the new apt-packages input. * test: temporary clang-tidy canary in diagram-tool (revert before merge) Deliberate bugprone-integer-division in a previously-uncovered diagram-tool file to prove the ci-linux-tidy gate (a) configures the grpc+graphviz feature union and (b) now lints diagram-tool C++. Reverted once the annotation is confirmed. * ci: pin clang-tidy gate to x64-linux to reuse the warm vcpkg cache The gate inherited the shared workflow's x64-linux-static triplet default, which has no warm binary cache in this repo, so configure rebuilt grpc from source and hit the 30-min job timeout. Pin to x64-linux (the repo's CI triplet) so the gate restores the server-enabled lane's cache — identical closure, no clobber risk. * Revert "test: temporary clang-tidy canary in diagram-tool" Canary validated: ci-linux-tidy configured the grpc+graphviz union, built the diagram tool, and the gate annotated tools/viz_core/format.cpp inline (advisory, green). Removing it leaves only the preset + caller change.
1 parent 2b291ca commit 8d3fc93

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

.github/workflows/clang-tidy.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,18 @@ permissions:
1919

2020
jobs:
2121
clang-tidy-diff:
22-
# ci-linux-release-server enables server + json + yaml (the broadest single
23-
# preset). The diagram-tool subdir (separate feature) is not covered here.
24-
uses: anolishq/.github/.github/workflows/clang-tidy-diff.yml@36dd130dddbff472be8fc5e1c1e575e528c83e1b # clang-tidy-diff
22+
# ci-linux-tidy is the max-coverage tidy preset: tests + server + json + yaml
23+
# + diagram-tool + examples, so compile_commands covers every shipped Linux
24+
# C++ target the paths filter matches (fuzz is clang/libFuzzer-only and stays
25+
# out of this g++ gate). The diagram tool links graphviz, hence apt-packages.
26+
# NB: it uses the default build/<preset> binaryDir — unlike ci-linux-release-
27+
# server (build-server/), which the gate's -path build/<preset> can't find.
28+
uses: anolishq/.github/.github/workflows/clang-tidy-diff.yml@bc822a0e1a1638789ecd912e3761283084fe914a # clang-tidy-diff
2529
with:
26-
configure-preset: ci-linux-release-server
30+
# x64-linux (not the gate's x64-linux-static default) so we reuse the warm
31+
# vcpkg cache the server-enabled CI lane writes — its closure (grpc+protobuf
32+
# +json+yaml+gtest) is exactly ci-linux-tidy's. With the static default the
33+
# configure step rebuilt grpc from source cold and hit the 30-min timeout.
34+
triplet: x64-linux
35+
configure-preset: ci-linux-tidy
36+
apt-packages: graphviz

CMakePresets.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@
121121
"FLUXGRAPH_YAML_ENABLED": "ON"
122122
}
123123
},
124+
{
125+
"name": "ci-linux-tidy",
126+
"inherits": "ci-linux-release-diagram",
127+
"cacheVariables": {
128+
"FLUXGRAPH_BUILD_SERVER": "ON",
129+
"FLUXGRAPH_YAML_ENABLED": "ON",
130+
"FLUXGRAPH_BUILD_EXAMPLES": "ON"
131+
}
132+
},
124133
{
125134
"name": "ci-tsan",
126135
"inherits": "ci-linux-release-server",
@@ -218,6 +227,10 @@
218227
"name": "ci-linux-release-server",
219228
"configurePreset": "ci-linux-release-server"
220229
},
230+
{
231+
"name": "ci-linux-tidy",
232+
"configurePreset": "ci-linux-tidy"
233+
},
221234
{
222235
"name": "ci-tsan",
223236
"configurePreset": "ci-tsan"

0 commit comments

Comments
 (0)