Commit Graph

32 Commits

Author SHA1 Message Date
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
Tarik Moussa
2b456abc78 ci(test-cgal): switch to manual comment trigger (/test-cgal on PR)
Instead of triggering on every pull_request push, test-cgal now fires
only when a PR comment contains "/test-cgal".  This prevents the Pi
runner (3-4 GB RAM, swap constantly loaded) from queuing CGAL builds
faster than it can drain them on every WIP commit.

Workflow changes:
- Add `issue_comment: types: [created]` to the top-level `on:` block
- test-cgal `if:` condition:
    event is issue_comment
    AND comment is on a PR (issue.pull_request != null)
    AND comment body contains "/test-cgal"
- Checkout uses `refs/pull/N/head` so the PR branch is checked out
  correctly (issue_comment sets GITHUB_REF to the default branch, not
  the PR branch)

Usage: write "/test-cgal" as a PR comment to trigger the 277-test
CGAL suite.  The build uses CONFORMALLAB_LOW_MEMORY_BUILD=ON (-O0,
no PCH, unity batch 1) and runs in a 2000 MB container.

CLAUDE.md: CI table + status paragraph updated accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 01:17:27 +02:00
Tarik Moussa
449c5899c0 ci: re-enable CGAL tests with LOW_MEMORY_BUILD for Raspberry Pi runner
Finding-I from doc/reviewer/external-audit-2026-05-30.md.

Root cause: CGAL+Eigen at -O3 drives cc1plus peak RAM to ~700 MB per
Unity compilation unit (batch size 4) on ARM64.  With the 1600 MB
container limit the 2nd or 3rd TU reliably triggered OOM-kill, so
test-cgal was gated off via `if: false` since 2026-05-26.

Fix: new CMake option CONFORMALLAB_LOW_MEMORY_BUILD=ON applies four
orthogonal memory-saving measures to conformallab_cgal_tests:

  1. -O0 (no debug info): optimizer passes entirely skipped → cc1plus
     peak drops from ~700 MB to ~150-200 MB per TU on ARM64.
     Omitting -g avoids the additional object-file / linker RAM cost.

  2. CONFORMALLAB_USE_PCH=OFF: saves the one-time ~200 MB PCH
     compilation cost; each TU re-parses CGAL headers (fast at -O0).

  3. UNITY_BUILD_BATCH_SIZE=1: one source file per cc1plus invocation,
     removing the "4-file template-explosion" per-unit multiplier.

  4. -Wl,--no-keep-memory (GNU ld): linker releases symbol tables after
     each input file → ~15-25 % less linker RSS.

Verified locally with cmake -DCONFORMALLAB_LOW_MEMORY_BUILD=ON:
  277/277 CGAL tests pass, 31 s runtime (vs 2 s at -O3 — expected;
  tests run 15× slower without optimizer but all correct).

CI workflow changes (cpp-tests.yml):
  - test-cgal re-enabled: `if: github.event_name == 'pull_request'`
  - Configure step adds -DCONFORMALLAB_LOW_MEMORY_BUILD=ON
  - Container memory: 1600m → 2000m (--memory-swap=3000m for 1 GB swap
    headroom), using ~half of the Pi's 3-4 GB while leaving OS margin.

CLAUDE.md updated: new flag added to compile-time options table; CI
status row corrected from DISABLED to active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 01:17:27 +02:00
Tarik Moussa
048875c002 ci: disable test-cgal job (compute-intensive, OOM-prone)
All checks were successful
C++ Tests / test-fast (pull_request) Successful in 1m59s
API Docs / doc-build (pull_request) Successful in 56s
C++ Tests / test-cgal (pull_request) Has been skipped
C++ Tests / quality-gates (pull_request) Successful in 1m56s
The CGAL test build is too heavy for the eulernest runner — most recent
runs OOM during CGAL+Eigen template expansion at -j1/1600 MB rather than
exposing real regressions. Gate the job off with `if: false` and a
DISABLED-2026-05-26 comment block, matching the pattern already used for
doxygen-pages.yml and perf-compile-time.yml. test-fast and quality-gates
keep running on every push/PR; workflow_dispatch reruns of test-cgal
still work from the Gitea UI.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 22:19:11 +02:00
Tarik Moussa
f9418ca540 ci: disable auto-trigger on doxygen-pages.yml + perf-compile-time.yml
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m16s
API Docs / doc-build (pull_request) Successful in 51s
C++ Tests / test-cgal (pull_request) Failing after 8m22s
C++ Tests / quality-gates (pull_request) Successful in 2m1s
Both workflows used `push: branches: [main]` and have been firing on
every merge to main since v0.10.0 landed.  Recent runs failed:

  * `doxygen-pages.yml` runs #492/#493/#494 — failed (pages branch
    went into an inconsistent state during the cleanup sequence;
    the workflow's HTTPS push couldn't recover, even though manual
    SSH push from a developer machine could).
  * `perf-compile-time.yml` never ran a clean baseline because the
    same upstream CI-container issue blocks it.

