Refactors `travis.ps1`. Important for maintainers: I removed the webhook and badge stuff as neither exist anymore. I also merged the build and test phase with the bootstrap phase.
77 lines
2.1 KiB
YAML
77 lines
2.1 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:
|
|
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:
|
|
- job: macOS_CI
|
|
|
|
pool:
|
|
name: Hosted macOS
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
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')
|
|
|
|
- template: ../tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
|
|
|
|
- powershell: |
|
|
Import-Module ./tools/ci.psm1
|
|
Invoke-Bootstrap-Stage
|
|
displayName: Bootstrap
|
|
condition: succeeded()
|
|
|
|
- powershell: |
|
|
Import-Module ./tools/ci.psm1
|
|
$env:NugetKey = '$(NUGET_KEY)'
|
|
Invoke-LinuxTests
|
|
displayName: Build and Test
|
|
condition: succeeded()
|
|
|
|
# Uploads any packages as an artifact
|
|
- powershell: |
|
|
Get-ChildItem -Path ${env:BUILD_ARTIFACTSTAGINGDIRECTORY} -Include *.nupkg, *.pkg, *.tar.gz, TestPackage.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
|
|
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
|
|
}
|
|
displayName: Publish Artifacts
|
|
condition: succeededOrFailed()
|
|
continueOnError: true
|