ci: parallel Debian build and concurrency cancel for PRs#4056
Open
grandixximo wants to merge 2 commits into
Open
ci: parallel Debian build and concurrency cancel for PRs#4056grandixximo wants to merge 2 commits into
grandixximo wants to merge 2 commits into
Conversation
debuild leaves dpkg-buildpackage in serial mode unless DEB_BUILD_OPTIONS=parallel=N is in the environment. dh_auto_build honours that variable and translates it into make -jN, so opting in fans out the C/C++ build and the per-language doc rules across all the runner's CPUs. Local measurement on an 8-core box: binary-indep wall time 32 min -> 7 min for the doc-only stage. build-doc.sh already passes -j directly to make; this matches that behaviour for the deb package CI jobs.
Add a concurrency block keyed on workflow + ref so a fresh push to a pull request automatically cancels any still-running prior run for that ref. cancel-in-progress is gated on the pull_request event, so master / release / check_suite triggers are left alone (they should never cancel themselves).
11 tasks
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.
Two independent CI improvements split out of #4053 (asciidoctor docs migration) so they benefit every branch immediately.
1. Parallel Debian build
build-package-arch.shandbuild-package-indep.shnow setDEB_BUILD_OPTIONS="parallel=$(nproc)".dh_auto_buildhonours this and passes-jNtomake; without itdebuildleaves the package build single-threaded. Local measurement on an 8-core box: the doc-onlybinary-indepbuild drops from ~32 min to ~7 min. The 4-CPUubuntu-24.04runners see proportional gains; expected ~3x on per-job wall time.Applies the same change in both scripts so
package-archandpackage-indepmatrix jobs both pick it up.2. Concurrency cancel-in-progress
When a new push to a pull request lands, the prior in-flight run for that ref gets cancelled. Gated on
pull_requestevents only:master/release/check_suitetriggers are left alone, so a tagged release or a manually-rerequested check-suite never cancels itself.Why split
Both pieces are general infrastructure useful for every branch and have no dependency on the docs migration. Splitting them out lets them merge ahead of #4053 and start helping immediately; #4053 will rebase to drop these changes once this lands.
Test plan
package-archandpackage-indepjobs on this PR's CI run finish faster than the baseline (compare per-job timings against a recent master run).