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>
This commit is contained in:
16
.gitea/docker/Dockerfile.ci-cpp
Normal file
16
.gitea/docker/Dockerfile.ci-cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Node.js 20 from NodeSource (Ubuntu Jammy ships v12 which is too old
|
||||
# for actions/checkout@v4 — static class blocks require Node.js >= 16).
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
curl ca-certificates && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
nodejs \
|
||||
cmake \
|
||||
g++ \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /workspace
|
||||
@@ -11,27 +11,32 @@ on:
|
||||
jobs:
|
||||
test:
|
||||
runs-on: eulernest
|
||||
container:
|
||||
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
cmake \
|
||||
g++ \
|
||||
git \
|
||||
ca-certificates
|
||||
|
||||
- name: Configure (Release, tests enabled)
|
||||
run: |
|
||||
cmake -S code -B build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=ON
|
||||
- name: Configure (tests-only mode)
|
||||
run: cmake -S code -B build -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
- name: Build test binary
|
||||
run: cmake --build build --target conformallab_tests -j$(nproc)
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build -R conformallab_tests --output-on-failure
|
||||
run: >
|
||||
ctest --test-dir build
|
||||
--output-on-failure
|
||||
--output-junit test-results.xml
|
||||
|
||||
- name: Show test summary
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f test-results.xml ]; then
|
||||
total=$(grep -o 'tests="[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)
|
||||
passed=$(( ${total:-0} - ${failed:-0} - ${skipped:-0} ))
|
||||
echo ""
|
||||
echo "TOTAL: ${total:-0} | PASSED: $passed | FAILED: ${failed:-0} | SKIPPED: ${skipped:-0}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user