mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 18:29:13 +08:00
b8755728ab
* Adds scripts to generate scale sets for testing Linux. * Note workaround for https://github.com/microsoft/azure-pipelines-agent/pull/2929 * Switches Windows validation to 'Spot' VMs. * Opens the git port 9418. * Removes provisioning of the no longer used 'logs' file share. * Changes Azure region to 'westus2', which is cheaper. * Adds +x to all the scripts in scripts/azure-pipelines. * Use 'xml-results' for all platforms instead of 'raw xml results' on Windows.
63 lines
2.8 KiB
YAML
63 lines
2.8 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
jobs:
|
|
- job: ${{ parameters.jobName }}
|
|
pool:
|
|
name: ${{ parameters.poolName }}
|
|
|
|
timeoutInMinutes: 1440 # 1 day
|
|
|
|
steps:
|
|
- task: PowerShell@2
|
|
displayName: 'Initialize Environment'
|
|
inputs:
|
|
filePath: 'scripts/azure-pipelines/windows/initialize-environment.ps1'
|
|
|
|
- powershell: |
|
|
$baselineFile = "$(System.DefaultWorkingDirectory)\scripts\ci.baseline.txt"
|
|
$skipList = $(System.DefaultWorkingDirectory)\scripts\azure-pipelines\generate-skip-list.ps1 -Triplet "${{ parameters.triplet }}" -BaselineFile $baselineFile
|
|
Write-Host "baseline file: $baselineFile"
|
|
Write-Host "skip list: $skipList"
|
|
$(System.DefaultWorkingDirectory)\scripts\azure-pipelines\windows\ci-step.ps1 -Triplet "${{ parameters.triplet }}" -ExcludePorts $skipList
|
|
Write-Host "CI test script is complete"
|
|
errorActionPreference: continue
|
|
displayName: '** Build vcpkg and Test Modified Ports **'
|
|
|
|
- powershell: |
|
|
$baseName = "${{ parameters.triplet }}"
|
|
$outputPathRoot = "$(System.ArtifactsDirectory)\xml-results"
|
|
if(-not (Test-Path $outputPathRoot))
|
|
{
|
|
Write-Host "creating $outputPathRoot"
|
|
mkdir $outputPathRoot | Out-Null
|
|
}
|
|
|
|
$xmlPath = "$(System.DefaultWorkingDirectory)\test-full-ci.xml"
|
|
$outputXmlPath = "$outputPathRoot\$baseName.xml"
|
|
|
|
cp $xmlPath $(Build.ArtifactStagingDirectory)
|
|
Move-Item $xmlPath -Destination $outputXmlPath
|
|
|
|
# already in DevOps, no need for extra copies
|
|
rm $(System.DefaultWorkingDirectory)\console-out.txt -ErrorAction Ignore
|
|
|
|
Remove-Item "$(System.DefaultWorkingDirectory)\buildtrees\*" -Recurse -errorAction silentlycontinue
|
|
Remove-Item "$(System.DefaultWorkingDirectory)\packages\*" -Recurse -errorAction silentlycontinue
|
|
Remove-Item "$(System.DefaultWorkingDirectory)\installed\*" -Recurse -errorAction silentlycontinue
|
|
displayName: 'Collect logs and cleanup build'
|
|
|
|
- task: PowerShell@2
|
|
displayName: 'Analyze results and prepare test logs'
|
|
inputs:
|
|
failOnStderr: true
|
|
filePath: 'scripts/azure-pipelines/analyze-test-results.ps1'
|
|
arguments: '-baselineFile "$(System.DefaultWorkingDirectory)\scripts\ci.baseline.txt" -logDir "$(System.ArtifactsDirectory)\xml-results" -failurelogDir "archives\fail" -outputDir "$(Build.ArtifactStagingDirectory)" -errorOnRegression -triplets "${{ parameters.triplet }}"'
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ${{ parameters.triplet }} port build failure logs'
|
|
inputs:
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)\failureLogs'
|
|
ArtifactName: '${{ parameters.triplet }} port build failure logs'
|
|
condition: failed()
|