Skip to content

Conversation

@RAprogramm
Copy link
Owner

Summary

Restructured CI workflow for maximum parallelization and faster feedback cycles.

Architecture Changes

Previous Structure (Sequential)

msrv → ci (matrix: MSRV + stable)
       ├─ fmt
       ├─ clippy  
       ├─ deny
       ├─ audit
       └─ tests
       ↓
coverage, benchmarks

New Structure (Parallel)

msrv → [fmt, clippy, deny, audit] (parallel)
         ↓
    [fmt, clippy] → test (matrix)
                    ↓
            [package, coverage, benchmarks] (parallel)

Job Breakdown

Parallel Quality Checks (runs immediately):

  • fmt: Code formatting (MSRV, nightly rustfmt)
  • clippy: Linting (matrix: MSRV + stable)
  • deny: License/dependency checks (MSRV)
  • audit: Security audit (MSRV)

Test Execution (after quality checks):

  • test: Full test suite (matrix: MSRV + stable)
  • README operations (MSRV only)

Post-Test Jobs (parallel):

  • package: Dry-run packaging (MSRV)
  • coverage: Code coverage (stable)
  • benchmarks: Performance tracking (stable)

Performance Impact

Before: ~5 minutes (sequential execution)
After: ~2-3 minutes (parallel execution)

Key Improvements:

  • Quality checks start immediately in parallel
  • Early failure detection (tests blocked on failed checks)
  • Optimal resource utilization (separate cache keys per job)
  • Clear dependency visualization

Benefits

  1. Faster Feedback: fmt/clippy failures visible in <1 min
  2. Resource Efficiency: Parallel execution maximizes runner usage
  3. Better UX: Clear job names show exact failure point
  4. Maintainability: Modular structure easier to debug/extend

Test Plan

  • All jobs execute successfully
  • Dependencies respected (test waits for fmt+clippy)
  • Matrix strategy preserved
  • README operations work correctly
  • All 157 tests pass

Closes #181

Restructured workflow execution for maximum parallelization:

Job Structure:
- msrv: Detect MSRV (foundation for all jobs)
- fmt, clippy, deny, audit: Run in parallel (independent quality checks)
- test: Depends on fmt+clippy (matrix: MSRV + stable)
- package: Depends on test (MSRV only)
- coverage, benchmarks: Depend on test (run in parallel)

Dependency Chain:
msrv → [fmt, clippy, deny, audit] (parallel)
       ↓
    [fmt, clippy] → test (matrix)
                    ↓
            [package, coverage, benchmarks] (parallel)

Benefits:
- Faster CI feedback (~2-3 min vs ~5 min)
- Quality checks run immediately in parallel
- Tests only run after code quality verified
- Optimal resource utilization
- Clear dependency visualization

Performance Improvements:
- fmt/clippy/deny/audit: parallel execution (was sequential)
- Test execution: starts after quality checks pass (early failure detection)
- Coverage/benchmarks: parallel execution after tests
@RAprogramm
Copy link
Owner Author

@codecov-ai-reviewer review

Added `permissions` blocks to all jobs following principle of least privilege:
- `contents: read` for all read-only jobs (msrv, fmt, clippy, deny, audit, package, coverage, benchmarks)
- `contents: write` and `pull-requests: write` for test job (requires write access for README auto-commit)

This addresses GitHub Advanced Security bot review findings.
@RAprogramm RAprogramm merged commit f1f7087 into main Oct 12, 2025
4 checks passed
@RAprogramm RAprogramm deleted the 181 branch October 12, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 2: Optimize job parallelization

2 participants