]>
Commit | Line | Data |
---|---|---|
b35304bf JS |
1 | variables: |
2 | Agent.Source.Git.ShallowFetchDepth: 1 | |
27be7817 JS |
3 | |
4 | jobs: | |
b819f1d2 JS |
5 | - job: windows_build |
6 | displayName: Windows Build | |
2e90484e JS |
7 | condition: succeeded() |
8 | pool: Hosted | |
9 | timeoutInMinutes: 240 | |
10 | steps: | |
11 | - powershell: | | |
12 | if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { | |
13 | net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no | |
14 | cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\ | |
15 | } | |
16 | displayName: 'Mount test-cache' | |
17 | env: | |
18 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
19 | - powershell: | | |
6c1f4ae6 JS |
20 | $urlbase = "https://dev.azure.com/git-for-windows/git/_apis/build/builds" |
21 | $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=22&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id | |
22 | $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[1].resource.downloadUrl | |
23 | (New-Object Net.WebClient).DownloadFile($downloadUrl,"git-sdk-64-minimal.zip") | |
24 | Expand-Archive git-sdk-64-minimal.zip -DestinationPath . -Force | |
25 | Remove-Item git-sdk-64-minimal.zip | |
2e90484e JS |
26 | |
27 | # Let Git ignore the SDK and the test-cache | |
6c1f4ae6 JS |
28 | "/git-sdk-64-minimal/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude" |
29 | displayName: 'Download git-sdk-64-minimal' | |
2e90484e | 30 | - powershell: | |
6c1f4ae6 | 31 | & git-sdk-64-minimal\usr\bin\bash.exe -lc @" |
b819f1d2 JS |
32 | ci/make-test-artifacts.sh artifacts |
33 | "@ | |
34 | if (!$?) { exit(1) } | |
35 | displayName: Build | |
36 | env: | |
37 | HOME: $(Build.SourcesDirectory) | |
38 | MSYSTEM: MINGW64 | |
39 | DEVELOPER: 1 | |
40 | NO_PERL: 1 | |
41 | - task: PublishPipelineArtifact@0 | |
42 | displayName: 'Publish Pipeline Artifact: test artifacts' | |
43 | inputs: | |
44 | artifactName: 'windows-artifacts' | |
45 | targetPath: '$(Build.SourcesDirectory)\artifacts' | |
46 | - task: PublishPipelineArtifact@0 | |
47 | displayName: 'Publish Pipeline Artifact: git-sdk-64-minimal' | |
48 | inputs: | |
49 | artifactName: 'git-sdk-64-minimal' | |
50 | targetPath: '$(Build.SourcesDirectory)\git-sdk-64-minimal' | |
51 | - powershell: | | |
52 | if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { | |
53 | cmd /c rmdir "$(Build.SourcesDirectory)\test-cache" | |
54 | } | |
55 | displayName: 'Unmount test-cache' | |
56 | condition: true | |
57 | env: | |
58 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
59 | ||
60 | - job: windows_test | |
61 | displayName: Windows Test | |
62 | dependsOn: windows_build | |
63 | condition: succeeded() | |
64 | pool: Hosted | |
65 | timeoutInMinutes: 240 | |
66 | strategy: | |
67 | parallel: 10 | |
68 | steps: | |
69 | - powershell: | | |
70 | if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { | |
71 | net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no | |
72 | cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\ | |
73 | } | |
74 | displayName: 'Mount test-cache' | |
75 | env: | |
76 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
77 | - task: DownloadPipelineArtifact@0 | |
78 | displayName: 'Download Pipeline Artifact: test artifacts' | |
79 | inputs: | |
80 | artifactName: 'windows-artifacts' | |
81 | targetPath: '$(Build.SourcesDirectory)' | |
82 | - task: DownloadPipelineArtifact@0 | |
83 | displayName: 'Download Pipeline Artifact: git-sdk-64-minimal' | |
84 | inputs: | |
85 | artifactName: 'git-sdk-64-minimal' | |
86 | targetPath: '$(Build.SourcesDirectory)\git-sdk-64-minimal' | |
87 | - powershell: | | |
88 | & git-sdk-64-minimal\usr\bin\bash.exe -lc @" | |
89 | test -f artifacts.tar.gz || { | |
90 | echo No test artifacts found\; skipping >&2 | |
91 | exit 0 | |
92 | } | |
93 | tar xf artifacts.tar.gz || exit 1 | |
94 | ||
95 | # Let Git ignore the SDK and the test-cache | |
96 | printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude | |
2e90484e | 97 | |
b819f1d2 | 98 | ci/run-test-slice.sh `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE || { |
2e90484e JS |
99 | ci/print-test-failures.sh |
100 | exit 1 | |
101 | } | |
102 | "@ | |
103 | if (!$?) { exit(1) } | |
b819f1d2 | 104 | displayName: 'Test (parallel)' |
2e90484e JS |
105 | env: |
106 | HOME: $(Build.SourcesDirectory) | |
107 | MSYSTEM: MINGW64 | |
b819f1d2 JS |
108 | NO_SVN_TESTS: 1 |
109 | GIT_TEST_SKIP_REBASE_P: 1 | |
2e90484e JS |
110 | - powershell: | |
111 | if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { | |
112 | cmd /c rmdir "$(Build.SourcesDirectory)\test-cache" | |
113 | } | |
114 | displayName: 'Unmount test-cache' | |
115 | condition: true | |
116 | env: | |
117 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
118 | - task: PublishTestResults@2 | |
119 | displayName: 'Publish Test Results **/TEST-*.xml' | |
120 | inputs: | |
121 | mergeTestResults: true | |
122 | testRunTitle: 'windows' | |
123 | platform: Windows | |
124 | publishRunAttachments: false | |
125 | condition: succeededOrFailed() | |
126 | - task: PublishBuildArtifacts@1 | |
127 | displayName: 'Publish trash directories of failed tests' | |
128 | condition: failed() | |
129 | inputs: | |
130 | PathtoPublish: t/failed-test-artifacts | |
131 | ArtifactName: failed-test-artifacts | |
132 | ||
27be7817 JS |
133 | - job: linux_clang |
134 | displayName: linux-clang | |
135 | condition: succeeded() | |
136 | pool: Hosted Ubuntu 1604 | |
137 | steps: | |
138 | - bash: | | |
139 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
140 | ||
141 | sudo apt-get update && | |
142 | sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2-bin && | |
143 | ||
144 | export CC=clang || exit 1 | |
145 | ||
146 | ci/install-dependencies.sh || exit 1 | |
147 | ci/run-build-and-tests.sh || { | |
148 | ci/print-test-failures.sh | |
149 | exit 1 | |
150 | } | |
151 | ||
152 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1 | |
153 | displayName: 'ci/run-build-and-tests.sh' | |
154 | env: | |
155 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
156 | - task: PublishTestResults@2 | |
157 | displayName: 'Publish Test Results **/TEST-*.xml' | |
158 | inputs: | |
159 | mergeTestResults: true | |
160 | testRunTitle: 'linux-clang' | |
161 | platform: Linux | |
162 | publishRunAttachments: false | |
163 | condition: succeededOrFailed() | |
164 | - task: PublishBuildArtifacts@1 | |
165 | displayName: 'Publish trash directories of failed tests' | |
166 | condition: failed() | |
167 | inputs: | |
168 | PathtoPublish: t/failed-test-artifacts | |
169 | ArtifactName: failed-test-artifacts | |
170 | ||
171 | - job: linux_gcc | |
172 | displayName: linux-gcc | |
173 | condition: succeeded() | |
174 | pool: Hosted Ubuntu 1604 | |
175 | steps: | |
176 | - bash: | | |
177 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
178 | ||
179 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test && | |
180 | sudo apt-get update && | |
181 | 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 | |
182 | ||
183 | ci/install-dependencies.sh || exit 1 | |
184 | ci/run-build-and-tests.sh || { | |
185 | ci/print-test-failures.sh | |
186 | exit 1 | |
187 | } | |
188 | ||
189 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1 | |
190 | displayName: 'ci/run-build-and-tests.sh' | |
191 | env: | |
192 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
193 | - task: PublishTestResults@2 | |
194 | displayName: 'Publish Test Results **/TEST-*.xml' | |
195 | inputs: | |
196 | mergeTestResults: true | |
197 | testRunTitle: 'linux-gcc' | |
198 | platform: Linux | |
199 | publishRunAttachments: false | |
200 | condition: succeededOrFailed() | |
201 | - task: PublishBuildArtifacts@1 | |
202 | displayName: 'Publish trash directories of failed tests' | |
203 | condition: failed() | |
204 | inputs: | |
205 | PathtoPublish: t/failed-test-artifacts | |
206 | ArtifactName: failed-test-artifacts | |
207 | ||
208 | - job: osx_clang | |
209 | displayName: osx-clang | |
210 | condition: succeeded() | |
211 | pool: Hosted macOS | |
212 | steps: | |
213 | - bash: | | |
214 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
215 | ||
216 | export CC=clang | |
217 | ||
218 | ci/install-dependencies.sh || exit 1 | |
219 | ci/run-build-and-tests.sh || { | |
220 | ci/print-test-failures.sh | |
221 | exit 1 | |
222 | } | |
223 | ||
224 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1 | |
225 | displayName: 'ci/run-build-and-tests.sh' | |
226 | env: | |
227 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
228 | - task: PublishTestResults@2 | |
229 | displayName: 'Publish Test Results **/TEST-*.xml' | |
230 | inputs: | |
231 | mergeTestResults: true | |
232 | testRunTitle: 'osx-clang' | |
233 | platform: macOS | |
234 | publishRunAttachments: false | |
235 | condition: succeededOrFailed() | |
236 | - task: PublishBuildArtifacts@1 | |
237 | displayName: 'Publish trash directories of failed tests' | |
238 | condition: failed() | |
239 | inputs: | |
240 | PathtoPublish: t/failed-test-artifacts | |
241 | ArtifactName: failed-test-artifacts | |
242 | ||
243 | - job: osx_gcc | |
244 | displayName: osx-gcc | |
245 | condition: succeeded() | |
246 | pool: Hosted macOS | |
247 | steps: | |
248 | - bash: | | |
249 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
250 | ||
251 | ci/install-dependencies.sh || exit 1 | |
252 | ci/run-build-and-tests.sh || { | |
253 | ci/print-test-failures.sh | |
254 | exit 1 | |
255 | } | |
256 | ||
257 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1 | |
258 | displayName: 'ci/run-build-and-tests.sh' | |
259 | env: | |
260 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
261 | - task: PublishTestResults@2 | |
262 | displayName: 'Publish Test Results **/TEST-*.xml' | |
263 | inputs: | |
264 | mergeTestResults: true | |
265 | testRunTitle: 'osx-gcc' | |
266 | platform: macOS | |
267 | publishRunAttachments: false | |
268 | condition: succeededOrFailed() | |
269 | - task: PublishBuildArtifacts@1 | |
270 | displayName: 'Publish trash directories of failed tests' | |
271 | condition: failed() | |
272 | inputs: | |
273 | PathtoPublish: t/failed-test-artifacts | |
274 | ArtifactName: failed-test-artifacts | |
275 | ||
276 | - job: gettext_poison | |
277 | displayName: GETTEXT_POISON | |
278 | condition: succeeded() | |
279 | pool: Hosted Ubuntu 1604 | |
280 | steps: | |
281 | - bash: | | |
282 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
283 | ||
284 | sudo apt-get update && | |
285 | sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev && | |
286 | ||
287 | export jobname=GETTEXT_POISON || exit 1 | |
288 | ||
289 | ci/run-build-and-tests.sh || { | |
290 | ci/print-test-failures.sh | |
291 | exit 1 | |
292 | } | |
293 | ||
294 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1 | |
295 | displayName: 'ci/run-build-and-tests.sh' | |
296 | env: | |
297 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
298 | - task: PublishTestResults@2 | |
299 | displayName: 'Publish Test Results **/TEST-*.xml' | |
300 | inputs: | |
301 | mergeTestResults: true | |
302 | testRunTitle: 'gettext-poison' | |
303 | platform: Linux | |
304 | publishRunAttachments: false | |
305 | condition: succeededOrFailed() | |
306 | - task: PublishBuildArtifacts@1 | |
307 | displayName: 'Publish trash directories of failed tests' | |
308 | condition: failed() | |
309 | inputs: | |
310 | PathtoPublish: t/failed-test-artifacts | |
311 | ArtifactName: failed-test-artifacts | |
312 | ||
313 | - job: linux32 | |
314 | displayName: Linux32 | |
315 | condition: succeeded() | |
316 | pool: Hosted Ubuntu 1604 | |
317 | steps: | |
318 | - bash: | | |
319 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
320 | ||
321 | res=0 | |
322 | 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 | |
323 | ||
324 | sudo chmod a+r t/out/TEST-*.xml | |
325 | test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts | |
326 | ||
327 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || res=1 | |
328 | exit $res | |
329 | displayName: 'ci/run-linux32-docker.sh' | |
330 | env: | |
331 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
332 | - task: PublishTestResults@2 | |
333 | displayName: 'Publish Test Results **/TEST-*.xml' | |
334 | inputs: | |
335 | mergeTestResults: true | |
336 | testRunTitle: 'linux32' | |
337 | platform: Linux | |
338 | publishRunAttachments: false | |
339 | condition: succeededOrFailed() | |
340 | - task: PublishBuildArtifacts@1 | |
341 | displayName: 'Publish trash directories of failed tests' | |
342 | condition: failed() | |
343 | inputs: | |
344 | PathtoPublish: t/failed-test-artifacts | |
345 | ArtifactName: failed-test-artifacts | |
346 | ||
347 | - job: static_analysis | |
348 | displayName: StaticAnalysis | |
349 | condition: succeeded() | |
350 | pool: Hosted Ubuntu 1604 | |
351 | steps: | |
352 | - bash: | | |
353 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
354 | ||
355 | sudo apt-get update && | |
356 | sudo apt-get install -y coccinelle && | |
357 | ||
358 | export jobname=StaticAnalysis && | |
359 | ||
360 | ci/run-static-analysis.sh || exit 1 | |
361 | ||
362 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1 | |
363 | displayName: 'ci/run-static-analysis.sh' | |
364 | env: | |
365 | GITFILESHAREPWD: $(gitfileshare.pwd) | |
366 | ||
367 | - job: documentation | |
368 | displayName: Documentation | |
369 | condition: succeeded() | |
370 | pool: Hosted Ubuntu 1604 | |
371 | steps: | |
372 | - bash: | | |
373 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 | |
374 | ||
375 | sudo apt-get update && | |
376 | sudo apt-get install -y asciidoc xmlto asciidoctor && | |
377 | ||
378 | export ALREADY_HAVE_ASCIIDOCTOR=yes. && | |
379 | export jobname=Documentation && | |
380 | ||
381 | ci/test-documentation.sh || exit 1 | |
382 | ||
383 | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1 | |
384 | displayName: 'ci/test-documentation.sh' | |
385 | env: | |
386 | GITFILESHAREPWD: $(gitfileshare.pwd) |