ci: move gcc forward with the rest of the toolchain, and record it (ADR-1230) - #1395
Draft
lusoris wants to merge 1 commit into
Draft
ci: move gcc forward with the rest of the toolchain, and record it (ADR-1230)#1395lusoris wants to merge 1 commit into
lusoris wants to merge 1 commit into
Conversation
The clang-tidy lanes install three toolchain components and treated them inconsistently. clang comes from apt.llvm.org at 22 because ubuntu-24.04 ships 18, which cannot parse the tree's C++26. meson comes from PyPI because the distro's 1.3.2 predates `c23` in c_std. gcc was left at the image's gcc-14, with no rationale in the workflow and no ADR pinning it -- the only mention of gcc-14 in docs/adr/ is an incidental line in a VVenC changelog summary. That stopped being cosmetic on PR #1392. The ratchet reported test_pooling_percentile.c going 0 -> 1 while Tidy Changed -- which fails on ANY warning and does not exclude that file -- called the same file clean, on the same runner and commit. It could not be reproduced on gcc-15 or gcc-16. The cause is structural: clang-tidy parses each TU against the system headers the C compiler provides, so a ratchet count depends on gcc's version as much as on clang-tidy's, and the baseline recorded only clang_tidy_version. Pinning gcc a major behind every developer's box while recording nothing about it makes a disagreement unexplainable. Three changes: - the lanes install gcc-15/g++-15 from ppa:ubuntu-toolchain-r/test; - the ratchet records cc_version, read from the build directory's meson-info/intro-compilers.json so it is the compiler that actually produced compile_commands.json, and annotates a mismatch like it already does for clang-tidy; - the --report artifact keeps every diagnostic as `path:line:col: [check]`. parse_diagnostics() already produced them and the script discarded all but the count. The baseline stays counts-only so it remains reviewable and does not churn on line-number shifts. Verified locally: the report now carries `cc (GCC) 16.2.1 20260810` and 29 diagnostics for output.cpp, naming check and location. This requires a CI-side regeneration of tidy-baseline-cpu.json -- counts under gcc-15's headers will not equal gcc-14's, and a local --write would resolve enable_dnn=auto differently and rebaseline unrelated files against the wrong build. libvmaf-build-matrix.yml still pins gcc-14; moving it surfaces its own crop of warnings across ten-plus legs and belongs in its own PR. Refs: ADR-1230 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
ci/modern-gcc-toolchain
branch
from
September 7, 2026 16:19
86dffa8 to
fc9a14c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The clang-tidy lanes install three toolchain components and treated them
inconsistently:
ubuntu-24.04shipsapt.llvm.orgc23inc_stdTwo of three are deliberately pulled past the distro because the tree targets
C23/C++26 (ADR-0692). gcc was left at whatever the runner image shipped. No ADR
pins it — the only
gcc-14mention indocs/adr/is an incidental line in aVVenC changelog summary.
This stopped being cosmetic on #1392
The ratchet reported
test_pooling_percentile.c: warnings 0 -> 1 (+1)whileTidy Changedcalled the same file clean — same runner, same commit, andthat file is not in its exclusion list. It could not be reproduced on gcc-15 or
gcc-16; on both, the only warning was a glibc system-header diagnostic the
ratchet correctly discards.
The cause is structural: clang-tidy parses each TU against the system headers
the C compiler provides, so a ratchet count depends on gcc's version as much
as on clang-tidy's — and the baseline recorded only
clang_tidy_version.Pinning gcc a major behind every developer's machine while recording nothing
about it makes such a disagreement unexplainable.
The report artifact made it worse:
parse_diagnostics()already produces everydiagnostic and the script threw all but the count away, so "which warning?"
had no answer anywhere in CI's output.
Three changes
ppa:ubuntu-toolchain-r/teston the clang-tidylanes — the same treatment clang and meson already get.
cc_version, read from the build directory'smeson-info/intro-compilers.jsonso it's the compiler that actuallyproduced
compile_commands.json, and annotates a mismatch exactly as aclang-tidy mismatch already did.
--reportartifact keeps every diagnostic aspath:line:col: [check]. The baseline stays counts-only so it remainsreviewable and doesn't churn on line-number shifts.
Reproducer / smoke-test command
meson setup core/build core -Denable_cuda=false -Denable_sycl=false -Db_lto=false ninja -C core/build python3 scripts/ci/tidy-ratchet.py --lane cpu --build-dir core/build \ --only core/src/output.cpp --report /tmp/r.json python3 -c "import json;d=json.load(open('/tmp/r.json'));print(d['cc_version']);print(len(d['diagnostics']),'diagnostics');print(d['diagnostics'][:3])"Locally that prints
cc (GCC) 16.2.1 20260810and 29 diagnostics naming checkand location — the information #1392 needed and could not get.
Counts under gcc-15's headers will not equal gcc-14's, so
scripts/ci/tidy-baseline-cpu.jsonis stale the moment this merges. It must berewritten from a CI run, never from a developer machine — a local
--writeresolves
enable_dnn=autodifferently and would rebaseline unrelated filesagainst the wrong build. Expect this PR's own Tidy Ratchet to fail until that
happens; that failure is the point.
cc_versionis optional on read, so the existing baseline loads unchanged andsimply doesn't trigger the mismatch warning until regenerated.
Deliberately out of scope
libvmaf-build-matrix.ymlstill pinsgcc-14across its legs. Bumping theproduct build's compiler surfaces its own crop of new warnings across ten-plus
matrix legs and belongs in a PR whose CI failures are about exactly that.
Deep-dive deliverables (ADR-0108)
## Context, and its evidence is feat(core): add percentile pooling methods (median, perc5, perc10, perc20) (ADR-1181) #1392's own CI output.## Alternatives considered(five options, including the ubuntu-26.04 runner and baselining diagnostics).AGENTS.mdinvariant note — no rebase-sensitive invariants.changelog.d/changed/1230-modern-gcc-toolchain.md,CHANGELOG.mdregenerated.State (rule 13)
no state delta: CI toolchain configuration, no product bug opened or closed.
🤖 Generated with Claude Code