ci: Zwei-Job-Pipeline — test-fast + test-cgal (158 CGAL-Tests)
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>
This commit is contained in:
@@ -2,6 +2,8 @@ FROM --platform=linux/arm64 ubuntu:22.04
|
|||||||
|
|
||||||
# Node.js 20 from NodeSource (Ubuntu Jammy ships v12 which is too old
|
# Node.js 20 from NodeSource (Ubuntu Jammy ships v12 which is too old
|
||||||
# for actions/checkout@v4 — static class blocks require Node.js >= 16).
|
# for actions/checkout@v4 — static class blocks require Node.js >= 16).
|
||||||
|
#
|
||||||
|
# libboost-dev — header-only Boost required by CGAL 6.x (-DWITH_CGAL=ON)
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
curl ca-certificates && \
|
curl ca-certificates && \
|
||||||
@@ -11,6 +13,7 @@ RUN apt-get update -qq && \
|
|||||||
cmake \
|
cmake \
|
||||||
build-essential \
|
build-essential \
|
||||||
git \
|
git \
|
||||||
|
libboost-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|||||||
@@ -6,10 +6,16 @@ on:
|
|||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
- "claude/**"
|
- "claude/**"
|
||||||
|
- "feature/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
# Job 1 — test-fast
|
||||||
|
# Pure-math tests (Clausen, ImLi₂, Hyper-ideal Geometrie).
|
||||||
|
# Kein CGAL, kein Boost. Läuft auf ALLEN Branches in < 1 s.
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test-fast:
|
||||||
runs-on: eulernest
|
runs-on: eulernest
|
||||||
container:
|
container:
|
||||||
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||||
@@ -17,10 +23,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Configure (tests-only mode)
|
- name: Configure (tests-only)
|
||||||
run: cmake -S code -B build -DCMAKE_BUILD_TYPE=Release
|
run: cmake -S code -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
- name: Build test binary
|
- name: Build
|
||||||
run: cmake --build build --target conformallab_tests -j$(nproc)
|
run: cmake --build build --target conformallab_tests -j$(nproc)
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
@@ -29,7 +35,7 @@ jobs:
|
|||||||
--output-on-failure
|
--output-on-failure
|
||||||
--output-junit test-results.xml
|
--output-junit test-results.xml
|
||||||
|
|
||||||
- name: Show test summary
|
- name: Zusammenfassung
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
if [ -f test-results.xml ]; then
|
if [ -f test-results.xml ]; then
|
||||||
@@ -37,5 +43,56 @@ jobs:
|
|||||||
failed=$(grep -o 'failures="[0-9]*"' test-results.xml | grep -o '[0-9]*' | head -1)
|
failed=$(grep -o 'failures="[0-9]*"' test-results.xml | grep -o '[0-9]*' | head -1)
|
||||||
skipped=$(grep -o 'skipped="[0-9]*"' test-results.xml | grep -o '[0-9]*' | head -1)
|
skipped=$(grep -o 'skipped="[0-9]*"' test-results.xml | grep -o '[0-9]*' | head -1)
|
||||||
passed=$(( ${total:-0} - ${failed:-0} - ${skipped:-0} ))
|
passed=$(( ${total:-0} - ${failed:-0} - ${skipped:-0} ))
|
||||||
echo "TOTAL: ${total:-0} | PASSED: $passed | FAILED: ${failed:-0} | SKIPPED: ${skipped:-0}"
|
echo "FAST ▸ TOTAL ${total:-0} | PASSED $passed | FAILED ${failed:-0} | SKIPPED ${skipped:-0}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
# Job 2 — test-cgal
|
||||||
|
# Vollständige CGAL-Test-Suite (Phase 3–7, 158 Tests).
|
||||||
|
# Läuft nur auf main, dev und Pull Requests — nicht auf Feature-Branches.
|
||||||
|
# Startet erst nach erfolgreichem test-fast.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# dieser Schritt zum No-Op.
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
test-cgal:
|
||||||
|
needs: test-fast
|
||||||
|
if: >
|
||||||
|
github.ref == 'refs/heads/main' ||
|
||||||
|
github.ref == 'refs/heads/dev' ||
|
||||||
|
github.event_name == 'pull_request'
|
||||||
|
runs-on: eulernest
|
||||||
|
container:
|
||||||
|
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- 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: Build CGAL-Tests
|
||||||
|
run: cmake --build build --target conformallab_cgal_tests -j$(nproc)
|
||||||
|
|
||||||
|
- name: Run CGAL-Tests
|
||||||
|
run: >
|
||||||
|
ctest --test-dir build
|
||||||
|
-R "^cgal\."
|
||||||
|
--output-on-failure
|
||||||
|
--output-junit cgal-results.xml
|
||||||
|
|
||||||
|
- name: Zusammenfassung
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
if [ -f cgal-results.xml ]; then
|
||||||
|
total=$(grep -o 'tests="[0-9]*"' cgal-results.xml | grep -o '[0-9]*' | head -1)
|
||||||
|
failed=$(grep -o 'failures="[0-9]*"' cgal-results.xml | grep -o '[0-9]*' | head -1)
|
||||||
|
skipped=$(grep -o 'skipped="[0-9]*"' cgal-results.xml | grep -o '[0-9]*' | head -1)
|
||||||
|
passed=$(( ${total:-0} - ${failed:-0} - ${skipped:-0} ))
|
||||||
|
echo "CGAL ▸ TOTAL ${total:-0} | PASSED $passed | FAILED ${failed:-0} | SKIPPED ${skipped:-0}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user