๐ AudioLab CI/CD Workflows¶
Overview¶
Complete automated build, test, security, and release pipeline for AudioLab. All workflows are optimized for performance with intelligent caching and parallel execution.
๐ Workflow Catalog¶
1. CI - Complete Build & Test (ci-improved.yml) โญ PRIMARY¶
Triggers: Push to main/develop, Pull Requests to main, Manual
Multi-Platform Build Matrix: - โ Windows MSVC 2022 - โ Ubuntu GCC 11 - โ Ubuntu Clang 14 - โ macOS Apple Clang
What it does: - Format check (fail-fast) - Build all CORE modules - Run complete test suite - Upload build artifacts - Generate test reports
Duration: ~15-20 min (with cache)
2. Code Quality (code-quality.yml) ๐¶
Triggers: Push, PR, Manual
Quality Checks: - โ clang-format compliance - โ clang-tidy static analysis - โ cppcheck additional checks - โ Complexity analysis (CCN <15)
Quality Gates: - Code must be formatted - No critical warnings - Complexity within limits
3. Test Suite (test-suite.yml) ๐งช¶
Triggers: Push, PR, Manual
Testing Matrix: - โ 3 platforms ร 2 build types (Debug/Release) - โ Complete code coverage (lcov) - โ Codecov integration - โ 70% coverage threshold
Coverage Requirement: โฅ70% line coverage
4. Security Scan (security-scan.yml) ๐¶
Triggers: Push, PR, Weekly (Mon 9AM UTC), Manual
Security Checks: - โ CodeQL SAST analysis - โ Dependency vulnerabilities - โ Secrets detection (TruffleHog) - โ License compliance
Schedule: Weekly automated scans
5. Performance Benchmarks (benchmark.yml) ๐¶
Triggers: Push, PR, Weekly (Sun 12AM UTC), Manual
Benchmarking: - โ Google Benchmark suite - โ PR vs main comparison - โ Regression detection - โ Performance reports
6. Release - Multi-Platform (release-improved.yml) ๐¶
Triggers: Git tags (v*.*.*), Manual
Release Artifacts: - โ Windows x64 (ZIP) - โ macOS Universal (tar.gz) - โ Linux x64 (tar.gz) - โ Auto-generated changelog - โ Draft release creation
Usage:
7. Manual Workflows (manual-dispatch.yml) ๐ ๏ธ¶
Triggers: Manual only
Available Commands:
- full-build - Complete build & test
- quick-test - Tests only (no rebuild)
- clean-rebuild - Clean rebuild
- benchmark - Benchmarks only
- security-scan - Security scan
- format-fix - Auto-fix formatting
8. Cache Dependencies (cache-deps.yml) โก¶
Triggers: Weekly (Sun 12AM UTC), Manual
Caching: - โ vcpkg packages - โ Build dependencies - โ ~10min time savings
๐ฏ Status Badges¶
Add to your README.md:




[](https://codecov.io/gh/yourusername/audio-lab)
๐ง Configuration¶
Dependabot (dependabot.yml)¶
- GitHub Actions: Weekly (Mon)
- Python deps: Weekly (Tue)
- Docker images: Weekly (Wed)
Code Owners (CODEOWNERS)¶
- Auto-assign reviewers by file path
- Core team for CORE modules
- Security team for security files
Local Testing¶
Simulate CI Locally¶
Before pushing, test your changes locally:
1. Format Check¶
2. Build & Test¶
# Math Primitives
cd "2 - FOUNDATION/04_CORE/04_02_math_primitives"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure
# Core Interfaces
cd "2 - FOUNDATION/04_CORE/04_01_core_interfaces/04_factory_interfaces"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure
3. Static Analysis¶
cd "2 - FOUNDATION/04_CORE/04_02_math_primitives"
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
clang-tidy -p build **/*.cpp **/*.hpp
CI Configuration¶
Environment Variables¶
GITHUB_TOKEN- Automatically provided by GitHub ActionsCODECOV_TOKEN- (Optional) For Codecov.io integration
Caching Strategy¶
- vcpkg packages: Cached by
vcpkg.jsonhash - Build artifacts: Not cached (rebuilt each time)
- Test results: Uploaded as artifacts for 30 days
Supported Platforms¶
| Platform | OS | Compiler | Architecture |
|---|---|---|---|
| Windows | windows-latest | MSVC 2022 | x64 |
| Linux | ubuntu-latest | GCC 11/Clang 14 | x64 |
Debugging CI Failures¶
View Logs¶
- Go to the Actions tab in GitHub
- Click on the failed workflow run
- Select the failed job
- Expand the failed step to view logs
Download Test Artifacts¶
Failed test results are uploaded as artifacts:
1. Go to the workflow run
2. Scroll to Artifacts section
3. Download test-results-windows or test-results-linux
Common Issues¶
Format Check Fails¶
Problem: Code style doesn't match clang-format rules
Solution:
Build Fails (Windows)¶
Problem: MSVC compiler errors
Solution: - Check that all headers are included - Verify Windows-specific code paths - Review compiler output in Actions logs
Tests Fail¶
Problem: Unit tests failing in CI but passing locally
Solution: - Check for platform-specific issues - Verify test data paths are relative - Review uploaded test artifacts
Cache Miss¶
Problem: vcpkg cache not being used
Solution:
- Manually trigger cache-deps.yml workflow
- Verify vcpkg.json hasn't changed
- Check cache key in workflow logs
Workflow Maintenance¶
Updating Dependencies¶
When adding new vcpkg dependencies:
1. Update vcpkg.json
2. Manually trigger "Cache Dependencies" workflow
3. Wait for cache to update before next CI run
Modifying Workflows¶
To update workflows:
1. Edit .github/workflows/*.yml
2. Test locally using act (optional)
3. Push to a feature branch
4. Create PR to review changes
Performance Optimization¶
Current CI times (approximate): - Format check: ~2 minutes - Windows build: ~10 minutes (5 minutes with cache) - Linux build: ~8 minutes (3 minutes with cache) - Static analysis: ~5 minutes - Total: ~25 minutes (15 minutes with cache)
Security¶
Secrets Management¶
No secrets are required for basic CI/CD. Optional secrets:
- CODECOV_TOKEN - For coverage upload
- RELEASE_TOKEN - For automated releases (uses default GITHUB_TOKEN)
Permissions¶
Workflows use minimal permissions:
- contents: read - Default for checkout
- contents: write - Only for releases
- No access to secrets or sensitive data
๐ Additional Resources¶
๐ฏ Quality Standards¶
All PRs must pass: - โ Format check (clang-format) - โ Build on all platforms - โ All tests pass - โ Coverage โฅ70% - โ No security issues - โ Complexity CCN <15
Maintained by: AudioLab DevOps Team Last Updated: 2025-10-08