Skip to content

AstroAir/QtLucide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtLucide CI/CD Documentation

This document describes the modernized CI/CD pipeline for QtLucide, designed with security, performance, and reliability in mind.

🚀 Overview

Our CI/CD pipeline consists of several workflows that ensure code quality, security, and reliable releases:

  • CI Workflow (ci.yml) - Main continuous integration
  • Release Workflow (release.yml) - Automated releases with modern practices
  • XMake Workflow (xmake.yml) - Alternative build system testing
  • Security Workflow (security.yml) - Comprehensive security scanning
  • Performance Workflow (performance.yml) - Performance benchmarking and memory leak detection

🔧 Workflows

CI Workflow (ci.yml)

Triggers: Push to main branches, pull requests, manual dispatch

Features:

  • Modern Qt Versions: Tests with Qt 6.7.3 and 6.8.0
  • Multi-Platform: Ubuntu 22.04, Windows 2022, macOS 13/14
  • Security Hardening: Step Security Harden Runner
  • Advanced Caching: Qt installation and build artifacts
  • Code Coverage: LCOV coverage reporting with Codecov integration
  • Code Quality: clang-format, cppcheck, clang-tidy
  • Container Builds: Docker multi-arch builds with SBOM generation
  • Parallel Builds: Optimized build performance

Matrix Strategy:

- Ubuntu 22.04 + Qt 6.8.0 + Release + Coverage
- Ubuntu 22.04 + Qt 6.7.3 + Debug
- Windows 2022 + Qt 6.8.0/6.7.3 + Release/Debug
- macOS 14/13 + Qt 6.8.0/6.7.3 + Release/Debug

Release Workflow (release.yml)

Triggers: Git tags (v*), manual dispatch

Modern Features:

  • Modern Release Action: Uses softprops/action-gh-release@v2
  • Automated Changelog: Extracts from CHANGELOG.md
  • Multi-Platform Builds: Linux, Windows, macOS
  • Security: SBOM generation, build provenance attestation
  • Code Signing: Windows code signing support (when certificates available)
  • Checksums: SHA256 checksums for all artifacts
  • Container Publishing: Multi-arch container images to GHCR
  • Pre-release Detection: Automatic pre-release detection for alpha/beta/rc tags

Security Workflow (security.yml)

Triggers: Push, pull requests, weekly schedule, manual dispatch

Security Tools:

  • 🔒 CodeQL Analysis: GitHub's semantic code analysis
  • 🔒 Dependency Review: Automated dependency vulnerability scanning
  • 🔒 Trivy Scanner: Comprehensive vulnerability scanning
  • 🔒 Semgrep: Static analysis security scanner
  • 🔒 OSV Scanner: Open Source Vulnerability scanner
  • 🔒 TruffleHog: Secret detection
  • 🔒 SBOM Generation: Software Bill of Materials
  • 🔒 OSSF Scorecard: Security posture assessment

Performance Workflow (performance.yml)

Triggers: Push to main, pull requests, weekly schedule, manual dispatch

Performance Features:

  • 📊 Google Benchmark: Comprehensive performance benchmarking
  • 📊 Memory Profiling: Valgrind massif memory profiling
  • 📊 Memory Leak Detection: Valgrind memcheck
  • 📊 Performance Reports: HTML reports deployed to GitHub Pages
  • 📊 PR Comments: Automatic performance results in pull requests

XMake Workflow (xmake.yml)

Triggers: Push, pull requests, manual dispatch

XMake Features:

  • 🔨 Alternative Build System: Tests XMake alongside CMake
  • 🔨 Build Comparison: Compares CMake vs XMake outputs
  • 🔨 Installation Testing: Verifies package installation
  • 🔨 Multi-Platform: Ubuntu, Windows, macOS support

🛡️ Security Features

Supply Chain Security

  • SBOM Generation: Software Bill of Materials for all builds
  • Build Provenance: Cryptographic attestation of build integrity
  • Dependency Scanning: Automated vulnerability detection
  • Secret Detection: Prevents credential leaks

