aspnetcore-tooling/azure-pipelines.yml

270 строки
8.3 KiB
YAML
Исходник Постоянная ссылка Обычный вид История

#
2019-05-29 23:06:38 +03:00
# See https://docs.microsoft.com/azure/devops/pipelines/yaml-schema for reference.
#
variables:
- template: /eng/common/templates/variables/pool-providers.yml
- name: Build.Repository.Clean
value: true
- name: _TeamName
value: AspNetCore
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
2023-08-31 04:05:40 +03:00
- name: LogLevel
2023-12-22 04:25:45 +03:00
value: 'All'
2023-12-08 06:41:21 +03:00
- name: RunIntegrationTests
value: false
2024-04-10 11:58:49 +03:00
- name: _InternalRuntimeDownloadArgs
value: ''
- name: Codeql.Enabled
value: false
- name: Codeql.SkipTaskAutoInjection
value: true
trigger:
2019-05-29 23:06:38 +03:00
batch: true
branches:
include:
- main
- main-vs-deps
2019-05-29 23:06:38 +03:00
- release/*
2019-11-25 22:03:52 +03:00
- internal/release/3.*
pr:
2019-05-29 23:06:38 +03:00
autoCancel: true
branches:
include:
- '*'
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: false
enablePublishTestResults: false
enablePublishUsingPipelines: false
enableSourcebuild: true
jobs:
# Code check
2024-04-10 11:58:49 +03:00
- job: Code_check
displayName: Code check
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64.open
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- powershell: ./restore.cmd -msbuildEngine dotnet -ci $(_InternalRuntimeDownloadArgs); ./eng/scripts/CodeCheck.ps1 -ci
displayName: Run eng/scripts/CodeCheck.ps1
# Windows based jobs. This needs to be separate from Unix based jobs because it generates
# TRX files. That can only be toggled at the top level template level, not at the individual
# job.
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: false
enablePublishTestResults: true
enableTelemetry: true
2022-11-09 05:16:47 +03:00
helixRepo: dotnet/razor
helixType: build.product/
jobs:
- job: Windows
timeoutInMinutes: 120
pool:
2024-04-10 11:58:49 +03:00
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64.open
strategy:
matrix:
2024-04-10 11:58:49 +03:00
debug:
_BuildConfig: Debug
_PublishArgs: ''
release:
_BuildConfig: Release
_PublishArgs: ''
variables:
- _BuildArgs: ''
- XUNIT_LOGS: '$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)'
- __VSNeverShowWhatsNew: 1
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- powershell: ./eng/scripts/InstallProcDump.ps1
displayName: Install ProcDump
- powershell: ./eng/scripts/StartDumpCollectionForHangingBuilds.ps1
$(ProcDumpPath)procdump.exe artifacts/log/$(_BuildConfig)
(Get-Date).AddMinutes(60)
devenv, xunit.console, xunit.console.x86
displayName: Start background dump collection
# Don't create a binary log until we can customize the name
# https://github.com/dotnet/arcade/pull/12988
- script: eng\cibuild.cmd
2020-05-14 21:40:07 +03:00
-configuration $(_BuildConfig)
2022-04-29 20:35:43 +03:00
-msbuildEngine vs
2020-05-14 21:40:07 +03:00
-prepareMachine
-restore
-nobl
name: Restore
displayName: Restore
condition: succeeded()
- powershell: eng\SetupVSHive.ps1
displayName: Setup VS Hive
- script: eng\cibuild.cmd
-configuration $(_BuildConfig)
-msbuildEngine vs
-prepareMachine
-build
-pack
2022-11-23 08:38:25 +03:00
-publish
-sign
2020-05-14 21:40:07 +03:00
$(_BuildArgs)
$(_PublishArgs)
$(_InternalRuntimeDownloadArgs)
2022-11-23 08:38:25 +03:00
name: Build
displayName: Build and Deploy
condition: succeeded()
- script: eng\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-test
-nobl
name: Run_Unit_Tests
displayName: Run Unit Tests
condition: and(succeeded(), in(variables['Build.Reason'], 'PullRequest'))
- script: eng\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-integrationTest
name: Run_Integration_Tests
displayName: Run Integration Tests
2023-12-08 07:01:55 +03:00
condition: and(eq(variables['RunIntegrationTests'], true), succeeded(), in(variables['Build.Reason'], 'PullRequest'))
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/log/$(_BuildConfig)
displayName: Finish background dump collection
continueOnError: true
condition: always()
- publish: artifacts/log/$(_BuildConfig)
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) Logs
displayName: Publish Build Artifacts
condition: always()
- publish: artifacts/TestResults/$(_BuildConfig)
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) TestResults
displayName: Publish Test Artifacts
condition: in(variables['Build.Reason'], 'PullRequest')
# Publish an artifact that the RoslynInsertionTool is able to find by its name.
- publish: artifacts\VSSetup\$(_BuildConfig)
artifact: VSSetup
displayName: Publish VSSetup
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
- publish: artifacts\packages\$(_BuildConfig)
artifact: Packages_$(Agent.Os)_$(_BuildConfig)
displayName: Publish package artifacts
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
# Unix jobs done as a group since they share the same test results format.
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: false
enablePublishTestResults: true
enableTelemetry: true
testResultsFormat: xunit
helixRepo: dotnet/razor
helixType: build.product/
jobs:
- job: macOS
pool:
vmImage: macOS-12
strategy:
matrix:
release:
_BuildConfig: Release
2024-04-10 11:58:49 +03:00
debug:
_BuildConfig: Debug
variables:
- _BuildArgs: ''
steps:
- script: eng/cibuild.sh
--restore
--build
--pack
--publish
--configuration $(_BuildConfig)
--prepareMachine
--test
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Restore, Build and Test
condition: succeeded()
- publish: artifacts/TestResults/$(_BuildConfig)
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) TestResults
displayName: Publish Test Results
condition: always()
- job: Linux
container:
2024-03-21 02:04:05 +03:00
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0
options: --init # This ensures all the stray defunct processes are reaped.
pool:
2024-04-10 11:58:49 +03:00
name: NetCore-Public
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open
2022-11-09 20:07:52 +03:00
strategy:
matrix:
release:
_BuildConfig: Release
2024-04-10 11:58:49 +03:00
debug:
_BuildConfig: Debug
variables:
- LC_ALL: 'en_US.UTF-8'
- LANG: 'en_US.UTF-8'
- LANGUAGE: 'en_US.UTF-8'
- _BuildArgs: ''
steps:
- script: eng/cibuild.sh
--restore
--build
--pack
--publish
--configuration $(_BuildConfig)
--prepareMachine
--test
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Restore, Build and Test
condition: succeeded()
- publish: artifacts/TestResults/$(_BuildConfig)/
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) TestResults
displayName: Publish Test Results
condition: always()