Skip to content

Commit 631ddbb

Browse files
pks-tgitster
authored andcommitted
gitlab-ci: exercise Git on Windows
Add jobs that exercise Git on Windows. Unfortunately, building and especially testing Git on Windows is inherently slower compared to other Unix-like systems, mostly because spawning processes is way slower. We thus use the same layout as we use in GitHub Actions, where we have one build job, and then pass on the resulting build artifacts to ten test jobs that split up the work across each other. Unfortunately, the GitLab runners for Windows machines are embarassingly slow by themselves. So while this strategy leads to around 20 minutes of build time in GitHub Actions, the same pipeline takes around an hour in GitLab CI. Still, having late coverage is certainly better than having none at all. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 05a928a commit 631ddbb

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.gitlab-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ default:
22
timeout: 2h
33

44
stages:
5+
- build
56
- test
67
- analyze
78

@@ -108,6 +109,38 @@ test:osx:
108109
- t/failed-test-artifacts
109110
when: on_failure
110111

112+
build:mingw64:
113+
stage: build
114+
tags:
115+
- saas-windows-medium-amd64
116+
variables:
117+
NO_PERL: 1
118+
before_script:
119+
- ./ci/install-sdk.ps1 -directory "git-sdk"
120+
script:
121+
- git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
122+
artifacts:
123+
paths:
124+
- artifacts
125+
- git-sdk
126+
127+
test:mingw64:
128+
stage: test
129+
tags:
130+
- saas-windows-medium-amd64
131+
needs:
132+
- job: "build:mingw64"
133+
artifacts: true
134+
before_script:
135+
- git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
136+
- New-Item -Path .git/info -ItemType Directory
137+
- New-Item .git/info/exclude -ItemType File -Value "/git-sdk"
138+
script:
139+
- git-sdk/usr/bin/bash.exe -l -c "ci/run-test-slice.sh $CI_NODE_INDEX $CI_NODE_TOTAL"
140+
after_script:
141+
- git-sdk/usr/bin/bash.exe -l -c 'ci/print-test-failures.sh'
142+
parallel: 10
143+
111144
test:fuzz-smoke-tests:
112145
image: ubuntu:latest
113146
stage: test

0 commit comments

Comments
 (0)