feat(v11): CI/CD + regression tests + fuzzing + benchmarks + code quality
CI / Build & Test (push) Failing after 41s
CI / Release Build (push) Failing after 30s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled

v11.1 — Test Infrastructure (14 files):
- .github/workflows/ci.yml: Ubuntu 22.04 + GCC 11, auto ctest on push
- tests/regression/: degenerate geometry, extreme coords, thin wall, large models
- tests/fuzz/: SDF random CSG, random booleans, format round-trip, continuous mode
- tests/benchmark/: boolean perf, MC perf, IO perf benchmarks
- docs/benchmark-report.md: benchmark template

v11.2 — Code Quality + Docs:
- .clang-tidy: 15 check categories, 22 exclusions
- .github/workflows/static-analysis.yml: clang-tidy CI scan
- CODEOWNERS, SECURITY.md
- docs: API overview, testing guide, contributing guide
- README: module capability overview table

Pending: binary formats + curve projection (retrying)
This commit is contained in:
茂之钳
2026-07-27 01:10:58 +08:00
parent 97ee97057b
commit 7b76689ea1
30 changed files with 4318 additions and 577 deletions
+66
View File
@@ -0,0 +1,66 @@
name: CI
on:
push:
branches: [main, master, develop, 'v*', 'feature/*']
pull_request:
branches: [main, master]
jobs:
build-and-test:
name: Ubuntu 22.04 • GCC 11 • CMake
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
steps:
- name: 检出代码
uses: actions/checkout@v4
with:
submodules: recursive
- name: 安装依赖
run: |
sudo apt-get update
sudo apt-get install -y \
g++-11 \
cmake \
ninja-build \
libeigen3-dev
- name: 配置 CMake
env:
CC: gcc-11
CXX: g++-11
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_TESTS=ON \
-DBUILD_BENCHMARKS=OFF \
-DBUILD_EXAMPLES=OFF \
-DVDE_BUILD_PYTHON=OFF \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic"
- name: 编译
run: cmake --build build --parallel $(nproc)
- name: 运行测试
working-directory: build
run: |
ctest --output-on-failure \
--test-dir . \
-j $(nproc) \
--timeout 300
- name: 上传测试结果
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.build_type }}
path: |
build/Testing/Temporary/LastTest.log
build/Testing/**/*.xml
+92
View File
@@ -0,0 +1,92 @@
name: Static Analysis
on:
push:
branches: [main]
paths:
- 'include/**'
- 'src/**'
- 'tests/**'
- '.clang-tidy'
pull_request:
branches: [main]
paths:
- 'include/**'
- 'src/**'
- 'tests/**'
- '.clang-tidy'
schedule:
- cron: '0 3 * * 1' # 每周一凌晨3点全量扫描
workflow_dispatch: # 手动触发
jobs:
clang-tidy:
name: clang-tidy scan (GCC 11.4)
runs-on: ubuntu-22.04
container:
image: vde-builder:latest
options: --cpus=2 --memory=8g
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install clang-tidy
run: |
apt-get update -qq
apt-get install -y -qq clang-tidy-15
- name: Generate compile_commands.json
run: |
cmake -B build_analysis \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_BENCHMARKS=OFF \
-DVDE_BUILD_PYTHON=OFF \
-DVDE_USE_OPENMP=ON
cmake --build build_analysis -j2 --target vde_foundation vde_core vde_curves vde_mesh vde_spatial vde_boolean vde_collision vde_brep vde_sdf vde_sketch vde_capi
- name: Run clang-tidy
run: |
run-clang-tidy-15 \
-p build_analysis \
-j2 \
-header-filter='include/vde/.*\.h$' \
2>&1 | tee clang-tidy-report.txt
continue-on-error: true
- name: Summarize results
if: always()
run: |
echo "## clang-tidy Results" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
WARNINGS=$(grep -c 'warning:' clang-tidy-report.txt || echo 0)
ERRORS=$(grep -c 'error:' clang-tidy-report.txt || echo 0)
echo "Total warnings: $WARNINGS" >> $GITHUB_STEP_SUMMARY
echo "Total errors: $ERRORS" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
if [ "$ERRORS" -gt 0 ]; then
echo "⚠️ Found $ERRORS clang-tidy errors" >> $GITHUB_STEP_SUMMARY
fi
- name: Upload clang-tidy report
if: always()
uses: actions/upload-artifact@v4
with:
name: clang-tidy-report
path: clang-tidy-report.txt
retention-days: 30
if-no-files-found: ignore
- name: Upload compile_commands.json
if: always()
uses: actions/upload-artifact@v4
with:
name: compile-commands
path: build_analysis/compile_commands.json
retention-days: 7
if-no-files-found: ignore