Skip to content

ENH: Add a warnings-only Doxygen CI check#6434

Merged
hjmjohnson merged 9 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:add-doxygen-warnings-gha
Jun 11, 2026
Merged

ENH: Add a warnings-only Doxygen CI check#6434
hjmjohnson merged 9 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:add-doxygen-warnings-gha

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Jun 11, 2026

Copy link
Copy Markdown
Member

Add a per-PR doxygen-warnings GitHub Actions check built on a new ITK_DOXYGEN_WARNINGS_ONLY CMake mode: pixi run doxygen-ci configures with the mode on and builds the existing Documentation target, which now fails on any Doxygen warning. Closes the gap where Doxygen regressions are only caught by the post-merge Linux-Ubuntu-GCC-Doxygen nightly.

Design
  • ITK_DOXYGEN_WARNINGS_ONLY (CMake, advanced): disables all output formats and implicit graph classes (explicit \dot still renders), sets WARN_AS_ERROR=FAIL_ON_WARNINGS and a fixed warning log at <build>/doxygen-warnings.log. Single-sourced so the nightly dashboard and local builds can reuse the same mode.
  • Bug fix en route: the Examples.dox custom command had no consumer — the Documentation target never generated it. Now wired via an ITKDoxygenExamplesDox target.
  • pixi: doxygen feature/environment (doxygen, perl, bibtex via linux-only texlive-core, graphviz) and two tasks; manual runs on macOS/Windows resolve perl+graphviz from conda-forge and need bibtex from a system TeX distribution.
  • Workflow: always runs on PRs (no paths filter, so it can become a required check safely), caches build-doxygen, uploads the warning log and effective Doxyfile on failure.
Measurements and validation
  • Warnings-only Doxygen: ~64 s, 1.8 GB peak RSS; full task from clean tree 1:43 local; first CI run measured 5 m 29 s wall (before caching).
  • Self-validated: the workflow ran on this PR — the initial run correctly failed on the missing cite/dot toolchain (460 + 120 warnings), and passed after the fixes with an empty warning log.
  • pixi.lock regenerated with pixi 0.70.2.

@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation area:Documentation Issues affecting the Documentation module labels Jun 11, 2026
@hjmjohnson hjmjohnson force-pushed the add-doxygen-warnings-gha branch from 605a92d to 3fc08bd Compare June 11, 2026 15:03
@hjmjohnson

Copy link
Copy Markdown
Member Author

@greptileai review this draft before I make it official

@greptile-apps

This comment was marked as resolved.

Comment thread pyproject.toml
Comment thread Utilities/Doxygen/CMakeLists.txt
@hjmjohnson hjmjohnson force-pushed the add-doxygen-warnings-gha branch 3 times, most recently from cce2ff9 to d535a3d Compare June 11, 2026 15:27
@hjmjohnson hjmjohnson marked this pull request as ready for review June 11, 2026 16:13

@dzenanz dzenanz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a glance.

Comment thread .github/workflows/doxygen.yml Outdated
The pixi doxygen-ci task configures with ITK_BUILD_DOCUMENTATION=ON,
regenerates Examples.dox, and runs Doxygen with WARN_AS_ERROR set and
HTML/LaTeX/dot generation disabled (under two minutes end to end).
The workflow gates pull requests, complementing the post-merge
Linux-Ubuntu-GCC-Doxygen nightly that tracks these warnings today.
Doxygen shells out to perl and bibtex for \cite resolution and to dot
for explicit \dot graphs; the bare runner lacked all three, turning
every citation into a 'no associated number' warning.
HAVE_DOT=NO made every module dependency page warn 'ignoring \dot
command'; disable only the implicit graph classes instead.
Remote-module fetches and ExternalData downloads are irrelevant to a
documentation-only configure; ITK_FORBID_DOWNLOADS keeps the runner
hermetic and the warning scan free of cloned checkouts.
The custom command producing Examples.dox had no consumer, so the
Documentation target ran Doxygen against a missing or stale examples
page unless the file was generated by hand.
Single-sources the warnings-as-errors Doxyfile at configure time so
CI, the nightly dashboard, and local builds share one override set:
no output formats, implicit graphs disabled (explicit \dot still
renders), WARN_AS_ERROR=FAIL_ON_WARNINGS, and a fixed warning log at
<build>/doxygen-warnings.log. The HTML logo copy is skipped when no
HTML is generated.
The doxygen-ci task now builds the Documentation target; the override
set lives in the CMake layer instead of an appended Doxyfile copy.
Dropping the configure task's outputs declaration makes pixi rerun
the configure after pyproject or CMake edits rather than reusing a
stale Doxyfile.
perl and graphviz resolve everywhere; bibtex must come from a system
TeX distribution on macOS and Windows since conda-forge texlive-core
is linux-only.
Dropping the pull_request paths filter lets the check become a
required status without stranding filtered PRs. The build-doxygen
cache trims the configure cost, and failures now also upload the
effective Doxyfile alongside the warning log.
@hjmjohnson hjmjohnson force-pushed the add-doxygen-warnings-gha branch from d535a3d to 593fab6 Compare June 11, 2026 17:46
@hjmjohnson

Copy link
Copy Markdown
Member Author

@hjmjohnson hjmjohnson requested a review from dzenanz June 11, 2026 17:52
Comment thread .github/workflows/doxygen.yml Outdated
@hjmjohnson hjmjohnson merged commit e59c2b4 into InsightSoftwareConsortium:main Jun 11, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Documentation Issues affecting the Documentation module type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants