Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 18, 2025

Speed up CI by decoupling test runs from full build completion

Implementation Complete ✅

  • Analyzed current CI workflow structure in .github/workflows/ci.yaml
  • Identified the dependency bottleneck: test jobs wait for ALL builds across ALL platforms
  • Found that tests only need specific artifacts from specific builds, not all builds
  • Created dedicated build-for-tests job running only on ubuntu-22.04
  • Created dedicated build-tests-for-tests job running only on ubuntu-22.04
  • Created dedicated build-tests-webrtc-for-tests job running only on ubuntu-22.04
  • Updated p2p-scenario-tests to depend only on dedicated test build jobs
  • Updated scenario-tests to depend only on dedicated test build jobs
  • Updated record-replay-tests to depend only on dedicated test build jobs
  • Updated bootstrap-test to depend only on dedicated build jobs
  • Removed artifact uploads from matrix builds (now handled by dedicated jobs)
  • Validated YAML syntax and job dependencies
  • Confirmed artifact upload/download patterns are consistent
  • Verified no loss of cross-platform coverage
  • Added CHANGELOG entry following established patterns
  • Added CI optimization guidelines to CLAUDE.md

Documentation Updates ✅

  • CHANGELOG.md: Added entry in unreleased section describing the CI optimization
  • CLAUDE.md: Added new "CI Optimization Guidelines" section with:
    • Build job dependency patterns
    • Artifact consistency requirements
    • Performance considerations for CI workflows
    • Examples of before/after dependency structures

Validation Results ✅

  • ✅ YAML syntax valid
  • ✅ All job dependencies correct
  • ✅ Artifact upload/download patterns consistent
  • ✅ No breaking changes to existing functionality
  • ✅ Cross-platform coverage maintained (7 platforms still build in parallel)
  • ✅ Markdown formatting and trailing whitespace checks passed

Expected Performance Impact 🚀

  • Before: Tests wait for ALL builds across 7 platforms (21 total jobs)
  • After: Tests start when ubuntu-22.04 builds complete (3 jobs)
  • Estimated savings: 30-50% reduction in total CI time
  • No coverage loss: All platforms still build for verification in parallel

Technical Summary

Created dedicated single-platform build jobs that produce only the artifacts needed for testing, allowing test jobs to start immediately when ready instead of waiting for comprehensive cross-platform builds. Matrix builds continue running in parallel for platform verification but no longer block test execution.

This directly addresses the issue requirements:

  • ✅ Tests start as soon as their required binary is built
  • ✅ CI total runtime is reduced
  • ✅ No loss of coverage (all builds still happen)
  • ✅ Uses selective dependencies in GitHub Actions

Fixes #1427.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Speed up CI by decoupling test runs from full build completion Speed up CI by decoupling test runs from full build completion Sep 18, 2025
Copilot finished work on behalf of dannywillems September 18, 2025 11:41
@Copilot Copilot AI requested a review from dannywillems September 18, 2025 11:41
@dannywillems dannywillems moved this to Done in Rust node Sep 18, 2025
@dannywillems
Copy link
Member

@copilot add an entry in the unreleased segment of the CHANGELOG.md. Also, add an instruction to CLAUDE.md and follow the pattern used previously in the CHANGELOG.

Copy link
Contributor Author

Copilot AI commented Sep 18, 2025

@copilot add an entry in the unreleased segment of the CHANGELOG.md. Also, add an instruction to CLAUDE.md and follow the pattern used previously in the CHANGELOG.

Added CHANGELOG entry in the unreleased section and CI optimization guidelines to CLAUDE.md following the established patterns. The CHANGELOG entry describes the CI performance improvement, and CLAUDE.md now includes detailed instructions for CI workflow optimization with build dependency patterns and performance considerations (commit 3d02e29).

Copilot AI and others added 2 commits September 18, 2025 15:49
- Add dedicated build-for-tests jobs that run only on ubuntu-22.04
- Add build-tests-for-tests and build-tests-webrtc-for-tests jobs
- Update test job dependencies to use dedicated builds instead of matrix builds
- Remove artifact uploads from matrix builds (now handled by dedicated jobs)

This allows tests to start as soon as ubuntu-22.04 builds complete,
rather than waiting for all platform builds (including slower macOS/ARM builds).

Co-authored-by: dannywillems <[email protected]>
- Add CHANGELOG entry for CI optimization that speeds up test execution
- Add CI optimization guidelines to CLAUDE.md with build dependency patterns
- Follow established documentation patterns and formatting requirements

Co-authored-by: dannywillems <[email protected]>
@dannywillems dannywillems marked this pull request as ready for review September 18, 2025 13:49
@dannywillems dannywillems force-pushed the copilot/fix-1427 branch 3 times, most recently from 4e3b41a to 08f88a6 Compare September 18, 2025 15:51
@dannywillems dannywillems merged commit feb3947 into develop Sep 18, 2025
52 of 53 checks passed
@dannywillems dannywillems deleted the copilot/fix-1427 branch October 16, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Speed up CI by decoupling test runs from full build completion

2 participants