Files
ConformalLabpp/.gitea/workflows/doc-build.yaml
Tarik Moussa 018484a94d ci: switch all non-fast jobs to comment triggers
Every CI job except test-fast and mirror-to-codeberg now runs only
when explicitly requested via a PR comment, instead of on every push
or PR sync.  This keeps the Pi runner idle during WIP commits and lets
the author decide when to pay each job's cost.

Trigger commands:
  /test-cgal       → CGAL test suite (277 tests, ~5 min build + 31 s run)
  /quality-gates   → license/codespell/shellcheck/cgal-conventions (~30 s)
  /docs            → Doxygen build + warning summary (~2 min)
  /links           → Markdown internal link check (~10 s)

All comment-triggered jobs check:
  event is issue_comment
  AND comment is on a PR (issue.pull_request != null)
  AND comment body contains the trigger word
  AND checkout uses refs/pull/N/head (not the default branch)

Jobs that stay automatic:
  test-fast         — runs on every push (26 pure-math tests, < 5 s)
  mirror-to-codeberg — unchanged

Jobs that keep additional triggers:
  markdown-links — weekly cron (Mon 05:00 UTC) + workflow_dispatch
  doc-build      — workflow_dispatch (for manual runs outside a PR)

quality-gates drops `needs: test-fast` — it now runs independently
when comment-triggered (caller decides whether test-fast passed first).

CLAUDE.md CI pipeline table updated with all five jobs and their new
trigger descriptions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 01:17:27 +02:00

61 lines
2.5 KiB
YAML

name: API Docs
# Trigger: write "/docs" as a comment on any pull request.
# Also available via workflow_dispatch for manual runs outside a PR context.
on:
issue_comment:
types: [created]
workflow_dispatch: {}
# ─────────────────────────────────────────────────────────────────────────────
# Doc-build — informational only
#
# Generates Doxygen HTML from the public headers and reports warning
# statistics. Does NOT block merges: `continue-on-error: true` ensures
# warnings or extraction issues never fail.
#
# Trigger: "/docs" PR comment (or workflow_dispatch for manual runs).
# Checkout uses refs/pull/N/head when triggered via comment.
# ─────────────────────────────────────────────────────────────────────────────
jobs:
doc-build:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null &&
contains(github.event.comment.body, '/docs'))
runs-on: eulernest
container:
image: git.eulernest.eu/conformallab/ci-cpp:latest
continue-on-error: true # never block the merge
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
- name: Generate API documentation
run: doxygen Doxyfile 2>&1 | tee doxygen.log
- name: Summarise warnings
if: always()
run: |
if [ -f doc/doxygen/doxygen-warnings.log ]; then
warn=$(wc -l < doc/doxygen/doxygen-warnings.log)
echo "DOC ▸ Doxygen warnings: $warn"
echo ""
echo "First 20 warnings:"
head -20 doc/doxygen/doxygen-warnings.log
else
echo "DOC ▸ No warning log produced — check that Doxyfile WARN_LOGFILE points to doc/doxygen/doxygen-warnings.log"
fi
- name: Report HTML output
if: always()
run: |
if [ -d doc/doxygen/html ]; then
files=$(find doc/doxygen/html -type f | wc -l)
size=$(du -sh doc/doxygen/html | cut -f1)
echo "DOC ▸ HTML output: $files files, $size total"
fi