While we work through the root cause, both workflows are restricted
to `workflow_dispatch` (manual only).  Effect:

  * pages-branch stays at its last known-good content; merges to
    main no longer trigger a (currently-failing) republish attempt
  * no false-red CI badges on PRs / commits
  * either workflow can still be fired manually via the Gitea
    Actions UI when needed

Re-enable trick: each file has its old `push:` block commented out;
uncomment when the underlying CI push issue is fixed.

`doc-build.yaml` (Doxygen warning-stats, `continue-on-error: true`)
is unaffected — it does not push anywhere and is intentionally
informational.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:38:20 +02:00
Tarik Moussa
3f508adf18 ci+hub: durable reviewer hub via in-repo HTML + perf-CI matrix on Linux
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m16s
API Docs / doc-build (pull_request) Successful in 51s
Markdown link check / check (pull_request) Successful in 45s
C++ Tests / test-cgal (pull_request) Failing after 7m40s
C++ Tests / quality-gates (pull_request) Failing after 2m1s
Two additions that close out the reviewer-prep work cleanly:

1. doc/reviewer/hub.html  +  publish-workflow integration
   ──────────────────────────────────────────────────────
   Move the hand-curated reviewer hub from the codeberg `pages`
   branch (where it lived as an opaque snapshot) into the repo as
   `doc/reviewer/hub.html`.  `.gitea/workflows/doxygen-pages.yml`
   gains a conditional `if [ -f doc/reviewer/hub.html ]; then …`
   step that installs it as the publish `index.html` and demotes
   the auto-generated Doxygen index to `/doxygen.html`.

   Effect: merging any of the open PRs into main will trigger the
   workflow, which republishes BOTH the Doxygen + the reviewer hub
   together.  The reviewer URL stays live across merges with zero
   manual intervention.

   Source-controlled benefits:
     * hub edits go through normal PRs, not orphan-branch
       force-pushes
     * old hub versions live in git history
     * the in-repo links now target `branch/main/…` instead of the
       transient `preview/reviewer-snapshot-vN/…` paths

