How dimanikulin/capable-cpp-template works
Project type and purpose
• There is no “business logic” per se—its core functionality is to serve as a reusable scaffold for any C++ library or application.
a. Developer Environment
• Source code (src/)
• Unit tests (test/)
• CMakeLists.txt, .clang-format, CI config (.github/workflows/)
b. Build System
• CMake → Ninja (with ccache)
c. Static Analysis & Formatting
• CppCheck (via GitHub Action codeChecks.yml)
• clang-tidy (optional stage)
• clang-format (local/scripts)
d. Test & Coverage
• Google Test + CTest
• GCov/LCov → filtered coverage → HTML report
e. Documentation
• Doxygen (configured by doxy.cfg) → GitHub Pages (releaseDocs.yml)
f. Packaging & Release
• 7zip (strip & archive binaries)
• WiX (Windows MSI)
• GitHub Releases (upload artifacts)
g. CI Orchestration
• GitHub Actions workflows:
– codeChecks.yml
– multi-platform-build.yml
– releaseDocs.yml
h. External Services
• GitHub (repo + Actions + Pages + Releases)
Component interactions & data flows
1. Developer commits → pushes to GitHub
2. GitHub triggers CI workflows:
• codeChecks → runs CppCheck, formatting checks, optional clang-tidy
• multi-platform-build → invokes CMake & Ninja on Linux, Windows, macOS
– After build: run tests via CTest → upload test results
– Run coverage capture → filter & generate HTML → upload to GitHub
• releaseDocs → run Doxygen → deploy docs to GitHub Pages
3. multi-platform-build also runs packaging:
• Linux/Mac ZIP via 7zip
• Windows MSI via WiX
→ artifacts uploaded to GitHub Releases
4. Developer pulls, iterates locally:
• runs CMake build/test/format via provided scripts
• updates docs/resources in docs/, scripts/, packaging/
Architectural patterns & design principles
• Modular separation of concerns: source vs. tests vs. docs vs. packaging
• CI stages as discrete, reusable pipelines
• Feature flags in CMake (e.g., BUILD_TESTS, BUILD_DOCS) to enable/disable functionality
• Extensibility: add new linters, platforms, packaging formats by dropping in new scripts/CI jobs and updating CMake
Detail
• CMake as the orchestrator within the build stage, invoking Ninja, GTest, and coverage tools.
• Optional toggles (BUILD_TESTS, BUILD_DOCS) as decision diamonds or annotations.