1
1
variables :
2
2
Agent.Source.Git.ShallowFetchDepth : 1
3
+ GIT_CONFIG_PARAMETERS : " 'checkout.workers=56' 'user.name=CI' 'user.email=ci@git'"
3
4
4
5
jobs :
5
6
- job : windows_build
9
10
vmImage : windows-latest
10
11
timeoutInMinutes : 240
11
12
steps :
12
- - powershell : |
13
- $urlbase = "https://dev.azure.com/git-for-windows/git/_apis/build/builds"
14
- $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=22&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
15
- $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[1].resource.downloadUrl
16
- (New-Object Net.WebClient).DownloadFile($downloadUrl,"git-sdk-64-minimal.zip")
17
- Expand-Archive git-sdk-64-minimal.zip -DestinationPath . -Force
18
- Remove-Item git-sdk-64-minimal.zip
19
-
13
+ - bash : git clone --bare --depth=1 --filter=blob:none --single-branch -b main https://github.com/git-for-windows/git-sdk-64
14
+ displayName : ' clone git-sdk-64'
15
+ - bash : git clone --depth=1 --single-branch -b main https://github.com/git-for-windows/build-extra
16
+ displayName : ' clone build-extra'
17
+ - bash : sh -x ./build-extra/please.sh create-sdk-artifact --sdk=git-sdk-64.git --out=git-sdk-64-minimal minimal-sdk
18
+ displayName : ' build git-sdk-64-minimal-sdk'
19
+ - bash : |
20
20
# Let Git ignore the SDK and the test-cache
21
- "/git-sdk-64-minimal/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude"
22
- displayName: 'Download git-sdk-64-minimal'
23
- - powershell : |
24
- & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
25
- ci/make-test-artifacts.sh artifacts
26
- "@
27
- if (!$?) { exit(1) }
21
+ printf "%s\n" /git-sdk-64.git/ /build-extra/ /git-sdk-64-minimal/ /test-cache/ >>'.git/info/exclude'
22
+ displayName: 'Ignore untracked directories'
23
+ - bash : ci/make-test-artifacts.sh artifacts
28
24
displayName : Build
29
25
env :
30
26
HOME : $(Build.SourcesDirectory)
31
27
MSYSTEM : MINGW64
32
28
DEVELOPER : 1
33
29
NO_PERL : 1
30
+ PATH : " $(Build.SourcesDirectory)\\ git-sdk-64-minimal\\ mingw64\\ bin;$(Build.SourcesDirectory)\\ git-sdk-64-minimal\\ usr\\ bin;C:\\ Windows\\ system32;C:\\ Windows;C:\\ Windows\\ system32\\ wbem"
34
31
- task : PublishPipelineArtifact@0
35
32
displayName : ' Publish Pipeline Artifact: test artifacts'
36
33
inputs :
@@ -62,29 +59,27 @@ jobs:
62
59
inputs :
63
60
artifactName : ' git-sdk-64-minimal'
64
61
targetPath : ' $(Build.SourcesDirectory)\git-sdk-64-minimal'
65
- - powershell : |
66
- & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
67
- test -f artifacts.tar.gz || {
68
- echo No test artifacts found\; skipping >&2
69
- exit 0
70
- }
71
- tar xf artifacts.tar.gz || exit 1
62
+ - bash : |
63
+ test -f artifacts.tar.gz || {
64
+ echo No test artifacts found\; skipping >&2
65
+ exit 0
66
+ }
67
+ tar xf artifacts.tar.gz || exit 1
72
68
73
- # Let Git ignore the SDK and the test-cache
74
- printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude
69
+ # Let Git ignore the SDK and the test-cache
70
+ printf '%s\n' /git-sdk-64.git/ /build-extra/ /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude
75
71
76
- ci/run-test-slice.sh `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE || {
77
- ci/print-test-failures.sh
78
- exit 1
79
- }
80
- "@
81
- if (!$?) { exit(1) }
72
+ ci/run-test-slice.sh $SYSTEM_JOBPOSITIONINPHASE $SYSTEM_TOTALJOBSINPHASE || {
73
+ ci/print-test-failures.sh
74
+ exit 1
75
+ }
82
76
displayName: 'Test (parallel)'
83
77
env:
84
78
HOME: $(Build.SourcesDirectory)
85
79
MSYSTEM: MINGW64
86
80
NO_SVN_TESTS: 1
87
81
GIT_TEST_SKIP_REBASE_P: 1
82
+ PATH: "$(Build.SourcesDirectory)\\git-sdk-64-minimal\\mingw64\\bin;$(Build.SourcesDirectory)\\git-sdk-64-minimal\\usr\\bin\\core_perl;$(Build.SourcesDirectory)\\git-sdk-64-minimal\\usr\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\system32\\wbem"
88
83
- task : PublishTestResults@2
89
84
displayName : ' Publish Test Results **/TEST-*.xml'
90
85
inputs :
@@ -107,29 +102,24 @@ jobs:
107
102
vmImage : windows-latest
108
103
timeoutInMinutes : 240
109
104
steps :
110
- - powershell : |
111
- $urlbase = "https://dev.azure.com/git-for-windows/git/_apis/build/builds"
112
- $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=22&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
113
- $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[1].resource.downloadUrl
114
- (New-Object Net.WebClient).DownloadFile($downloadUrl,"git-sdk-64-minimal.zip")
115
- Expand-Archive git-sdk-64-minimal.zip -DestinationPath . -Force
116
- Remove-Item git-sdk-64-minimal.zip
117
-
105
+ - bash : git clone --bare --depth=1 --filter=blob:none --single-branch -b main https://github.com/git-for-windows/git-sdk-64
106
+ displayName : ' clone git-sdk-64'
107
+ - bash : git clone --depth=1 --single-branch -b main https://github.com/git-for-windows/build-extra
108
+ displayName : ' clone build-extra'
109
+ - bash : sh -x ./build-extra/please.sh create-sdk-artifact --sdk=git-sdk-64.git --out=git-sdk-64-minimal minimal-sdk
110
+ displayName : ' build git-sdk-64-minimal-sdk'
111
+ - bash : |
118
112
# Let Git ignore the SDK and the test-cache
119
- "/git-sdk-64-minimal/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude"
120
- displayName: 'Download git-sdk-64-minimal'
121
- - powershell : |
122
- & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
123
- make NDEBUG=1 DEVELOPER=1 vcxproj
124
- "@
125
- if (!$?) { exit(1) }
113
+ printf "%s\n" /git-sdk-64-minimal/ /test-cache/ >>'.git/info/exclude'
114
+ displayName: 'Ignore untracked directories'
115
+ - bash : make NDEBUG=1 DEVELOPER=1 vcxproj
126
116
displayName : Generate Visual Studio Solution
127
117
env :
128
118
HOME : $(Build.SourcesDirectory)
129
119
MSYSTEM : MINGW64
130
120
DEVELOPER : 1
131
121
NO_PERL : 1
132
- GIT_CONFIG_PARAMETERS : "'user.name=CI' 'user.email=ci@ git' "
122
+ PATH : " $(Build.SourcesDirectory) \\ git-sdk-64-minimal \\ mingw64 \\ bin;$(Build.SourcesDirectory) \\ git-sdk-64-minimal \\ usr \\ bin;C: \\ Windows \\ system32;C: \\ Windows;C: \\ Windows \\ system32 \\ wbem "
133
123
- powershell : |
134
124
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
135
125
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
@@ -145,14 +135,10 @@ jobs:
145
135
configuration : Release
146
136
maximumCpuCount : 4
147
137
msbuildArguments : /p:PlatformToolset=v142
148
- - powershell : |
149
- & compat\vcbuild\vcpkg_copy_dlls.bat release
150
- if (!$?) { exit(1) }
151
- & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
152
- mkdir -p artifacts &&
153
- eval \"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts | grep ^tar)\"
154
- "@
155
- if (!$?) { exit(1) }
138
+ - bash : |
139
+ ./compat/vcbuild/vcpkg_copy_dlls.bat release &&
140
+ mkdir -p artifacts &&
141
+ eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts | grep ^tar)"
156
142
displayName: Bundle artifact tar
157
143
env:
158
144
HOME: $(Build.SourcesDirectory)
@@ -161,6 +147,7 @@ jobs:
161
147
NO_PERL: 1
162
148
MSVC: 1
163
149
VCPKG_ROOT: $(Build.SourcesDirectory)\compat\vcbuild\vcpkg
150
+ PATH: "$(Build.SourcesDirectory)\\git-sdk-64-minimal\\mingw64\\bin;$(Build.SourcesDirectory)\\git-sdk-64-minimal\\usr\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\system32\\wbem"
164
151
- powershell : |
165
152
$tag = (Invoke-WebRequest -UseBasicParsing "https://gitforwindows.org/latest-tag.txt").content
166
153
$version = (Invoke-WebRequest -UseBasicParsing "https://gitforwindows.org/latest-version.txt").content
@@ -191,30 +178,28 @@ jobs:
191
178
inputs :
192
179
artifactName : ' vs-artifacts'
193
180
targetPath : ' $(Build.SourcesDirectory)'
194
- - powershell : |
195
- & PortableGit\git-cmd.exe --command=usr\bin\bash.exe -lc @"
196
- test -f artifacts.tar.gz || {
197
- echo No test artifacts found\; skipping >&2
198
- exit 0
199
- }
200
- tar xf artifacts.tar.gz || exit 1
181
+ - bash : |
182
+ test -f artifacts.tar.gz || {
183
+ echo No test artifacts found\; skipping >&2
184
+ exit 0
185
+ }
186
+ tar xf artifacts.tar.gz || exit 1
201
187
202
- # Let Git ignore the SDK and the test-cache
203
- printf '%s\n' /PortableGit/ /test-cache/ >>.git/info/exclude
188
+ # Let Git ignore the SDK and the test-cache
189
+ printf '%s\n' /PortableGit/ /test-cache/ >>.git/info/exclude
204
190
205
- cd t &&
206
- PATH=\"`$PWD/helper:`$PATH\" &&
207
- test-tool.exe run-command testsuite --jobs=10 -V -x --write-junit-xml \
208
- `$(test-tool.exe path-utils slice-tests \
209
- `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE t[0-9]*.sh)
210
- "@
211
- if (!$?) { exit(1) }
191
+ cd t &&
192
+ PATH="$PWD/helper:$PATH" &&
193
+ test-tool.exe run-command testsuite --jobs=10 -V -x --write-junit-xml \
194
+ $(test-tool.exe path-utils slice-tests \
195
+ $SYSTEM_JOBPOSITIONINPHASE $SYSTEM_TOTALJOBSINPHASE t[0-9]*.sh)
212
196
displayName: 'Test (parallel)'
213
197
env:
214
198
HOME: $(Build.SourcesDirectory)
215
199
MSYSTEM: MINGW64
216
200
NO_SVN_TESTS: 1
217
201
GIT_TEST_SKIP_REBASE_P: 1
202
+ PATH: "$(Build.SourcesDirectory)\\PortableGit\\mingw64\\bin;$(Build.SourcesDirectory)\\PortableGit\\usr\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\system32\\wbem"
218
203
- task : PublishTestResults@2
219
204
displayName : ' Publish Test Results **/TEST-*.xml'
220
205
inputs :
0 commit comments