7 displayName: Windows Build
13 if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
14 net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no
15 cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\
17 displayName: 'Mount test-cache'
19 GITFILESHAREPWD: $(gitfileshare.pwd)
21 $urlbase = "https://dev.azure.com/git-for-windows/git/_apis/build/builds"
22 $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=22&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
23 $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[1].resource.downloadUrl
24 (New-Object Net.WebClient).DownloadFile($downloadUrl,"git-sdk-64-minimal.zip")
25 Expand-Archive git-sdk-64-minimal.zip -DestinationPath . -Force
26 Remove-Item git-sdk-64-minimal.zip
28 # Let Git ignore the SDK and the test-cache
29 "/git-sdk-64-minimal/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude"
30 displayName: 'Download git-sdk-64-minimal'
32 & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
33 ci/make-test-artifacts.sh artifacts
38 HOME: $(Build.SourcesDirectory)
42 - task: PublishPipelineArtifact@0
43 displayName: 'Publish Pipeline Artifact: test artifacts'
45 artifactName: 'windows-artifacts'
46 targetPath: '$(Build.SourcesDirectory)\artifacts'
47 - task: PublishPipelineArtifact@0
48 displayName: 'Publish Pipeline Artifact: git-sdk-64-minimal'
50 artifactName: 'git-sdk-64-minimal'
51 targetPath: '$(Build.SourcesDirectory)\git-sdk-64-minimal'
53 if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
54 cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
56 displayName: 'Unmount test-cache'
59 GITFILESHAREPWD: $(gitfileshare.pwd)
62 displayName: Windows Test
63 dependsOn: windows_build
64 condition: succeeded()
71 if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
72 net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no
73 cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\
75 displayName: 'Mount test-cache'
77 GITFILESHAREPWD: $(gitfileshare.pwd)
78 - task: DownloadPipelineArtifact@0
79 displayName: 'Download Pipeline Artifact: test artifacts'
81 artifactName: 'windows-artifacts'
82 targetPath: '$(Build.SourcesDirectory)'
83 - task: DownloadPipelineArtifact@0
84 displayName: 'Download Pipeline Artifact: git-sdk-64-minimal'
86 artifactName: 'git-sdk-64-minimal'
87 targetPath: '$(Build.SourcesDirectory)\git-sdk-64-minimal'
89 & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
90 test -f artifacts.tar.gz || {
91 echo No test artifacts found\; skipping >&2
94 tar xf artifacts.tar.gz || exit 1
96 # Let Git ignore the SDK and the test-cache
97 printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude
99 ci/run-test-slice.sh `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE || {
100 ci/print-test-failures.sh
105 displayName: 'Test (parallel)'
107 HOME: $(Build.SourcesDirectory)
110 GIT_TEST_SKIP_REBASE_P: 1
112 if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
113 cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
115 displayName: 'Unmount test-cache'
118 GITFILESHAREPWD: $(gitfileshare.pwd)
119 - task: PublishTestResults@2
120 displayName: 'Publish Test Results **/TEST-*.xml'
122 mergeTestResults: true
123 testRunTitle: 'windows'
125 publishRunAttachments: false
126 condition: succeededOrFailed()
127 - task: PublishBuildArtifacts@1
128 displayName: 'Publish trash directories of failed tests'
131 PathtoPublish: t/failed-test-artifacts
132 ArtifactName: failed-test-artifacts
135 displayName: linux-clang
136 condition: succeeded()
137 pool: Hosted Ubuntu 1604
140 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
142 sudo apt-get update &&
143 sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2-bin &&
145 export CC=clang || exit 1
147 ci/install-dependencies.sh || exit 1
148 ci/run-build-and-tests.sh || {
149 ci/print-test-failures.sh
153 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
154 displayName: 'ci/run-build-and-tests.sh'
156 GITFILESHAREPWD: $(gitfileshare.pwd)
157 - task: PublishTestResults@2
158 displayName: 'Publish Test Results **/TEST-*.xml'
160 mergeTestResults: true
161 testRunTitle: 'linux-clang'
163 publishRunAttachments: false
164 condition: succeededOrFailed()
165 - task: PublishBuildArtifacts@1
166 displayName: 'Publish trash directories of failed tests'
169 PathtoPublish: t/failed-test-artifacts
170 ArtifactName: failed-test-artifacts
173 displayName: linux-gcc
174 condition: succeeded()
175 pool: Hosted Ubuntu 1604
178 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
180 sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
181 sudo apt-get update &&
182 sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2 language-pack-is git-svn gcc-8 || exit 1
184 ci/install-dependencies.sh || exit 1
185 ci/run-build-and-tests.sh || {
186 ci/print-test-failures.sh
190 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
191 displayName: 'ci/run-build-and-tests.sh'
193 GITFILESHAREPWD: $(gitfileshare.pwd)
194 - task: PublishTestResults@2
195 displayName: 'Publish Test Results **/TEST-*.xml'
197 mergeTestResults: true
198 testRunTitle: 'linux-gcc'
200 publishRunAttachments: false
201 condition: succeededOrFailed()
202 - task: PublishBuildArtifacts@1
203 displayName: 'Publish trash directories of failed tests'
206 PathtoPublish: t/failed-test-artifacts
207 ArtifactName: failed-test-artifacts
210 displayName: osx-clang
211 condition: succeeded()
215 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
219 ci/install-dependencies.sh || exit 1
220 ci/run-build-and-tests.sh || {
221 ci/print-test-failures.sh
225 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1
226 displayName: 'ci/run-build-and-tests.sh'
228 GITFILESHAREPWD: $(gitfileshare.pwd)
229 - task: PublishTestResults@2
230 displayName: 'Publish Test Results **/TEST-*.xml'
232 mergeTestResults: true
233 testRunTitle: 'osx-clang'
235 publishRunAttachments: false
236 condition: succeededOrFailed()
237 - task: PublishBuildArtifacts@1
238 displayName: 'Publish trash directories of failed tests'
241 PathtoPublish: t/failed-test-artifacts
242 ArtifactName: failed-test-artifacts
246 condition: succeeded()
250 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
252 ci/install-dependencies.sh || exit 1
253 ci/run-build-and-tests.sh || {
254 ci/print-test-failures.sh
258 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1
259 displayName: 'ci/run-build-and-tests.sh'
261 GITFILESHAREPWD: $(gitfileshare.pwd)
262 - task: PublishTestResults@2
263 displayName: 'Publish Test Results **/TEST-*.xml'
265 mergeTestResults: true
266 testRunTitle: 'osx-gcc'
268 publishRunAttachments: false
269 condition: succeededOrFailed()
270 - task: PublishBuildArtifacts@1
271 displayName: 'Publish trash directories of failed tests'
274 PathtoPublish: t/failed-test-artifacts
275 ArtifactName: failed-test-artifacts
277 - job: gettext_poison
278 displayName: GETTEXT_POISON
279 condition: succeeded()
280 pool: Hosted Ubuntu 1604
283 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
285 sudo apt-get update &&
286 sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev &&
288 export jobname=GETTEXT_POISON || exit 1
290 ci/run-build-and-tests.sh || {
291 ci/print-test-failures.sh
295 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
296 displayName: 'ci/run-build-and-tests.sh'
298 GITFILESHAREPWD: $(gitfileshare.pwd)
299 - task: PublishTestResults@2
300 displayName: 'Publish Test Results **/TEST-*.xml'
302 mergeTestResults: true
303 testRunTitle: 'gettext-poison'
305 publishRunAttachments: false
306 condition: succeededOrFailed()
307 - task: PublishBuildArtifacts@1
308 displayName: 'Publish trash directories of failed tests'
311 PathtoPublish: t/failed-test-artifacts
312 ArtifactName: failed-test-artifacts
316 condition: succeeded()
317 pool: Hosted Ubuntu 1604
320 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
323 sudo AGENT_OS="$AGENT_OS" BUILD_BUILDNUMBER="$BUILD_BUILDNUMBER" BUILD_REPOSITORY_URI="$BUILD_REPOSITORY_URI" BUILD_SOURCEBRANCH="$BUILD_SOURCEBRANCH" BUILD_SOURCEVERSION="$BUILD_SOURCEVERSION" SYSTEM_PHASENAME="$SYSTEM_PHASENAME" SYSTEM_TASKDEFINITIONSURI="$SYSTEM_TASKDEFINITIONSURI" SYSTEM_TEAMPROJECT="$SYSTEM_TEAMPROJECT" CC=$CC MAKEFLAGS="$MAKEFLAGS" bash -lxc ci/run-linux32-docker.sh || res=1
325 sudo chmod a+r t/out/TEST-*.xml
326 test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts
328 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || res=1
330 displayName: 'ci/run-linux32-docker.sh'
332 GITFILESHAREPWD: $(gitfileshare.pwd)
333 - task: PublishTestResults@2
334 displayName: 'Publish Test Results **/TEST-*.xml'
336 mergeTestResults: true
337 testRunTitle: 'linux32'
339 publishRunAttachments: false
340 condition: succeededOrFailed()
341 - task: PublishBuildArtifacts@1
342 displayName: 'Publish trash directories of failed tests'
345 PathtoPublish: t/failed-test-artifacts
346 ArtifactName: failed-test-artifacts
348 - job: static_analysis
349 displayName: StaticAnalysis
350 condition: succeeded()
351 pool: Hosted Ubuntu 1604
354 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
356 sudo apt-get update &&
357 sudo apt-get install -y coccinelle &&
359 export jobname=StaticAnalysis &&
361 ci/run-static-analysis.sh || exit 1
363 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
364 displayName: 'ci/run-static-analysis.sh'
366 GITFILESHAREPWD: $(gitfileshare.pwd)
369 displayName: Documentation
370 condition: succeeded()
371 pool: Hosted Ubuntu 1604
374 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
376 sudo apt-get update &&
377 sudo apt-get install -y asciidoc xmlto asciidoctor docbook-xsl-ns &&
379 export ALREADY_HAVE_ASCIIDOCTOR=yes. &&
380 export jobname=Documentation &&
382 ci/test-documentation.sh || exit 1
384 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
385 displayName: 'ci/test-documentation.sh'
387 GITFILESHAREPWD: $(gitfileshare.pwd)