Split Windows CI into the following Jobs 1. Combine Build and xUnit, which published build artifact 1. Elevated CI tests 1. Unelevated CI test 1. Elevated everything else tests 1. Unelevated everything else tests 1. Package build and test 1. Verify xUnit result ## PR Context Before this test: - A CI run would take ~14 minutes - A Feature run would take ~30 minutes After this change, it always runs all tests and takes ~20 minutes. Job `Unelevated everything else tests` is the long poll, taking ~4 minutes longer than the next shortest job. We should be able to get this back down to ~15 if we split that test job somehow.
98 lines
2.2 KiB
YAML
98 lines
2.2 KiB
YAML
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
|
|
trigger:
|
|
# Batch merge builds together while a merge build is running
|
|
batch: true
|
|
branches:
|
|
include:
|
|
- master
|
|
- release*
|
|
paths:
|
|
include:
|
|
- '*'
|
|
exclude:
|
|
- /tools/releaseBuild/**/*
|
|
- /.vsts-ci/misc-analysis.yml
|
|
pr:
|
|
branches:
|
|
include:
|
|
- master
|
|
- release*
|
|
paths:
|
|
include:
|
|
- '*'
|
|
exclude:
|
|
- /tools/releaseBuild/**/*
|
|
- /.vsts-ci/misc-analysis.yml
|
|
|
|
variables:
|
|
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
# Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
|
|
resources:
|
|
- repo: self
|
|
clean: true
|
|
|
|
jobs:
|
|
- template: templates/windows-build.yml
|
|
|
|
- template: templates/windows-test.yml
|
|
parameters:
|
|
purpose: UnelevatedPesterTests
|
|
tagSet: CI
|
|
parentJobs:
|
|
- win_build
|
|
|
|
- template: templates/windows-test.yml
|
|
parameters:
|
|
purpose: ElevatedPesterTests
|
|
tagSet: CI
|
|
parentJobs:
|
|
- win_build
|
|
|
|
- template: templates/windows-test.yml
|
|
parameters:
|
|
purpose: UnelevatedPesterTests
|
|
tagSet: Others
|
|
parentJobs:
|
|
- win_build
|
|
|
|
- template: templates/windows-test.yml
|
|
parameters:
|
|
purpose: ElevatedPesterTests
|
|
tagSet: Others
|
|
parentJobs:
|
|
- win_build
|
|
|
|
- template: templates/windows-packaging.yml
|
|
|
|
- job: verify_xunit
|
|
displayName: Verify xUnit Results
|
|
pool:
|
|
name: 'Hosted VS2017'
|
|
dependsOn:
|
|
- win_build
|
|
steps:
|
|
- task: DownloadBuildArtifacts@0
|
|
displayName: 'Download build artifacts'
|
|
inputs:
|
|
downloadType: specific
|
|
itemPattern: |
|
|
xunit/**/*
|
|
downloadPath: '$(System.ArtifactsDirectory)'
|
|
|
|
- powershell: |
|
|
dir "$(System.ArtifactsDirectory)\*" -Recurse
|
|
displayName: 'Capture artifacts directory'
|
|
continueOnError: true
|
|
|
|
- powershell: |
|
|
Import-Module .\tools\ci.psm1
|
|
$ParallelXUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\ParallelXUnitTestResults.xml"
|
|
|
|
Test-XUnitTestResults -TestResultsFile $ParallelXUnitTestResultsFile
|
|
displayName: Test
|
|
condition: succeeded()
|