Completes the work begun in the previous commit on this branch. Every
public symbol under code/include/ now carries a brief Doxygen comment
(0 undocumented per scripts/doxygen-coverage.sh, with the `detail::`
implementation namespaces excluded as before).
Trajectory on this branch:
start (after Doxyfile fix): 24.0 % (165 / 437 in the no-detail set
was 105 / 437 when detail counted)
after PR #17 base commit : 42.4 % (165 / 396)
this commit : 100.0 % (396 / 396)
Files touched (all .hpp / .h headers under code/include/):
* cgal/Conformal_map_traits.h
* clausen.hpp, conformal_mesh.hpp, constants.hpp (already docd)
* cp_euclidean_functional.hpp, cut_graph.hpp, discrete_elliptic_utility.hpp
* euclidean_functional.hpp, euclidean_geometry.hpp, euclidean_hessian.hpp
* fundamental_domain.hpp, gauss_bonnet.hpp
* hyper_ideal_{functional,geometry,hessian,utility,visualization_utility}.hpp
* inversive_distance_functional.hpp, layout.hpp
* matrix_utility.hpp, mesh_builder.hpp, mesh_io.hpp
* newton_solver.hpp, p2_utility.hpp, period_matrix.hpp, projective_math.hpp
* serialization.hpp, spherical_functional.hpp, spherical_geometry.hpp
* spherical_hessian.hpp, viewer_utils.h
CI:
.gitea/workflows/doxygen-pages.yml now enforces
`scripts/doxygen-coverage.sh --threshold 100`, so any future regression
(a new public function landed without a `///` brief) fails the build
before the Doxygen HTML is published to Codeberg Pages.
Doxygen warnings remain at 0.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
101 lines
3.9 KiB
YAML
101 lines
3.9 KiB
YAML
name: Doxygen → Codeberg Pages
|
|
|
|
# Auto-publish Doxygen HTML to https://tmoussa.codeberg.page/ConformalLabpp/
|
|
# every time the public API or docs source changes on main.
|
|
#
|
|
# Pattern: mirrors mirror-to-codeberg.yml — reuses the existing
|
|
# CODEBERG_TOKEN secret + HTTPS push. No new secret setup required.
|
|
#
|
|
# Trigger: push to main that touches code/include/**, Doxyfile, the
|
|
# filter script, doc/**/*.md, README.md, or this workflow file. Also
|
|
# manually triggerable via workflow_dispatch.
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "code/include/**"
|
|
- "Doxyfile"
|
|
- "scripts/doxygen-md-filter.sh"
|
|
- "doc/**/*.md"
|
|
- "README.md"
|
|
- "CLAUDE.md"
|
|
- ".gitea/workflows/doxygen-pages.yml"
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: eulernest
|
|
container:
|
|
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Configure CMake (Doxygen target only — no compiler needed)
|
|
run: cmake -S code -B build
|
|
|
|
- name: Build Doxygen HTML
|
|
run: |
|
|
cmake --build build --target doc
|
|
test -f doc/doxygen/html/index.html
|
|
warnings=$(wc -l < doc/doxygen/doxygen-warnings.log)
|
|
echo "DOC ▸ Doxygen warnings: $warnings"
|
|
if [ "$warnings" -gt 0 ]; then
|
|
echo "::warning::Doxygen produced $warnings warning(s) — review doc/doxygen/doxygen-warnings.log"
|
|
head -30 doc/doxygen/doxygen-warnings.log
|
|
fi
|
|
|
|
- name: Enforce Doxygen coverage 100%
|
|
# Coverage is measured against every public symbol under
|
|
# code/include/ (the `detail::` namespaces are excluded). As of
|
|
# the `docs/doxygen-coverage-100` PR the baseline is 100 %, so
|
|
# the gate fires only on regressions.
|
|
run: bash scripts/doxygen-coverage.sh --threshold 100
|
|
|
|
- name: Regenerate doc/api/headers.md from XML
|
|
run: |
|
|
python3 scripts/gen-headers-md.py
|
|
# If the auto-generated headers.md drifted from main, note it.
|
|
# This job runs on every main push so a drift only persists
|
|
# for the duration of one push — the next push that lands
|
|
# will fold the new headers.md back into main (via the
|
|
# codeberg pages branch). For deterministic regeneration
|
|
# within main itself, run `bash scripts/regen-docs.sh`
|
|
# locally before pushing.
|
|
if ! git diff --quiet -- doc/api/headers.md; then
|
|
echo "::warning::doc/api/headers.md drifted — run scripts/regen-docs.sh locally and commit before next push"
|
|
git --no-pager diff -- doc/api/headers.md | head -30
|
|
fi
|
|
|
|
- name: Publish HTML to codeberg pages branch
|
|
env:
|
|
CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }}
|
|
run: |
|
|
set -eu
|
|
# Build the publish payload in a clean scratch dir so the
|
|
# orphan branch contains only the Doxygen output (and a
|
|
# marker README), never any build/source artefacts.
|
|
publish_dir=$(mktemp -d)
|
|
cp -r doc/doxygen/html/. "$publish_dir/"
|
|
|
|
cat > "$publish_dir/README.txt" <<EOF
|
|
conformallab++ — Doxygen HTML API documentation.
|
|
Auto-generated by .gitea/workflows/doxygen-pages.yml from
|
|
commit ${GITHUB_SHA:-$(git rev-parse HEAD)} on $(date -Iseconds).
|
|
Source: https://codeberg.org/TMoussa/ConformalLabpp
|
|
EOF
|
|
|
|
cd "$publish_dir"
|
|
git init -q -b pages
|
|
git config user.email "ci@eulernest"
|
|
git config user.name "conformallab CI"
|
|
git add -A
|
|
git commit -q -m "Auto-publish: Doxygen HTML for ${GITHUB_SHA:-HEAD}"
|
|
# Force-push: the pages branch is a publish target, history
|
|
# is not interesting (we only ever serve the latest snapshot).
|
|
git push -f \
|
|
"https://TMoussa:${CODEBERG_TOKEN}@codeberg.org/TMoussa/ConformalLabpp.git" \
|
|
pages:pages
|