arcade-validation/azure-pipelines-pr.yml

135 строки
4.5 KiB
YAML

variables:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: PoolProvider
value: NetCore-Public
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- name: PoolProvider
value: NetCore1ESPool-Internal
trigger: none
pr:
branches:
include:
- '*'
resources:
containers:
- container: LinuxContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enableTelemetry: true
enableSourceBuild: true
helixRepo: dotnet/arcade-validation
jobs:
- job: Windows_NT
pool:
name: $(PoolProvider) # This is a queue-time parameter; Public default is NetCore-Public; Internal default is NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022.amd64.open
strategy:
matrix:
Build_Release:
_BuildConfig: Release
# PRs or external builds are not signed.
_SignType: test
Build_Debug:
_BuildConfig: Debug
_SignType: test
steps:
- checkout: self
clean: true
# Use utility script to run script command dependent on agent OS.
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
displayName: Windows Build / Publish
- task: ComponentGovernanceComponentDetection@0
displayName: Component Governance scan
- job: Linux
container: LinuxContainer
pool:
name: $(PoolProvider) # This is a queue-time parameter; Public default is NetCore-Public; Internal default is NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
_SignType: none # Test signing is not supported on Linux and macOS.
Build_Release:
_BuildConfig: Release
_SignType: none # Test signing is not supported on Linux and macOS.
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--sign
displayName: Unix Build / Publish
- task: ComponentGovernanceComponentDetection@0
displayName: Component Governance scan
- job: MacOS
pool:
vmImage: macos-12
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
_SignType: none # Test signing is not supported on Linux and macOS.
Build_Release:
_BuildConfig: Release
_SignType: none # Test signing is not supported on Linux and macOS.
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--sign
displayName: Unix Build / Publish
- task: ComponentGovernanceComponentDetection@0
displayName: Component Governance scan
- job: Validate_Helix
pool:
name: $(PoolProvider)
demands: ImageOverride -equals windows.vs2022.amd64.open
variables:
- HelixApiAccessToken: ''
- _BuildConfig: Release
- name: skipComponentGovernanceDetection
value: true
steps:
- template: /eng/common/templates/steps/send-to-helix.yml
parameters:
HelixType: test/product/
XUnitProjects: $(Build.SourcesDirectory)/src/Validation/tests/Validation.Tests.csproj
XUnitTargetFramework: netcoreapp2.0
XUnitRunnerVersion: 2.5.1
XUnitPublishTargetFramework: net9.0
IncludeDotNetCli: true
DotNetCliPackageType: sdk
DotNetCliVersion: 9.0.100-rc.2.24474.11
EnableXUnitReporter: true
WaitForWorkItemCompletion: true
HelixTargetQueues: Windows.Amd64.Server2022.Open;(Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
HelixSource: pr/dotnet/arcade-validation/$(Build.SourceBranch)
IsExternal: true
Creator: arcade-validation
displayName: Validate Helix