|
1 |
| -resources: |
2 |
| -- repo: self |
3 |
| - fetchDepth: 1 |
| 1 | +variables: |
| 2 | + Agent.Source.Git.ShallowFetchDepth: 1 |
4 | 3 |
|
5 | 4 | jobs:
|
6 | 5 | - job: windows_build
|
@@ -131,6 +130,147 @@ jobs:
|
131 | 130 | PathtoPublish: t/failed-test-artifacts
|
132 | 131 | ArtifactName: failed-test-artifacts
|
133 | 132 |
|
| 133 | +- job: msvc_build |
| 134 | + displayName: Windows (MSVC) Build |
| 135 | + condition: succeeded() |
| 136 | + pool: Hosted VS2017 |
| 137 | + timeoutInMinutes: 240 |
| 138 | + steps: |
| 139 | + - powershell: | |
| 140 | + if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { |
| 141 | + net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no |
| 142 | + cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\ |
| 143 | + } |
| 144 | + displayName: 'Mount test-cache' |
| 145 | + env: |
| 146 | + GITFILESHAREPWD: $(gitfileshare.pwd) |
| 147 | + - powershell: | |
| 148 | + $urlbase = "https://dev.azure.com/git/git/_apis/build/builds" |
| 149 | + $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id |
| 150 | + $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl |
| 151 | + (New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip") |
| 152 | + Expand-Archive compat.zip -DestinationPath . -Force |
| 153 | + Remove-Item compat.zip |
| 154 | + displayName: 'Download vcpkg artifacts' |
| 155 | + - powershell: | |
| 156 | + $urlbase = "https://dev.azure.com/git-for-windows/git/_apis/build/builds" |
| 157 | + $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=22&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id |
| 158 | + $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[1].resource.downloadUrl |
| 159 | + (New-Object Net.WebClient).DownloadFile($downloadUrl, "git-sdk-64-minimal.zip") |
| 160 | + Expand-Archive git-sdk-64-minimal.zip -DestinationPath . -Force |
| 161 | + Remove-Item git-sdk-64-minimal.zip |
| 162 | +
|
| 163 | + # Let Git ignore the SDK and the test-cache |
| 164 | + "/git-sdk-64-minimal/`n/test-cache/`n" | Out-File -NoNewLine -Encoding ascii -Append "$(Build.SourcesDirectory)\.git\info\exclude" |
| 165 | + displayName: 'Download git-sdk-64-minimal' |
| 166 | + - powershell: | |
| 167 | + & compat\vcbuild\vcpkg_copy_dlls.bat release |
| 168 | + if (!$?) { exit(1) } |
| 169 | + & git-sdk-64-minimal\usr\bin\bash.exe -lc @" |
| 170 | + INCLUDE_DLLS_IN_ARTIFACTS=YesPlease \ |
| 171 | + ci/make-test-artifacts.sh artifacts |
| 172 | + "@ |
| 173 | + if (!$?) { exit(1) } |
| 174 | + displayName: Build |
| 175 | + env: |
| 176 | + HOME: $(Build.SourcesDirectory) |
| 177 | + MSYSTEM: MINGW64 |
| 178 | + DEVELOPER: 1 |
| 179 | + NO_PERL: 1 |
| 180 | + MSVC: 1 |
| 181 | + VCPKG_ROOT: $(Build.SourcesDirectory)\compat\vcbuild\vcpkg |
| 182 | + - task: PublishPipelineArtifact@0 |
| 183 | + displayName: 'Publish Pipeline Artifact: MSVC test artifacts' |
| 184 | + inputs: |
| 185 | + artifactName: 'msvc-artifacts' |
| 186 | + targetPath: '$(Build.SourcesDirectory)\artifacts' |
| 187 | + - task: PublishPipelineArtifact@0 |
| 188 | + displayName: 'Publish Pipeline Artifact: git-sdk-64-min-msvc' |
| 189 | + inputs: |
| 190 | + artifactName: 'git-sdk-64-min-msvc' |
| 191 | + targetPath: '$(Build.SourcesDirectory)\git-sdk-64-minimal' |
| 192 | + - powershell: | |
| 193 | + if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { |
| 194 | + cmd /c rmdir "$(Build.SourcesDirectory)\test-cache" |
| 195 | + } |
| 196 | + displayName: 'Unmount test-cache' |
| 197 | + condition: true |
| 198 | + env: |
| 199 | + GITFILESHAREPWD: $(gitfileshare.pwd) |
| 200 | +
|
| 201 | +- job: msvc_test |
| 202 | + displayName: Windows (MSVC) Test |
| 203 | + dependsOn: msvc_build |
| 204 | + condition: succeeded() |
| 205 | + pool: Hosted |
| 206 | + timeoutInMinutes: 240 |
| 207 | + strategy: |
| 208 | + parallel: 10 |
| 209 | + steps: |
| 210 | + - powershell: | |
| 211 | + if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { |
| 212 | + net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no |
| 213 | + cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\ |
| 214 | + } |
| 215 | + displayName: 'Mount test-cache' |
| 216 | + env: |
| 217 | + GITFILESHAREPWD: $(gitfileshare.pwd) |
| 218 | + - task: DownloadPipelineArtifact@0 |
| 219 | + displayName: 'Download Pipeline Artifact: MSVC test artifacts' |
| 220 | + inputs: |
| 221 | + artifactName: 'msvc-artifacts' |
| 222 | + targetPath: '$(Build.SourcesDirectory)' |
| 223 | + - task: DownloadPipelineArtifact@0 |
| 224 | + displayName: 'Download Pipeline Artifact: git-sdk-64-min-msvc' |
| 225 | + inputs: |
| 226 | + artifactName: 'git-sdk-64-min-msvc' |
| 227 | + targetPath: '$(Build.SourcesDirectory)\git-sdk-64-minimal' |
| 228 | + - powershell: | |
| 229 | + & git-sdk-64-minimal\usr\bin\bash.exe -lc @" |
| 230 | + test -f artifacts.tar.gz || { |
| 231 | + echo No test artifacts found\; skipping >&2 |
| 232 | + exit 0 |
| 233 | + } |
| 234 | + tar xf artifacts.tar.gz || exit 1 |
| 235 | +
|
| 236 | + # Let Git ignore the SDK and the test-cache |
| 237 | + printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude |
| 238 | +
|
| 239 | + ci/run-test-slice.sh `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE || { |
| 240 | + ci/print-test-failures.sh |
| 241 | + exit 1 |
| 242 | + } |
| 243 | + "@ |
| 244 | + if (!$?) { exit(1) } |
| 245 | + displayName: 'Test (parallel)' |
| 246 | + env: |
| 247 | + HOME: $(Build.SourcesDirectory) |
| 248 | + MSYSTEM: MINGW64 |
| 249 | + NO_SVN_TESTS: 1 |
| 250 | + GIT_TEST_SKIP_REBASE_P: 1 |
| 251 | + - powershell: | |
| 252 | + if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)") { |
| 253 | + cmd /c rmdir "$(Build.SourcesDirectory)\test-cache" |
| 254 | + } |
| 255 | + displayName: 'Unmount test-cache' |
| 256 | + condition: true |
| 257 | + env: |
| 258 | + GITFILESHAREPWD: $(gitfileshare.pwd) |
| 259 | + - task: PublishTestResults@2 |
| 260 | + displayName: 'Publish Test Results **/TEST-*.xml' |
| 261 | + inputs: |
| 262 | + mergeTestResults: true |
| 263 | + testRunTitle: 'msvc' |
| 264 | + platform: Windows |
| 265 | + publishRunAttachments: false |
| 266 | + condition: succeededOrFailed() |
| 267 | + - task: PublishBuildArtifacts@1 |
| 268 | + displayName: 'Publish trash directories of failed tests' |
| 269 | + condition: failed() |
| 270 | + inputs: |
| 271 | + PathtoPublish: t/failed-test-artifacts |
| 272 | + ArtifactName: failed-msvc-test-artifacts |
| 273 | + |
134 | 274 | - job: linux_clang
|
135 | 275 | displayName: linux-clang
|
136 | 276 | condition: succeeded()
|
|
0 commit comments