Skip to content

Commit bb77905

Browse files
committed
azure-pipelines: parallelise the Windows mingw-w64-git build
The 'Build mingw-w64-git package' step calls `please.sh build-mingw-w64-git ... HEAD`, which delegates to `makepkg-mingw` and ultimately to Git's top-level Makefile. With no `MAKEFLAGS` in the task's environment, makepkg-mingw runs `make` without an explicit `-j`, which leaves the bulk of the per-file work (generating the perl scripts, building the doc tree, running the contrib targets, compiling each .c separately) running serially on a single core. Like the SDK sparse checkout (parallelised via `checkout.workers=56` in the previous commit), most of the wall-clock time here is spent shuffling small files in and out of the SDK's pacman cache and the generated build tree, not in the compiler itself; the work is predominantly I/O-bound, so the right factor is well above the agent core count rather than `$(nproc)`. Hoist the previously ESRP-conditional `env:` block on the Windows 'Build mingw-w64-git package' step out of the `${{ if }}` expression so MAKEFLAGS can sit unconditionally next to the ESRP-only entries (which now nest inside the same `env:` via a compile-time `${{ if }}: ESRP_TOOL: ... ESRP_AUTH: ... SYSTEM_ACCESSTOKEN: ...` insert), and add `MAKEFLAGS: -j15`. A short comment captures the I/O-bound rationale so a future maintainer doesn't try to "fix" it down to `$(nproc)`. Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 3a1b54d commit bb77905

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,16 @@ extends:
254254
bash "$apply" "$patches/git-sdk" "/$(mingwprefix)"
255255
- task: Bash@3
256256
displayName: 'Build mingw-w64-git package'
257-
${{ if eq(parameters.esrp, true) }}:
258-
env:
257+
env:
258+
# The mingw-w64-git build is heavy on parallel work
259+
# that the underlying compile (and especially the
260+
# contrib + doc + i18n + perl-script generation
261+
# stages) can soak up far more aggressively than the
262+
# core count would suggest, since most of it is I/O
263+
# against the SDK's pacman cache and the make rules
264+
# have very few real serialisation points.
265+
MAKEFLAGS: -j15
266+
${{ if eq(parameters.esrp, true) }}:
259267
ESRP_TOOL: $(ESRP_TOOL)
260268
ESRP_AUTH: $(ESRP_AUTH)
261269
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

0 commit comments

Comments
 (0)