ci: split the suite into parallel jobs - #101
Merged
Merged
Conversation
One sequential job took ~9m45s, and the two heaviest steps do not depend on each other at all: the yourssh_rdp cargo tests (165s) and the app suite (176s). Nothing under app/test loads the native bridge — verified by hiding assets/native and running the RDP/VNC model and workspace tests, which still pass — so the app work never needed to queue behind Rust. Split into an `app` job and a `bridge` matrix job per crate. Each crate keeps its cargo tests, build.sh and Dart tests together: both cargo invocations use --release, so the library build reuses the test build's compilation, and splitting them would compile the IronRDP / vnc-rs tree twice. fail-fast is off so a broken RDP crate does not hide a broken VNC crate, and rust-cache is keyed per crate workspace. Wall clock becomes the longest job (~5 min, the RDP crate) instead of the sum. It costs two extra Flutter/toolchain setups in compute — cheaper waiting, more machine time. master's branch protection requires a status check literally named "test", so the split keeps a job with that name: an aggregate gate that needs both others and fails unless both succeeded. It runs with `always()` — otherwise a failure upstream would skip it and leave the required check pending forever rather than red.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The suite ran as one sequential job (~9m45s) even though its two heaviest steps are independent:
yourssh_rdpcargo tests (165s) and the app suite (176s). Split into parallel jobs so wall clock is the longest job rather than the sum.Changes
appjob — apt deps,pub get,analyze,flutter test. No Rust: nothing underapp/testloads the native bridge. Verified by hidingpackages/*/assets/nativeand running the RDP/VNC model + workspace tests, which still pass.bridgematrix job (yourssh_rdp,yourssh_vnc) — cargo tests,build.sh, and the package's Dart tests stay in one job per crate on purpose: both cargo invocations use--release, so the library build reuses the test build's compilation. Splitting them would compile the IronRDP / vnc-rs tree twice.fail-fast: falseso one broken crate doesn't mask the other;rust-cachekeyed per crate workspace.testaggregate gate —master's branch protection requires a status check named exactlytest, so that name has to survive the split. This jobneeds: [app, bridge]and fails unless both succeeded. It usesif: always(), because otherwise an upstream failure would skip it and leave the required check pending forever instead of red.Measured baseline (run 32627632086, the last sequential green)
yourssh_rdpyourssh_vncExpected after the split: ~5 min wall clock (the RDP crate job is the critical path), at the cost of two extra Flutter/toolchain setups in compute.
Type of change
ci— CI configuration onlyHow was this tested?
This PR is its own test: it targets
develop, so the four checks appearing here —app,bridge (yourssh_rdp),bridge (yourssh_vnc),test— are the change working. Compare the run duration against 32627632086.python3 -c "import yaml; yaml.safe_load(...)"confirms the file parses and resolves to the three jobs with the gate wired to both.