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>
This commit is contained in:
@@ -152,25 +152,25 @@ jobs:
|
|||||||
# ─────────────────────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
# Job 3 — quality-gates (style + convention block)
|
# Job 3 — quality-gates (style + convention block)
|
||||||
#
|
#
|
||||||
# Cheap, deterministic checks that should never break unless a contributor
|
# Trigger: write "/quality-gates" as a comment on any pull request.
|
||||||
# introduces a regression. Each gate is a script under scripts/quality/
|
|
||||||
# and exits 0 only when its tree is clean. These ran for weeks locally
|
|
||||||
# at zero findings before being promoted here.
|
|
||||||
#
|
#
|
||||||
# Tools installed at job-start (the ci-cpp image already has python3 +
|
# Cheap, deterministic checks (~30 s): license headers, CGAL conventions,
|
||||||
# bash; we add codespell + shellcheck on top). Total wall-time: ~30 s
|
# codespell, shellcheck. Runs independently of test-fast when comment-
|
||||||
# on the eulernest runner.
|
# triggered (no `needs:` — the caller decides when to invoke it).
|
||||||
#
|
|
||||||
# Strictly required for merges into main/dev — a regression fails the PR.
|
|
||||||
# ─────────────────────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
quality-gates:
|
quality-gates:
|
||||||
needs: test-fast
|
if: |
|
||||||
|
github.event_name == 'issue_comment' &&
|
||||||
|
github.event.issue.pull_request != null &&
|
||||||
|
contains(github.event.comment.body, '/quality-gates')
|
||||||
runs-on: eulernest
|
runs-on: eulernest
|
||||||
container:
|
container:
|
||||||
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.issue.number }}/head
|
||||||
|
|
||||||
- name: Install codespell + shellcheck (job-local)
|
- name: Install codespell + shellcheck (job-local)
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,34 +1,38 @@
|
|||||||
name: API Docs
|
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:
|
on:
|
||||||
push:
|
issue_comment:
|
||||||
branches:
|
types: [created]
|
||||||
- main
|
workflow_dispatch: {}
|
||||||
pull_request:
|
|
||||||
|
|
||||||
# ─────────────────────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
# Doc-build — informational only
|
# Doc-build — informational only
|
||||||
#
|
#
|
||||||
# Generates Doxygen HTML from the public headers and reports warning
|
# Generates Doxygen HTML from the public headers and reports warning
|
||||||
# statistics. Does NOT block merges: `continue-on-error: true` ensures
|
# statistics. Does NOT block merges: `continue-on-error: true` ensures
|
||||||
# warnings or extraction issues never fail the CI gate. When Doxygen
|
# warnings or extraction issues never fail.
|
||||||
# coverage is denser (Phase 8c), this job can be promoted to a hard
|
|
||||||
# requirement and the HTML deployed to Pages.
|
|
||||||
#
|
#
|
||||||
# Note: Gitea Actions on GHES does not support `actions/upload-artifact@v4`,
|
# Trigger: "/docs" PR comment (or workflow_dispatch for manual runs).
|
||||||
# so HTML artifact upload is intentionally omitted. The warning summary
|
# Checkout uses refs/pull/N/head when triggered via comment.
|
||||||
# in the job log is the primary reviewer signal; reviewers who want the
|
|
||||||
# HTML can rebuild it locally with `cmake --build build --target doc`.
|
|
||||||
# ─────────────────────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
jobs:
|
jobs:
|
||||||
doc-build:
|
doc-build:
|
||||||
if: github.event_name == 'pull_request'
|
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
|
runs-on: eulernest
|
||||||
container:
|
container:
|
||||||
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||||
continue-on-error: true # never block the merge
|
continue-on-error: true # never block the merge
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Generate API documentation
|
||||||
run: doxygen Doxyfile 2>&1 | tee doxygen.log
|
run: doxygen Doxyfile 2>&1 | tee doxygen.log
|
||||||
|
|||||||
@@ -1,35 +1,36 @@
|
|||||||
name: Markdown link check
|
name: Markdown link check
|
||||||
|
|
||||||
# Verify every internal markdown link in the repo resolves to an existing
|
# Verify every internal markdown link in the repo resolves to an existing
|
||||||
# file (or anchor). External http(s) links are also probed but with a
|
# file (or anchor).
|
||||||
# loose timeout — flaky third-party hosts must not break our CI.
|
|
||||||
#
|
#
|
||||||
# Trigger: PRs that touch any *.md file, plus a weekly cron so external
|
# Triggers:
|
||||||
# link rot is caught even when nobody is editing docs.
|
# - "/links" as a PR comment (manual, on the PR branch)
|
||||||
|
# - Weekly cron Mon 05:00 UTC (catches link rot without any PR activity)
|
||||||
|
# - workflow_dispatch (manual run on any branch)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
issue_comment:
|
||||||
paths:
|
types: [created]
|
||||||
- "**/*.md"
|
|
||||||
- ".gitea/workflows/markdown-links.yml"
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- "**/*.md"
|
|
||||||
- ".gitea/workflows/markdown-links.yml"
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 5 * * 1" # Monday 05:00 UTC weekly link-rot check
|
- cron: "0 5 * * 1" # Monday 05:00 UTC weekly link-rot check
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
|
if: |
|
||||||
|
github.event_name == 'schedule' ||
|
||||||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
|
(github.event_name == 'issue_comment' &&
|
||||||
|
github.event.issue.pull_request != null &&
|
||||||
|
contains(github.event.comment.body, '/links'))
|
||||||
runs-on: eulernest
|
runs-on: eulernest
|
||||||
container:
|
container:
|
||||||
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
|
||||||
|
|
||||||
# ── Pure-python internal link check (no external network needed) ────
|
# ── Pure-python internal link check (no external network needed) ────
|
||||||
# We use the same logic that found the 2 broken links before the
|
# We use the same logic that found the 2 broken links before the
|
||||||
|
|||||||
@@ -264,9 +264,11 @@ Three jobs in `.gitea/workflows/cpp-tests.yml`:
|
|||||||
|
|
||||||
| Job | CMake flags | Deps | Triggers on | Status |
|
| Job | CMake flags | Deps | Triggers on | Status |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `test-fast` | *(none)* | Eigen + GTest only | all branches | **active** |
|
| `test-fast` | *(none)* | Eigen + GTest only | all branches (auto) | **active** |
|
||||||
| `test-cgal` | `-DWITH_CGAL_TESTS=ON -DCONFORMALLAB_LOW_MEMORY_BUILD=ON` | + Boost | `/test-cgal` PR comment | **active** (comment-triggered, 2026-05-31) |
|
| `test-cgal` | `-DWITH_CGAL_TESTS=ON -DCONFORMALLAB_LOW_MEMORY_BUILD=ON` | + Boost | `/test-cgal` PR comment | **active** |
|
||||||
| `quality-gates` | *(none)* | + codespell, shellcheck | all branches (`needs: test-fast`) | **active** |
|
| `quality-gates` | *(none)* | + codespell, shellcheck | `/quality-gates` PR comment | **active** |
|
||||||
|
| `doc-build` | *(none)* | Doxygen | `/docs` PR comment or `workflow_dispatch` | **active** |
|
||||||
|
| `markdown-links` | *(none)* | python3 | `/links` PR comment, weekly cron, `workflow_dispatch` | **active** |
|
||||||
|
|
||||||
Runner: `eulernest` — self-hosted Raspberry Pi, ARM64, Ubuntu 22.04. Docker image: `git.eulernest.eu/conformallab/ci-cpp:latest`. `test-cgal` and `quality-gates` both need `test-fast` to pass first (`needs: test-fast`).
|
Runner: `eulernest` — self-hosted Raspberry Pi, ARM64, Ubuntu 22.04. Docker image: `git.eulernest.eu/conformallab/ci-cpp:latest`. `test-cgal` and `quality-gates` both need `test-fast` to pass first (`needs: test-fast`).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user