Add a lightweight test-fast pipeline for the public Codeberg mirror so it shows a build status, defined for both CI systems Codeberg offers: - .woodpecker.yml (Woodpecker, debian:bookworm) - .forgejo/workflows/ (Forgejo Actions, node:20-bookworm, runner label docker) Both run the pure-math suite only (Eigen vendored, GTest via FetchContent; no CGAL/Boost), using public images and the docker runner label since the private eulernest ci-cpp image and Pi runner are unreachable from Codeberg. Docs: - new doc/architecture/ci-cd.md: two-forge topology, runners, trigger keywords, mirror mechanism. - fix stale "codeberg/main ... no CI" claim in contributing.md and bring the CI table up to date. - link the new doc from the README doc index. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
66 lines
2.3 KiB
YAML
66 lines
2.3 KiB
YAML
# Forgejo Actions — Codeberg (https://codeberg.org)
|
|
#
|
|
# Codeberg counterpart of the eulernest Gitea pipeline
|
|
# (.gitea/workflows/cpp-tests.yml). Two differences are required because
|
|
# Codeberg's shared runners are not the Pi runner:
|
|
#
|
|
# * runs-on: docker — Codeberg shared-runner label (not "eulernest")
|
|
# * image: node:20-bookworm — public image (the private git.eulernest.eu
|
|
# ci-cpp image is unreachable from Codeberg).
|
|
# node:20 ships the Node runtime that
|
|
# actions/checkout@v4 needs; build tools are
|
|
# apt-installed in the first step.
|
|
#
|
|
# Scope: "test-fast" only — the pure-math suite (Eigen vendored, GoogleTest via
|
|
# FetchContent, no CGAL/Boost). A red job here = a red Codeberg CI badge.
|
|
|
|
name: C++ Tests (Codeberg)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "claude/**"
|
|
- "feature/**"
|
|
- "review/**"
|
|
pull_request:
|
|
|
|
jobs:
|
|
test-fast:
|
|
runs-on: docker
|
|
container:
|
|
image: node:20-bookworm
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install build deps (cmake, g++, make)
|
|
run: |
|
|
apt-get update -qq
|
|
apt-get install -y --no-install-recommends \
|
|
cmake g++ make git ca-certificates
|
|
|
|
- name: Configure (tests-only — Eigen + GoogleTest)
|
|
run: cmake -S code -B build -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
run: cmake --build build --target conformallab_tests -j$(nproc)
|
|
|
|
- name: Run tests
|
|
run: >
|
|
ctest --test-dir build
|
|
--output-on-failure
|
|
--output-junit test-results.xml
|
|
|
|
- name: Summary
|
|
if: always()
|
|
run: |
|
|
if [ -f build/test-results.xml ]; then f=build/test-results.xml; else f=test-results.xml; fi
|
|
if [ -f "$f" ]; then
|
|
total=$(grep -o 'tests="[0-9]*"' "$f" | grep -o '[0-9]*' | head -1)
|
|
failed=$(grep -o 'failures="[0-9]*"' "$f" | grep -o '[0-9]*' | head -1)
|
|
skipped=$(grep -o 'skipped="[0-9]*"' "$f" | grep -o '[0-9]*' | head -1)
|
|
passed=$(( ${total:-0} - ${failed:-0} - ${skipped:-0} ))
|
|
echo "FAST ▸ TOTAL ${total:-0} | PASSED $passed | FAILED ${failed:-0} | SKIPPED ${skipped:-0}"
|
|
fi
|