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 @"
36 export GIT_TEST_SKIP_REBASE_P=1
38 ci/run-build-and-tests.sh || {
39 ci/print-test-failures.sh
44 displayName: 'Build & Test'
46 HOME: $(Build.SourcesDirectory)
49 if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
50 cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
52 displayName: 'Unmount test-cache'
55 GITFILESHAREPWD: $(gitfileshare.pwd)
56 - task: PublishTestResults@2
57 displayName: 'Publish Test Results **/TEST-*.xml'
59 mergeTestResults: true
60 testRunTitle: 'windows'
62 publishRunAttachments: false
63 condition: succeededOrFailed()
64 - task: PublishBuildArtifacts@1
65 displayName: 'Publish trash directories of failed tests'
68 PathtoPublish: t/failed-test-artifacts
69 ArtifactName: failed-test-artifacts
72 displayName: linux-clang
73 condition: succeeded()
74 pool: Hosted Ubuntu 1604
77 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
79 sudo apt-get update &&
80 sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2-bin &&
82 export CC=clang || exit 1
84 ci/install-dependencies.sh || exit 1
85 ci/run-build-and-tests.sh || {
86 ci/print-test-failures.sh
90 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
91 displayName: 'ci/run-build-and-tests.sh'
93 GITFILESHAREPWD: $(gitfileshare.pwd)
94 - task: PublishTestResults@2
95 displayName: 'Publish Test Results **/TEST-*.xml'
97 mergeTestResults: true
98 testRunTitle: 'linux-clang'
100 publishRunAttachments: false
101 condition: succeededOrFailed()
102 - task: PublishBuildArtifacts@1
103 displayName: 'Publish trash directories of failed tests'
106 PathtoPublish: t/failed-test-artifacts
107 ArtifactName: failed-test-artifacts
110 displayName: linux-gcc
111 condition: succeeded()
112 pool: Hosted Ubuntu 1604
115 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
117 sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
118 sudo apt-get update &&
119 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
121 ci/install-dependencies.sh || exit 1
122 ci/run-build-and-tests.sh || {
123 ci/print-test-failures.sh
127 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
128 displayName: 'ci/run-build-and-tests.sh'
130 GITFILESHAREPWD: $(gitfileshare.pwd)
131 - task: PublishTestResults@2
132 displayName: 'Publish Test Results **/TEST-*.xml'
134 mergeTestResults: true
135 testRunTitle: 'linux-gcc'
137 publishRunAttachments: false
138 condition: succeededOrFailed()
139 - task: PublishBuildArtifacts@1
140 displayName: 'Publish trash directories of failed tests'
143 PathtoPublish: t/failed-test-artifacts
144 ArtifactName: failed-test-artifacts
147 displayName: osx-clang
148 condition: succeeded()
152 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
156 ci/install-dependencies.sh || exit 1
157 ci/run-build-and-tests.sh || {
158 ci/print-test-failures.sh
162 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1
163 displayName: 'ci/run-build-and-tests.sh'
165 GITFILESHAREPWD: $(gitfileshare.pwd)
166 - task: PublishTestResults@2
167 displayName: 'Publish Test Results **/TEST-*.xml'
169 mergeTestResults: true
170 testRunTitle: 'osx-clang'
172 publishRunAttachments: false
173 condition: succeededOrFailed()
174 - task: PublishBuildArtifacts@1
175 displayName: 'Publish trash directories of failed tests'
178 PathtoPublish: t/failed-test-artifacts
179 ArtifactName: failed-test-artifacts
183 condition: succeeded()
187 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
189 ci/install-dependencies.sh || exit 1
190 ci/run-build-and-tests.sh || {
191 ci/print-test-failures.sh
195 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1
196 displayName: 'ci/run-build-and-tests.sh'
198 GITFILESHAREPWD: $(gitfileshare.pwd)
199 - task: PublishTestResults@2
200 displayName: 'Publish Test Results **/TEST-*.xml'
202 mergeTestResults: true
203 testRunTitle: 'osx-gcc'
205 publishRunAttachments: false
206 condition: succeededOrFailed()
207 - task: PublishBuildArtifacts@1
208 displayName: 'Publish trash directories of failed tests'
211 PathtoPublish: t/failed-test-artifacts
212 ArtifactName: failed-test-artifacts
214 - job: gettext_poison
215 displayName: GETTEXT_POISON
216 condition: succeeded()
217 pool: Hosted Ubuntu 1604
220 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
222 sudo apt-get update &&
223 sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev &&
225 export jobname=GETTEXT_POISON || exit 1
227 ci/run-build-and-tests.sh || {
228 ci/print-test-failures.sh
232 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
233 displayName: 'ci/run-build-and-tests.sh'
235 GITFILESHAREPWD: $(gitfileshare.pwd)
236 - task: PublishTestResults@2
237 displayName: 'Publish Test Results **/TEST-*.xml'
239 mergeTestResults: true
240 testRunTitle: 'gettext-poison'
242 publishRunAttachments: false
243 condition: succeededOrFailed()
244 - task: PublishBuildArtifacts@1
245 displayName: 'Publish trash directories of failed tests'
248 PathtoPublish: t/failed-test-artifacts
249 ArtifactName: failed-test-artifacts
253 condition: succeeded()
254 pool: Hosted Ubuntu 1604
257 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
260 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
262 sudo chmod a+r t/out/TEST-*.xml
263 test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts
265 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || res=1
267 displayName: 'ci/run-linux32-docker.sh'
269 GITFILESHAREPWD: $(gitfileshare.pwd)
270 - task: PublishTestResults@2
271 displayName: 'Publish Test Results **/TEST-*.xml'
273 mergeTestResults: true
274 testRunTitle: 'linux32'
276 publishRunAttachments: false
277 condition: succeededOrFailed()
278 - task: PublishBuildArtifacts@1
279 displayName: 'Publish trash directories of failed tests'
282 PathtoPublish: t/failed-test-artifacts
283 ArtifactName: failed-test-artifacts
285 - job: static_analysis
286 displayName: StaticAnalysis
287 condition: succeeded()
288 pool: Hosted Ubuntu 1604
291 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
293 sudo apt-get update &&
294 sudo apt-get install -y coccinelle &&
296 export jobname=StaticAnalysis &&
298 ci/run-static-analysis.sh || exit 1
300 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
301 displayName: 'ci/run-static-analysis.sh'
303 GITFILESHAREPWD: $(gitfileshare.pwd)
306 displayName: Documentation
307 condition: succeeded()
308 pool: Hosted Ubuntu 1604
311 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
313 sudo apt-get update &&
314 sudo apt-get install -y asciidoc xmlto asciidoctor &&
316 export ALREADY_HAVE_ASCIIDOCTOR=yes. &&
317 export jobname=Documentation &&
319 ci/test-documentation.sh || exit 1
321 test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
322 displayName: 'ci/test-documentation.sh'
324 GITFILESHAREPWD: $(gitfileshare.pwd)