Skip to content

Commit 521ae79

Browse files
committed
fixup! Add a build definition for Azure DevOps
Let's split the Windows phase into multiple, logical tasks so that we can quickly determine whether the build failed, or the test suite, or whether there was a problem with initializing the SDK. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ac0638c commit 521ae79

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

azure-pipelines.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ phases:
175175
net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no; c
176176
cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\; c
177177
}
178+
displayName: 'mount test-cache'
179+
env:
180+
GITFILESHAREPWD: $(gitfileshare.pwd)
181+
- powershell: |
182+
# Helper to check the error level of the latest command (exit with error when appropriate)
183+
function c() { if (!$?) { exit(1) } }
178184
179185
# Add build agent's MinGit to PATH
180186
$env:PATH = $env:AGENT_HOMEDIRECTORY +"\externals\\git\cmd;" +$env:PATH
@@ -206,6 +212,10 @@ phases:
206212
$sdk_path = "$(Build.SourcesDirectory)\git-sdk-64"
207213
init "$sdk_path" "https://dev.azure.com/git-for-windows/git-sdk-64/_git/git-sdk-64" 0
208214
init usr\src\build-extra https://github.com/git-for-windows/build-extra 1
215+
displayName: 'initialize the Git for Windows SDK'
216+
- powershell: |
217+
# Helper to check the error level of the latest command (exit with error when appropriate)
218+
function c() { if (!$?) { exit(1) } }
209219
210220
cd "$(Build.SourcesDirectory)"; c
211221
@@ -222,11 +232,12 @@ phases:
222232
save_good_tree
223233
"@
224234
c
225-
235+
displayName: 'build & test'
236+
- powershell: |
226237
if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") {
227238
cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
228239
}
229-
displayName: 'build & test'
240+
displayName: 'unmount test-cache'
230241
env:
231242
GITFILESHAREPWD: $(gitfileshare.pwd)
232243
- task: PublishTestResults@2

0 commit comments

Comments
 (0)