2. .gitea/workflows/perf-compile-time.yml — Linux CI bench
   ────────────────────────────────────────────────────────
   New workflow runs on every push to main that touches the build
   system or public headers.  Five-step matrix measures and reports:
     Run 1   cold baseline (no PCH, no Unity, no ccache)
     Run 2   + PCH only
     Run 3   + PCH + Unity (current default)
     Run 4   + FAST_TEST_BUILD=ON  (-O0 -g — Linux's expected ~40 % win)
     Run 5   + ccache warm rerun   (expected ≥ 90 % cache hit)

   Validates the Apple-M1 predictions in doc/architecture/compile-time.md
   against the Linux + g++ runner where Backend dominates more and
   the Apple-clang+PCH friction that defeats ccache locally does not
   apply.  Job is data-collection only; never blocks a merge.

doc updates:
  * doc/architecture/compile-time.md — new "Cross-platform perf bench"
    section linking to the workflow + the table of macOS-vs-Linux
    expected deltas.
  * doc/reviewer/README.md — new "Hub-Page durability" subsection
    explaining how the hub survives merges.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:15:09 +02:00
Tarik Moussa
32253a8f5e ci+licenses: promote 4 trivial gates to required CI + THIRD-PARTY-LICENSES.md
Two reviewer-facing additions consolidated into one commit:

(1) New `quality-gates` job in .gitea/workflows/cpp-tests.yml
    ──────────────────────────────────────────────────────────
    Runs in parallel with test-cgal after test-fast.  Installs
    `codespell` + `shellcheck` (apt) into the existing ci-cpp container,
    then executes four scripts strictly (exit 1 on any finding):
      * license-headers.sh   — 66/66 files carry SPDX MIT
      * cgal-conventions.py  — 0 violations across 6 CGAL public headers
      * codespell.sh         — 0 typos across docs + source + scripts
      * shellcheck.sh        — 0 findings across 16 shell scripts

    Each ran at 0 findings locally before promotion.  Total wall-time
    on the eulernest runner: ~30 s.

(2) New code/deps/THIRD-PARTY-LICENSES.md
    ──────────────────────────────────────
    Enumerates every vendored dep under code/deps/, plus auto-fetched
    GoogleTest, plus system-required Boost, with:
      * upstream project + version + SPDX identifier
      * compatibility note for MIT distribution
      * downstream-packager license matrix (header-only consumer vs
        CLI binary) clarifying the LGPL §3 vs §4 distinction

    Required for any future Linux-distribution packaging and for the
    CGAL submission's compliance check.

    Also fixes a `code/.gitignore` gap: the `deps/*` wildcard was
    catching the new file; added `!deps/THIRD-PARTY-LICENSES.md` to
    the exclusion list so it's actually tracked.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:15:09 +02:00
704f42bbfd Merge pull request 'ci+quality: structural gates (CI: 3 new; local: 7 new + .clang-tidy)' (#18) from ci/structural-tests into main
Some checks failed
C++ Tests / test-fast (push) Has started running
C++ Tests / test-cgal (push) Has been cancelled
API Docs / doc-build (push) Has been cancelled
Doxygen → Codeberg Pages / publish (push) Has been cancelled
Markdown link check / check (push) Has been cancelled
Mirror to Codeberg / mirror (push) Has been cancelled
2026-05-26 09:14:45 +00:00
Tarik Moussa
a2eee9c279 ci+quality: structural gates (CI: 3 new; local: 7 new + .clang-tidy)
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 1m56s
API Docs / doc-build (pull_request) Successful in 58s
Markdown link check / check (pull_request) Successful in 45s
C++ Tests / test-cgal (pull_request) Failing after 13m14s
CI gates (active on every PR via .gitea/workflows/)
───────────────────────────────────────────────────
1. test-count consistency
   cpp-tests.yml gains a step after test-cgal that runs
   `scripts/check-test-counts.sh` against the just-built ./build dir
   (reuse via new BUILD_DIR env var, ~5 s overhead).  Drift between
   `doc/api/tests.md` and ctest reality now fails the PR.

2. End-to-end smoke
   `scripts/try_it.sh` (the documented user quick-start) is now part of
   the CGAL job, so README quick-start regressions fail the PR rather
   than silently breaking when users land.

3. Internal markdown link checker
   New `.gitea/workflows/markdown-links.yml` + `scripts/check-markdown
   -links.py`.  PRs that touch any *.md file run the check; main pushes
   trigger it too; a weekly cron catches external link rot.  Pure
   Python, no third-party action.  Validated against the current tree:
   122 internal links across 37 *.md files, 0 broken.

Local quality scripts (`scripts/quality/`, not in CI)
─────────────────────────────────────────────────────
* `license-headers.sh`   — `SPDX-License-Identifier: MIT` audit over
                            code/{include,src,tests}/.  Currently
                            reports 60/66 files missing it — that's
                            a follow-up; the script captures the
                            structural gap.
* `sanitizers.sh`        — ASan + UBSan over the fast test suite.
* `coverage.sh`          — gcov/lcov line + branch coverage of
                            code/include/, HTML report under
                            build-coverage/lcov-html/.
* `clang-tidy.sh`        — runs the curated `.clang-tidy` policy over
                            every public header.
* `multi-compiler.sh`    — sequential build + test against every
                            detected g++/clang++ (auto-discovery or
                            explicit list).
* `cgal-version-matrix.sh`— sequential build + CGAL test suite against
                            every CGAL tree under `~/cgal/<ver>/` (or
                            via `CGAL_ROOTS=...` env var).
* `reproducible-build.sh`— two `Release -j1` builds, fail if any test
                            executable byte-differs.
* `run-all.sh`           — driver: `--fast` for the ~5-min subset,
                            no arg for the ~25–40 min full sweep;
                            captures per-gate logs to
                            build-quality-logs/.

+ `.clang-tidy`          — curated, deliberately-small policy (only
                            checks that fire on OUR code, never on
                            transitive CGAL/Eigen/Boost headers).

+ `scripts/quality/README.md` — explains the structure, lists each
                            gate's wall-time + prereqs, and codifies
                            the promotion path: a gate moves into CI
                            only when it's green on the dev machine
                            AND has a recovery-instructions paragraph
                            in `doc/release-policy.md`.

Doc updates
───────────
`doc/architecture/locked-vs-flexible.md` (reviewer-facing) gains 4
"closed" rows in the limitations table — the 3 CI gates above and the
local quality-script suite.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 08:25:09 +02:00
Tarik Moussa
62b02f88b9 docs(doxygen): 100% public-API coverage (228 → 0 undocumented)
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m40s
API Docs / doc-build (pull_request) Successful in 1m2s
C++ Tests / test-cgal (pull_request) Failing after 11m52s
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>
2026-05-24 04:22:49 +02:00
Tarik Moussa
f6722d7e84 docs: auto-generate doc/api/headers.md from Doxygen XML
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m35s
API Docs / doc-build (pull_request) Successful in 44s
C++ Tests / test-cgal (pull_request) Failing after 13m11s
Replaces the hand-maintained `doc/api/headers.md` with a generated one
sourced from each header's `\file` brief and the public symbols
extracted by Doxygen into XML.  The CI workflow regenerates it on every
push to main that touches the public headers.

New files
─────────
* scripts/gen-headers-md.py — parses doc/doxygen/xml/*.xml, groups
  headers by directory (CGAL public / CGAL internals / Core), and
  writes a markdown table with header path, first-sentence brief, and
  the public symbols declared at file scope.  Skips `detail::`
  namespaces and template-specialisation duplicates.
* scripts/regen-docs.sh — convenience wrapper:
  doxygen → gen-headers-md.py → coverage report.

Workflow changes
────────────────
.gitea/workflows/doxygen-pages.yml now:
  1. Runs `bash scripts/doxygen-coverage.sh` as an informational step
     (no fail threshold yet — the script supports `--threshold N` for
     when we're ready).
  2. Re-runs `python3 scripts/gen-headers-md.py` and warns if the
     file drifted from what's in main (operator should run
     `regen-docs.sh` locally before pushing).

Doxyfile hygiene
────────────────
`HTML_TIMESTAMP` was removed in Doxygen 1.10 → replaced with the new
`TIMESTAMP = NO` to silence the obsolete-tag warning.

Effect on the reviewer-facing landing pages
───────────────────────────────────────────
Every improvement to a `\file` brief at the top of a public header now
flows automatically into both:
  * the Doxygen HTML at https://tmoussa.codeberg.page/ConformalLabpp/
  * the markdown landing at doc/api/headers.md (rendered by Codeberg
    in the repo view)
…so writers have a single source of truth (the C++ source) and
readers see the same words in both surfaces.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:47:29 +02:00
Tarik Moussa
b0c67af922 ci: auto-publish Doxygen HTML to Codeberg Pages on main
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m50s
API Docs / doc-build (pull_request) Successful in 37s
C++ Tests / test-cgal (pull_request) Failing after 11m51s
New .gitea/workflows/doxygen-pages.yml runs on every push to main that
touches the public headers, Doxyfile, the markdown-link filter, any
doc/**/*.md, README.md, or the workflow itself.  It reuses the existing
ci-cpp container image and the existing CODEBERG_TOKEN secret already
used by mirror-to-codeberg.yml — no new secret setup needed.

The job force-pushes an orphan commit to the `pages` branch on
codeberg.org/TMoussa/ConformalLabpp, which Codeberg Pages serves from
https://tmoussa.codeberg.page/ConformalLabpp/ (verified live).

README.md gains a Doxygen badge and a Documentation table row pointing
at the Pages URL.  locked-vs-flexible.md (the reviewer-facing doc) is
updated to mention the Pages URL next to the Doxygen-coverage gap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:30:54 +02:00
Tarik Moussa
311360f925 ci: remove unsupported upload-artifact@v4 from doc-build job
Some checks failed
C++ Tests / test-fast (push) Successful in 2m19s
C++ Tests / test-fast (pull_request) Successful in 3m28s
API Docs / doc-build (pull_request) Successful in 40s
C++ Tests / test-cgal (push) Has been skipped
C++ Tests / test-cgal (pull_request) Failing after 10m57s
Gitea Actions on GHES does not support actions/upload-artifact@v4 — the
v4 release switched to GitHub-only APIs (artifact backend rewritten).
The doc-build job was failing with "artifact@v4+ are not currently
supported on GHES."

Changes
───────
* Removed the artifact-upload step entirely.  Rationale: the warning
  summary in the job log is the primary reviewer signal for the
  documentation health check.  Reviewers who want to inspect the HTML
  locally can rebuild it with `cmake --build build --target doc`.
* Removed the apt-get install step.  Doxygen is now pre-installed in
  the ci-cpp container (Dockerfile change earlier in this PR).
* Added an explanatory comment so the missing artifact step is not
  re-introduced unknowingly.
* Added a "Report HTML output" step that prints file count + total size
  for visibility (a no-op if the HTML directory is absent).

When/if a real artifact host appears (Gitea Pages, S3, GitHub mirror
release), this job can be extended to publish the HTML there.  For now,
the in-log warning summary is sufficient.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:51:17 +02:00
Tarik Moussa
3cc96703cc ci: fix test-cgal OOM + add Doxygen API-docs job
Some checks failed
C++ Tests / test-fast (push) Successful in 4m47s
C++ Tests / test-fast (pull_request) Successful in 3m42s
API Docs / doc-build (pull_request) Failing after 7m19s
C++ Tests / test-cgal (push) Has been skipped
C++ Tests / test-cgal (pull_request) Failing after 15m9s
Two CI improvements:

1. **test-cgal OOM fix**
   * memory limit  1400m → 1600m  (cc1plus needs ~700 MB for CGAL + Eigen)
   * memory-swap   1400m → 1600m  (was less than memory, Docker rejected
                                    the config; now disables swap entirely
                                    so OOM fails fast)
   * build parallelism  -j2 → -j1  (single worker leaves headroom)

   These three changes together address the test-cgal failures observed
   since the test_scalability_smoke.cpp was added.  Locally the full
   suite (183 tests including the brezel.obj genus-2 mesh) runs in
   ~1 s with peak ~700 MB; the ARM64 CI runner now has the same
   headroom.

2. **API-docs job (new, soft-fail)**
   * .gitea/workflows/doc-build.yaml — separate workflow, distinct name
     "API Docs"
   * Runs only on pull requests; `continue-on-error: true` ensures
     warnings never block the merge
   * Installs doxygen, runs `doxygen Doxyfile`, uploads the generated
     HTML as a 14-day artifact for reviewer inspection
   * Dockerfile.ci-cpp also pre-installs doxygen so future iterations
     can drop the in-job install step

   When Doxygen coverage matures (Phase 8c — User_manual.md), this job
   can be promoted to a hard requirement and the HTML deployed to
   Pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:18:21 +02:00
Tarik Moussa
e958afbd19 chore: translate all German text to English across code, docs, and CI
Some checks failed
C++ Tests / test-fast (push) Successful in 2m15s
C++ Tests / test-cgal (push) Has been skipped
C++ Tests / test-fast (pull_request) Successful in 2m23s
C++ Tests / test-cgal (pull_request) Failing after 2m36s
Unified the codebase language to English throughout. German text appeared
in code comments, test file headers, CI step names, and several markdown
documents. All natural-language text is now English; proper nouns
(Institut für Mathematik, Technische Universität Berlin) are unchanged.

Files changed:
- .gitea/workflows/cpp-tests.yml  — CI step names and job comments
- code/include/mesh_utils.hpp     — inline comment
- code/tests/cgal/CMakeLists.txt  — section comment block
- code/tests/cgal/test_geometry_utils.cpp — full file header + all test comments
- doc/math/references.md          — geometry-central section
- doc/math/validation.md          — Section 9 (geometry-central cross-validation)
- doc/roadmap/phases.md           — Optional geometry-central track (GC-1/2/3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 00:09:09 +02:00
Tarik Moussa
04b0ae22f2 ci: run CGAL tests only on pull requests, not on every push
All checks were successful
C++ Tests / test-fast (push) Successful in 2m48s
C++ Tests / test-cgal (push) Has been skipped
Reduces Pi load: test-cgal now triggers only when a PR is opened/updated,
not on every push to dev or main. test-fast continues to run on all branches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:07:37 +02:00
Tarik Moussa
c91230579f ci: limit CGAL build to -j2 and nice -n 19 to protect Pi web server
Some checks failed
C++ Tests / test-fast (push) Successful in 2m26s
C++ Tests / test-cgal (push) Has been cancelled
-j$(nproc) during CGAL+Eigen template compilation consumed ~1.5-2 GB
peak RAM on the Raspberry Pi CI runner, starving the Gitea web server.

Changes:
- CGAL build: -j$(nproc) → -j2 (halves peak memory, ~700 MB per process)
- Both builds: nice -n 19 (lowest CPU priority, web server keeps preemption)
- test-cgal container: hard memory cap --memory=1400m --memory-swap=1400m
  so the container is OOM-killed rather than taking down the whole system

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:12:30 +02:00
Tarik Moussa
9c35c2cb71 fix(ci): entferne WITH_CGAL_TESTS=ON aus test-fast — Job braucht kein Boost
Some checks failed
C++ Tests / test-fast (push) Successful in 2m51s
C++ Tests / test-cgal (push) Failing after 2m10s
test-fast ist der schnelle, abhängigkeitsfreie Job: nur Eigen + GTest.
WITH_CGAL_TESTS=ON in test-fast triggert unnötigerweise find_package(Boost)
und konfiguriert das CGAL-Test-Verzeichnis.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 20:39:32 +02:00
Tarik Moussa
4e8213f9aa fix(ci): cpp-tests.yml bereinigt — WITH_CGAL_TESTS=ON in test-fast, Boost-Kommentar aktuell
Some checks failed
C++ Tests / test-fast (push) Failing after 2m31s
C++ Tests / test-cgal (push) Has been skipped
- test-fast konfiguriert jetzt mit -DWITH_CGAL_TESTS=ON (Boost im Image)
- Kommentar aktualisiert (Boost kein Runtime-Install mehr nötig)
- Konsistenz zwischen test-fast und test-cgal hergestellt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 20:34:52 +02:00
4a036b8214 Update .gitea/workflows/mirror-to-codeberg.yml
Some checks failed
C++ Tests / test-fast (push) Successful in 2m48s
Mirror to Codeberg / mirror (push) Successful in 28s
C++ Tests / test-cgal (push) Failing after 2m3s
C++ Tests / test-fast (pull_request) Successful in 2m18s
C++ Tests / test-cgal (pull_request) Failing after 1m46s
2026-05-15 08:59:06 +00:00
28d05f5863 Update .gitea/workflows/cpp-tests.yml
Some checks failed
C++ Tests / test-fast (push) Successful in 2m30s
Mirror to Codeberg / mirror (push) Has been cancelled
C++ Tests / test-cgal (push) Failing after 2m1s
Del Boot Installation
2026-05-15 08:52:50 +00:00
Tarik Moussa
6886803a29 fix(ci): decouple CGAL tests from viewer — add WITH_CGAL_TESTS flag
Some checks failed
C++ Tests / test-fast (push) Successful in 2m12s
Mirror to Codeberg / mirror (push) Failing after 1s
C++ Tests / test-cgal (push) Failing after 1m52s
Root cause: -DWITH_CGAL=ON implied -DWITH_VIEWER=ON, which pulled in
GLFW, which requires wayland-scanner — not present in the headless CI
container (ubuntu:22.04 ARM64).

Fix: new CMake option -DWITH_CGAL_TESTS=ON builds conformallab_cgal_tests
without touching the viewer, GLFW, libigl, or any display dependency.
Only Boost headers are required (already in the Docker image).

Changes
───────
code/CMakeLists.txt
  - Add WITH_CGAL_TESTS option (OFF by default)
  - find_package(Boost REQUIRED) now shared between WITH_CGAL and WITH_CGAL_TESTS
  - WITH_CGAL still implies WITH_VIEWER (for local full builds)
  - Remove duplicate find_package(Boost) inside the WITH_CGAL block

code/tests/CMakeLists.txt
  - cgal/ subdirectory added for WITH_CGAL OR WITH_CGAL_TESTS

.gitea/workflows/cpp-tests.yml
  - test-cgal job: -DWITH_CGAL=ON → -DWITH_CGAL_TESTS=ON

README.md
  - Build modes table: three rows (default / CGAL_TESTS / CGAL full)
  - Quick-start: separate headless and full-local sections
  - Prerequisite table updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 13:50:56 +02:00
Tarik Moussa
62e2875c30 ci: Zwei-Job-Pipeline — test-fast + test-cgal (158 CGAL-Tests)
All checks were successful
C++ Tests / test-fast (push) Successful in 2m16s
C++ Tests / test-cgal (push) Has been skipped
test-fast (alle Branches, < 1 s):
  Unverändert — reine Mathe-Tests ohne CGAL/Boost.

test-cgal (main / dev / Pull Requests):
  Läuft nach erfolgreichem test-fast (needs: test-fast).
  Baut conformallab_cgal_tests mit -DWITH_CGAL=ON und führt
  alle 158 CGAL-Tests (Phase 3–7) aus.
  Übergangs-Schritt: apt-get libboost-dev zur Laufzeit, bis das
  Docker-Image neu gebaut wird (Dockerfile bereits aktualisiert).

Dockerfile.ci-cpp:
  libboost-dev ergänzt — für den nächsten manuellen Image-Rebuild.
  Danach entfällt der apt-get-Schritt im Workflow automatisch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 10:47:35 +02:00
Tarik Moussa
b9f739319f ci: fix mirror workflow – remove actions/checkout (needs Node.js)
Some checks failed
C++ Tests / test (push) Failing after 1m12s
Replace JS action with plain git clone --bare + push --mirror.
No Node.js required → runs directly on the Pi host without a container.
Also upgrades from single-branch push to a full mirror of all refs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 00:15:43 +02:00
Tarik Moussa
488223f75d docker: replace g++ + make with build-essential
Some checks failed
Mirror to Codeberg / mirror (push) Failing after 2s
C++ Tests / test (push) Has started running
build-essential pulls gcc, g++, make and libc-dev together.
CMake declares LANGUAGES C CXX so it needs a C compiler (cc) too –
individual g++ install can leave gaps that build-essential covers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 23:03:25 +02:00
Tarik Moussa
c9c9320907 docker: add make to ci-cpp image (CMake build program was missing)
Some checks failed
C++ Tests / test (push) Has been cancelled
Mirror to Codeberg / mirror (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 23:02:17 +02:00
Tarik Moussa
f65d000227 ci: re-enable ci-cpp container (arm64 image now in registry)
Some checks failed
C++ Tests / test (push) Failing after 36s
Mirror to Codeberg / mirror (push) Failing after 3s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:59:44 +02:00
Tarik Moussa
076d1b30d0 ci: fix pipeline – remove container until arm64 image is rebuilt
Some checks failed
C++ Tests / test (push) Failing after 2s
Mirror to Codeberg / mirror (push) Failing after 2s
The ci-cpp image was likely built for linux/amd64; the eulernest runner
is linux/arm64 (Raspberry Pi), so the container exited immediately
without running any steps (task 102 log: 10 lines, no step output).

Fix: run directly on the host runner and install cmake/g++ via apt-get
(same approach as the previously working workflow).

Also pin --platform=linux/arm64 in Dockerfile.ci-cpp so the next
image build produces the correct architecture. Once the image is pushed,
re-add the container: block to the workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:41:47 +02:00
Tarik Moussa
9889c4d811 ci: add mirror-to-codeberg workflow
Some checks failed
C++ Tests / test (push) Failing after 53s
Automatically pushes main and dev to the Codeberg mirror
(codeberg.org/TMoussa/ConformalLabpp) after every push to eulernest.
Requires CODEBERG_TOKEN secret in the eulernest repo settings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:04:32 +02:00
Tarik Moussa
e59f79a8e2 docs + ci: update README, add ci-cpp Docker image, use container in workflow
README:
- Remove stale Boost mention (unused dep, removed yesterday)
- Document three build modes (tests-only / WITH_VIEWER / WITH_CGAL)
  with a comparison table and per-mode cmake commands
- Add project structure overview
- Fix C++20 → C++17 (actual standard used)
- Fix clone URL and getting-started commands
- Add CI section with Dockerfile build instructions

CI:
- Add .gitea/docker/Dockerfile.ci-cpp — ubuntu:22.04 with cmake,
  g++, git, and Node.js 20 pre-installed (Node.js needed for
  actions/checkout@v4 inside containers)
- Update cpp-tests.yml to use ci-cpp container instead of installing
  build tools on every run; add JUnit XML output and summary step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 21:49:44 +02:00
Tarik Moussa
5337a9e5a7 ci: use eulernest runner (Raspberry Pi, ARM64)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:51:45 +02:00
Tarik Moussa
d909683a5b add Gitea Actions workflow for C++ tests
Runs conformallab_tests (GTest) on every push to main/dev/claude/**
using ubuntu-latest + cmake + g++. Only the test binary is built,
not the full app (no CGAL/Boost compilation needed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:35:23 +02:00