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>
This commit is contained in:
Tarik Moussa
2026-05-14 13:50:56 +02:00
parent 78d13bf561
commit 6886803a29
4 changed files with 56 additions and 32 deletions

View File

@@ -52,6 +52,9 @@ jobs:
# Läuft nur auf main, dev und Pull Requests — nicht auf Feature-Branches.
# Startet erst nach erfolgreichem test-fast.
#
# Verwendet -DWITH_CGAL_TESTS=ON (nicht -DWITH_CGAL=ON), damit kein
# Viewer/GLFW gebaut wird — der CI-Container hat kein wayland-scanner.
#
# Boost-Install-Schritt: solange das Docker-Image noch kein libboost-dev
# enthält, wird es hier zur Laufzeit nachinstalliert (~15 s).
# Nach dem nächsten Image-Rebuild (Dockerfile bereits aktualisiert) wird
@@ -73,8 +76,8 @@ jobs:
- name: Boost installieren (Übergang bis Image-Rebuild)
run: apt-get update -qq && apt-get install -y --no-install-recommends libboost-dev
- name: Configure (WITH_CGAL)
run: cmake -S code -B build -DWITH_CGAL=ON -DCMAKE_BUILD_TYPE=Release
- name: Configure (WITH_CGAL_TESTS — kein Viewer, kein wayland-scanner)
run: cmake -S code -B build -DWITH_CGAL_TESTS=ON -DCMAKE_BUILD_TYPE=Release
- name: Build CGAL-Tests
run: cmake --build build --target conformallab_cgal_tests -j$(nproc)