PowerShell/.vsts-ci/mac.yml
2018-10-19 14:56:58 -07:00

62 lines
1.8 KiB
YAML

name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
# Avoid expensive initialization of dotnet cli, see: http://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
phases:
- phase: macOS_CI
queue:
name: Hosted macOS
steps:
- powershell: |
Get-ChildItem -Path env:
displayName: Capture environment
condition: succeededOrFailed()
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')
- powershell: |
git submodule update --init
displayName: SubModule Init
condition: succeededOrFailed()
- powershell: |
tools/travis.ps1 -Stage Bootstrap
displayName: Bootstrap
condition: succeeded()
- powershell: |
$ErrorActionPreference = 'continue'
tools/travis.ps1
displayName: Build and test
condition: succeeded()
- powershell: |
tools/travis.ps1 -Stage Failure
displayName: After Failure
condition: failed()
- powershell: |
tools/travis.ps1 -Stage Success
displayName: After Success
condition: succeeded()
# Uploads any packages as an artifact
- powershell: |
Get-ChildItem -Path *.pkg, *.tar.gz, *.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
}
displayName: Publish Artifacts
condition: ne(variables['Build.Reason'], 'PullRequest')
continueOnError: true