@@ -3,6 +3,92 @@ resources:
3
3
fetchDepth : 1
4
4
5
5
jobs :
6
+ - job : windows
7
+ displayName : Windows
8
+ condition : succeeded()
9
+ pool : Hosted
10
+ timeoutInMinutes : 240
11
+ steps :
12
+ - powershell : |
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:\
16
+ }
17
+ displayName: 'Mount test-cache'
18
+ env:
19
+ GITFILESHAREPWD: $(gitfileshare.pwd)
20
+ - powershell : |
21
+ # Helper to check the error level of the latest command (exit with error when appropriate)
22
+ function c() { if (!$?) { exit(1) } }
23
+
24
+ # Add build agent's MinGit to PATH
25
+ $env:PATH = $env:AGENT_HOMEDIRECTORY +"\externals\\git\cmd;" +$env:PATH
26
+
27
+ # Helper to initialize (or update) a Git worktree
28
+ function init ($path, $url, $set_origin) {
29
+ if (Test-Path $path) {
30
+ cd $path; c
31
+ if (Test-Path .git) {
32
+ & git init; c
33
+ } else {
34
+ & git status
35
+ }
36
+ } else {
37
+ & git init $path; c
38
+ cd $path; c
39
+ }
40
+ & git config core.autocrlf false; c
41
+ & git config core.untrackedCache true; c
42
+ if (($set_origin -ne 0) -and !(git config remote.origin.url)) {
43
+ & git remote add origin $url; c
44
+ }
45
+ & git fetch --depth=1 $url master; c
46
+ & git reset --hard FETCH_HEAD; c
47
+ & git clean -df; c
48
+ }
49
+
50
+ # Initialize Git for Windows' SDK
51
+ $sdk_path = "$(Build.SourcesDirectory)\git-sdk-64"
52
+ init "$sdk_path" "https://dev.azure.com/git-for-windows/git-sdk-64/_git/git-sdk-64" 0
53
+
54
+ # Let Git ignore the SDK and the test-cache
55
+ "/git-sdk-64/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude"
56
+ displayName: 'Initialize the Git for Windows SDK'
57
+ - powershell : |
58
+ & "git-sdk-64\git-cmd.exe" --command=usr\\bin\\bash.exe -lc @"
59
+ export MAKEFLAGS=-j10
60
+ export DEVELOPER=1
61
+ export NO_PERL=1
62
+ export NO_SVN_TESTS=1
63
+ export GIT_TEST_SKIP_REBASE_P=1
64
+
65
+ ci/run-build-and-tests.sh || {
66
+ ci/print-test-failures.sh
67
+ exit 1
68
+ }
69
+ "@
70
+ if (!$?) { exit(1) }
71
+ displayName: 'Build & Test'
72
+ env:
73
+ HOME: $(Build.SourcesDirectory)
74
+ MSYSTEM: MINGW64
75
+ - powershell : |
76
+ if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
77
+ cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
78
+ }
79
+ displayName: 'Unmount test-cache'
80
+ condition: true
81
+ env:
82
+ GITFILESHAREPWD: $(gitfileshare.pwd)
83
+ - task : PublishTestResults@2
84
+ displayName : ' Publish Test Results **/TEST-*.xml'
85
+ inputs :
86
+ mergeTestResults : true
87
+ testRunTitle : ' windows'
88
+ platform : Windows
89
+ publishRunAttachments : false
90
+ condition : succeededOrFailed()
91
+
6
92
- job : linux_clang
7
93
displayName : linux-clang
8
94
condition : succeeded()
@@ -153,92 +239,6 @@ jobs:
153
239
publishRunAttachments : false
154
240
condition : succeededOrFailed()
155
241
156
- - job : windows
157
- displayName : Windows
158
- condition : succeeded()
159
- pool : Hosted
160
- timeoutInMinutes : 240
161
- steps :
162
- - powershell : |
163
- if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
164
- net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no
165
- cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\
166
- }
167
- displayName: 'Mount test-cache'
168
- env:
169
- GITFILESHAREPWD: $(gitfileshare.pwd)
170
- - powershell : |
171
- # Helper to check the error level of the latest command (exit with error when appropriate)
172
- function c() { if (!$?) { exit(1) } }
173
-
174
- # Add build agent's MinGit to PATH
175
- $env:PATH = $env:AGENT_HOMEDIRECTORY +"\externals\\git\cmd;" +$env:PATH
176
-
177
- # Helper to initialize (or update) a Git worktree
178
- function init ($path, $url, $set_origin) {
179
- if (Test-Path $path) {
180
- cd $path; c
181
- if (Test-Path .git) {
182
- & git init; c
183
- } else {
184
- & git status
185
- }
186
- } else {
187
- & git init $path; c
188
- cd $path; c
189
- }
190
- & git config core.autocrlf false; c
191
- & git config core.untrackedCache true; c
192
- if (($set_origin -ne 0) -and !(git config remote.origin.url)) {
193
- & git remote add origin $url; c
194
- }
195
- & git fetch --depth=1 $url master; c
196
- & git reset --hard FETCH_HEAD; c
197
- & git clean -df; c
198
- }
199
-
200
- # Initialize Git for Windows' SDK
201
- $sdk_path = "$(Build.SourcesDirectory)\git-sdk-64"
202
- init "$sdk_path" "https://dev.azure.com/git-for-windows/git-sdk-64/_git/git-sdk-64" 0
203
-
204
- # Let Git ignore the SDK and the test-cache
205
- "/git-sdk-64/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude"
206
- displayName: 'Initialize the Git for Windows SDK'
207
- - powershell : |
208
- & "git-sdk-64\git-cmd.exe" --command=usr\\bin\\bash.exe -lc @"
209
- export MAKEFLAGS=-j10
210
- export DEVELOPER=1
211
- export NO_PERL=1
212
- export NO_SVN_TESTS=1
213
- export GIT_TEST_SKIP_REBASE_P=1
214
-
215
- ci/run-build-and-tests.sh || {
216
- ci/print-test-failures.sh
217
- exit 1
218
- }
219
- "@
220
- if (!$?) { exit(1) }
221
- displayName: 'Build & Test'
222
- env:
223
- HOME: $(Build.SourcesDirectory)
224
- MSYSTEM: MINGW64
225
- - powershell : |
226
- if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
227
- cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
228
- }
229
- displayName: 'Unmount test-cache'
230
- condition: true
231
- env:
232
- GITFILESHAREPWD: $(gitfileshare.pwd)
233
- - task : PublishTestResults@2
234
- displayName : ' Publish Test Results **/TEST-*.xml'
235
- inputs :
236
- mergeTestResults : true
237
- testRunTitle : ' windows'
238
- platform : Windows
239
- publishRunAttachments : false
240
- condition : succeededOrFailed()
241
-
242
242
- job : linux32
243
243
displayName : Linux32
244
244
condition : succeeded()
0 commit comments