Runtime Security

  • Harden Runner: Network egress monitoring and restriction
  • Minimal Permissions: Principle of least privilege for all workflows
  • Security Scanning: Multiple security tools for comprehensive coverage

📈 Performance Monitoring

Benchmarking

  • Automated Benchmarks: Performance regression detection
  • Memory Profiling: Memory usage analysis
  • Leak Detection: Memory leak prevention
  • Performance Reports: Visual performance tracking

Optimization

  • Parallel Builds: Optimized build times
  • Smart Caching: Reduced CI execution time
  • Artifact Management: Efficient artifact handling

🔄 Dependency Management

Dependabot Configuration

  • GitHub Actions: Weekly updates for workflow dependencies
  • Python Dependencies: Weekly updates for build tools
  • Docker Dependencies: Weekly updates for container images
  • Grouped Updates: Batched minor/patch updates

📦 Artifact Management

Build Artifacts

  • Multi-Platform Packages: Linux (tar.gz), Windows (zip), macOS (tar.gz)
  • Container Images: Multi-arch Docker images (amd64, arm64)
  • Debug Information: Build logs and debug artifacts on failure
  • Retention Policies: Optimized storage with appropriate retention

Release Assets

  • Checksums: SHA256 verification for all releases
  • SBOM: Software Bill of Materials for transparency
  • Signatures: Build provenance attestation
  • Documentation: Automated changelog integration

🚦 Quality Gates

Code Quality

  • Formatting: clang-format enforcement
  • Static Analysis: cppcheck and clang-tidy
  • Security Analysis: Multiple security scanners
  • Coverage: Code coverage reporting and tracking

Testing

  • Unit Tests: Comprehensive test suite
  • Integration Tests: Cross-platform compatibility
  • Performance Tests: Regression prevention
  • Memory Tests: Leak detection and profiling

🔧 Configuration

Environment Variables

CMAKE_BUILD_PARALLEL_LEVEL: 4    # Parallel build jobs
CTEST_PARALLEL_LEVEL: 4          # Parallel test execution
XMAKE_PARALLEL_JOBS: 4           # XMake parallel jobs

Secrets Required

  • GITHUB_TOKEN: Automatically provided
  • CODECOV_TOKEN: For coverage reporting (optional)
  • WINDOWS_CERTIFICATE: For Windows code signing (optional)
  • WINDOWS_CERTIFICATE_PASSWORD: For Windows code signing (optional)

📊 Monitoring and Reporting

GitHub Pages

  • Performance Reports: Automated performance tracking
  • Documentation: API documentation deployment
  • Coverage Reports: Code coverage visualization

Notifications

  • PR Comments: Automated performance and security feedback
  • Security Alerts: Vulnerability notifications
  • Build Status: Comprehensive build reporting

🎯 Best Practices Implemented

  1. Security First: Comprehensive security scanning and hardening
  2. Performance Monitoring: Continuous performance tracking
  3. Supply Chain Security: SBOM and provenance attestation
  4. Modern Tooling: Latest versions of all tools and actions
  5. Efficient Caching: Optimized build times
  6. Multi-Platform Support: Comprehensive platform coverage
  7. Automated Quality: Enforced code quality standards
  8. Transparent Reporting: Comprehensive reporting and feedback

🔄 Migration from Legacy CI

Key Improvements

  • Updated Qt Versions: 6.5.0/6.6.0 → 6.7.3/6.8.0
  • Modern Actions: Deprecated actions replaced with current versions
  • Enhanced Security: Added comprehensive security scanning
  • Performance Tracking: Added benchmarking and profiling
  • Better Caching: Improved build performance
  • Container Support: Added Docker builds and publishing
  • Supply Chain Security: SBOM and attestation support

Breaking Changes

  • Minimum Qt version now 6.7.3
  • Some older OS versions no longer supported
  • Additional security requirements for releases

This modernized CI/CD pipeline provides enterprise-grade security, performance monitoring, and reliability while maintaining compatibility with the existing QtLucide codebase.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •