CI/CD Pipeline Documentation
This directory contains GitHub Actions workflows for continuous integration and deployment.
Workflows
ci.yml - Main CI Pipeline
Comprehensive CI pipeline that runs on every push and pull request:
- Format Check - Ensures code follows formatting standards
- Build - Builds with multiple compilers (GCC 12, Clang 15) and configurations (Debug, Release)
- Static Analysis - Runs cppcheck and clang-tidy
- Code Quality - Checks for TODOs, large files, and other quality issues
- Security Scan - Scans for security vulnerabilities and unsafe code patterns
- Tests - Runs CTest, Python tests, and integration tests
- Build Summary - Provides a summary of all job results
pre-commit.yml - Pre-commit Checks
Runs pre-commit hooks to catch issues before code is merged.
Setup
Pre-commit Hooks
Install pre-commit hooks locally:
Or manually:
pre-commit install
Running Locally
Test formatting:
Run pre-commit hooks manually:
Configuration
Build Matrix
The CI builds with:
- Compilers: GCC 12, Clang 15
- Build Types: Debug, Release
- C++ Standard: C++20
Artifacts
Build artifacts are uploaded for Release builds with GCC 12, retained for 7 days.
Timeouts
- Format check: 10 minutes
- Build: 30 minutes
- Static analysis: 20 minutes
- Code quality: 15 minutes
- Security scan: 20 minutes
- Tests: 30 minutes
Troubleshooting
Build Failures
- Check the build logs for compiler errors
- Ensure all dependencies are listed in the workflow
- Verify CMake configuration is correct
Format Check Failures
Run ./format.sh to auto-format code, then commit the changes.
Test Failures
- Run tests locally:
cd build && ctest --output-on-failure - Check for missing test dependencies
- Verify test data files are available
Best Practices
- Always run pre-commit hooks locally before pushing
- Fix formatting issues before committing
- Run tests locally before pushing
- Check CI status before merging PRs
- Review security warnings even if non-fatal