PowerShell/.vsts-ci/mac.yml

99 lines
2.2 KiB
YAML
Raw Normal View History

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:
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
# Enable VSTS debug mode until stabilitized
system.debug: 'true'
resources:
- repo: self
clean: true
jobs:
- template: templates/ci-build.yml
parameters:
pool: Hosted macOS
jobName: mac_build
displayName: macOS Build
- template: templates/nix-test.yml
parameters:
purpose: UnelevatedPesterTests
tagSet: CI
parentJobs:
- mac_build
- template: templates/nix-test.yml
parameters:
purpose: ElevatedPesterTests
tagSet: CI
parentJobs:
- mac_build
- template: templates/nix-test.yml
parameters:
purpose: UnelevatedPesterTests
tagSet: Others
parentJobs:
- mac_build
- template: templates/nix-test.yml
parameters:
purpose: ElevatedPesterTests
tagSet: Others
parentJobs:
- mac_build
- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: 'Hosted macOS'
dependsOn:
- mac_build
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'
- pwsh: |
Get-ChildItem "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true
- pwsh: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"
Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()