symreader/azure-pipelines.yml

141 строка
5.4 KiB
YAML

trigger:
batch: true
branches:
include:
- main
variables:
- template: /eng/common/templates-official/variables/pool-providers.yml@self
- name: TeamName
value: Roslyn
schedules:
- cron: "0 8 22-28 * 0" # Fourth Sunday of each month at 8:00 UTC
displayName: "Monthly build check"
branches:
include:
- main
- release/*
always: true # Run even if there have been no source code changes since the last successful scheduled run
batch: false # Do not run the pipeline if the previously scheduled run is in-progress
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
sdl:
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates-official/jobs/jobs.yml@self
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishTestResults: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enableTelemetry: true
enableSourceBuild: true
helixRepo: dotnet/symreader
jobs:
- job: Windows
pool:
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
vmImage: 'windows-latest'
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
variables:
# Only enable publishing in official builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: Publish-Build-Assets
- name: _OfficialBuildArgs
value: /p:DotNetSignType=$(_SignType)
/p:TeamName=$(TeamName)
/p:DotNetPublishUsingPipelines=true
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
# else
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: _OfficialBuildArgs
value: ''
strategy:
matrix:
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
Debug:
_BuildConfig: Debug
_SignType: test
_BuildArgs: ''
Release:
_BuildConfig: Release
# PRs or external builds are not signed.
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
_SignType: test
_BuildArgs: ''
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_SignType: real
_BuildArgs: $(_OfficialBuildArgs)
steps:
- checkout: self
clean: true
- script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_BuildArgs)
displayName: Build and Test
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- job: MacOS
displayName: 'MacOS'
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Debug:
_BuildConfig: Debug
_SignType: none
Release:
_BuildConfig: Release
_SignType: none
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine
displayName: Build and Test
- job: Linux
displayName: 'Linux'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Debug:
_BuildConfig: Debug
_SignType: none
Release:
_BuildConfig: Release
_SignType: none
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine
displayName: Build and Test
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates-official/post-build/post-build.yml@self
parameters:
publishingInfraVersion: 3
enableSymbolValidation: false