Skip to content

Commit 55d6230

Browse files
dschogitster
authored andcommitted
GitHub ci(windows): speed up initializing Git for Windows' minimal SDK again
It used to be the case that initializing the minimal SDK (i.e. a radically slimmed-down subset of Git for Windows' development environment intended to perform the CI builds and little else) took a bit over one minute, would then be cached, and subsequent jobs would take at most half a dozen seconds to initialize said minimal SDK. It is important that this step is fast because we have to run the test suite in parallel, in a set of matrix jobs, to offset the slowness of the shell-based test suite, and each and every job has to initialize the very same minimal SDK. While it may sound as if parallelizing the jobs might only waste the generously-provided build minutes but at least the _wallclock_ time would pass quick, in reality it matters a lot: Frequently Git for Windows' or GitGitGadget PRs get stuck waiting for quite a while before CI builds start because other PRs' builds still spend substantial amounts of time to run, blocking due to the concurrency limit being reached. Since 91839a8 (ci: create script to set up Git for Windows SDK, 2024-10-09), the situation has worsened: every job that requires the minimal Git for Windows SDK spends roughly two-and-a-half minutes doing so. With the switch away from the GitHub Action `setup-git-for-windows-sdk`, we incurred more downsides: - It is no longer possible for said Action to fix problems independently from the Git repository, e.g. when new rules about GitHub Actions require changes in the way the minimal SDK is initialized. - The minimal SDK was installed specifically outside of the worktree so as not to clutter it nor incur an additional cost to verify that the worktree is clean. Therefore, even if it would be nice to have a shared process between GitHub and GitLab based CI builds, let's switch the GitHub-based CI back to the tried-and-tested `setup-git-for-windows-sdk` Action. This commit partially reverts 91839a8 (ci: create script to set up Git for Windows SDK, 2024-10-09). Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 631ddbb commit 55d6230

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,13 @@ jobs:
113113
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
114114
steps:
115115
- uses: actions/checkout@v4
116-
- name: setup SDK
117-
shell: powershell
118-
run: ci/install-sdk.ps1
116+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
119117
- name: build
120-
shell: powershell
118+
shell: bash
121119
env:
122120
HOME: ${{runner.workspace}}
123121
NO_PERL: 1
124-
run: git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
122+
run: . /etc/profile && ci/make-test-artifacts.sh artifacts
125123
- name: zip up tracked files
126124
run: git archive -o artifacts/tracked.tar.gz HEAD
127125
- name: upload tracked files and build artifacts
@@ -149,12 +147,10 @@ jobs:
149147
- name: extract tracked files and build artifacts
150148
shell: bash
151149
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
152-
- name: setup SDK
153-
shell: powershell
154-
run: ci/install-sdk.ps1
150+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
155151
- name: test
156-
shell: powershell
157-
run: git-sdk/usr/bin/bash.exe -l -c 'ci/run-test-slice.sh ${{matrix.nr}} 10'
152+
shell: bash
153+
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
158154
- name: print test failures
159155
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
160156
shell: bash

0 commit comments

Comments
 (0)