Optimize CI runs, by avoiding unnecessary rebuilds #2833
Merged
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.
Well, parallelizing builds, even if most of the work is duplicated, is usually good. (If you're not paying for CI runs)
This is something valid also for
python-for-android
artifacts builds, as parallelizingAPK
andAAB
builds takes ~14 minutes less than a build that performs APK (debug) + AAB (release) build in the same run.But ... even if we're not paying for CI runs (thank you GitHub), workers are capped at a maximum concurrent number (and in the case of our Apple Silicon M1 self-hosted runner, only one instance per time is available), which means that other jobs need to wait the completion of previous ones. (making it slower than non-parallelized builds)
Some data, on Ubuntu:
1h 19m 47s
(keeps only 1 instance locked for the entire build)1h 5m 21s
+ AAB1h 8m 26s
(keeps 2 instances locked for the entire build)This PR merges APK and AAB builds, avoiding unnecessary rebuilds.
A lot more could be done to improve our CI wait time, but that's a start.