2023-01-10 04:57:58 +03:00
|
|
|
#
|
2019-05-29 23:06:38 +03:00
|
|
|
# See https://docs.microsoft.com/azure/devops/pipelines/yaml-schema for reference.
|
|
|
|
#
|
|
|
|
|
2018-12-02 03:25:55 +03:00
|
|
|
variables:
|
2023-03-06 23:37:08 +03:00
|
|
|
- template: /eng/common/templates/variables/pool-providers.yml
|
2019-01-16 02:56:11 +03:00
|
|
|
- name: Build.Repository.Clean
|
|
|
|
value: true
|
|
|
|
- name: _TeamName
|
|
|
|
value: AspNetCore
|
2019-03-01 02:01:52 +03:00
|
|
|
- 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
|
2020-03-07 09:17:29 +03:00
|
|
|
|
2018-12-02 03:25:55 +03:00
|
|
|
trigger:
|
2019-05-29 23:06:38 +03:00
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
2021-03-20 03:30:20 +03:00
|
|
|
- main
|
2021-05-18 19:31:45 +03:00
|
|
|
- main-vs-deps
|
2019-05-29 23:06:38 +03:00
|
|
|
- release/*
|
2019-11-25 22:03:52 +03:00
|
|
|
- internal/release/3.*
|
2018-12-02 03:25:55 +03:00
|
|
|
|
|
|
|
pr:
|
2019-05-29 23:06:38 +03:00
|
|
|
autoCancel: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- '*'
|
2018-12-02 03:25:55 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
stages:
|
|
|
|
- stage: build
|
|
|
|
displayName: Build
|
|
|
|
jobs:
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enablePublishBuildArtifacts: false
|
|
|
|
enablePublishTestResults: false
|
|
|
|
enablePublishUsingPipelines: false
|
2023-04-03 18:15:33 +03:00
|
|
|
enableSourcebuild: true
|
2019-07-22 08:17:43 +03:00
|
|
|
jobs:
|
2020-04-04 09:15:30 +03:00
|
|
|
# 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
|
2019-02-19 20:17:05 +03:00
|
|
|
|
2023-04-03 18:15:33 +03:00
|
|
|
# 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.
|
2019-07-22 08:17:43 +03:00
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
2023-03-30 00:59:23 +03:00
|
|
|
enablePublishBuildArtifacts: false
|
2019-07-22 08:17:43 +03:00
|
|
|
enablePublishTestResults: true
|
|
|
|
enableTelemetry: true
|
2022-11-09 05:16:47 +03:00
|
|
|
helixRepo: dotnet/razor
|
2019-07-22 08:17:43 +03:00
|
|
|
helixType: build.product/
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
jobs:
|
|
|
|
- job: Windows
|
2022-07-27 06:43:30 +03:00
|
|
|
timeoutInMinutes: 120
|
2019-07-22 08:17:43 +03:00
|
|
|
pool:
|
2024-04-10 11:58:49 +03:00
|
|
|
name: $(DncEngPublicBuildPool)
|
|
|
|
demands: ImageOverride -equals windows.vs2022preview.amd64.open
|
2019-07-22 08:17:43 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-10 11:58:49 +03:00
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
_PublishArgs: ''
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
_PublishArgs: ''
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
variables:
|
|
|
|
- _BuildArgs: ''
|
2022-04-08 01:22:29 +03:00
|
|
|
- XUNIT_LOGS: '$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)'
|
2022-10-12 00:58:39 +03:00
|
|
|
- __VSNeverShowWhatsNew: 1
|
2019-04-15 00:00:50 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
steps:
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'Clear NuGet caches'
|
|
|
|
condition: succeeded()
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: 'locals all -clear'
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-09-19 19:36:02 +03:00
|
|
|
- powershell: ./eng/scripts/InstallProcDump.ps1
|
|
|
|
displayName: Install ProcDump
|
2022-10-27 20:21:29 +03:00
|
|
|
|
|
|
|
- powershell: ./eng/scripts/StartDumpCollectionForHangingBuilds.ps1
|
|
|
|
$(ProcDumpPath)procdump.exe artifacts/log/$(_BuildConfig)
|
|
|
|
(Get-Date).AddMinutes(60)
|
|
|
|
devenv, xunit.console, xunit.console.x86
|
2019-09-19 19:36:02 +03:00
|
|
|
displayName: Start background dump collection
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2023-03-29 19:48:14 +03:00
|
|
|
# Don't create a binary log until we can customize the name
|
|
|
|
# https://github.com/dotnet/arcade/pull/12988
|
2022-03-28 21:02:43 +03:00
|
|
|
- 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
|
2022-03-28 21:02:43 +03:00
|
|
|
-restore
|
2023-03-30 23:02:14 +03:00
|
|
|
-nobl
|
2023-03-29 19:48:14 +03:00
|
|
|
name: Restore
|
|
|
|
displayName: Restore
|
|
|
|
condition: succeeded()
|
|
|
|
|
2023-03-30 00:59:23 +03:00
|
|
|
- powershell: eng\SetupVSHive.ps1
|
|
|
|
displayName: Setup VS Hive
|
|
|
|
|
2023-03-29 19:48:14 +03:00
|
|
|
- script: eng\cibuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-msbuildEngine vs
|
|
|
|
-prepareMachine
|
2022-03-28 21:02:43 +03:00
|
|
|
-build
|
|
|
|
-pack
|
2022-11-23 08:38:25 +03:00
|
|
|
-publish
|
2022-03-31 02:29:16 +03:00
|
|
|
-sign
|
2020-05-14 21:40:07 +03:00
|
|
|
$(_BuildArgs)
|
2019-07-22 08:17:43 +03:00
|
|
|
$(_PublishArgs)
|
2019-12-11 00:05:34 +03:00
|
|
|
$(_InternalRuntimeDownloadArgs)
|
2022-11-23 08:38:25 +03:00
|
|
|
name: Build
|
|
|
|
displayName: Build and Deploy
|
2022-03-28 21:02:43 +03:00
|
|
|
condition: succeeded()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2024-07-09 12:51:59 +03:00
|
|
|
# Needed for Microsoft.AspNetCore.Razor.Microbenchmarks.Generator tests
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .NET 8 runtime'
|
|
|
|
inputs:
|
|
|
|
packageType: runtime
|
|
|
|
version: 8.x
|
|
|
|
installationPath: '$(Build.SourcesDirectory)\.dotnet'
|
|
|
|
|
2022-03-28 21:02:43 +03:00
|
|
|
- script: eng\CIBuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
-test
|
2023-03-30 23:02:14 +03:00
|
|
|
-nobl
|
2023-03-29 19:48:14 +03:00
|
|
|
name: Run_Unit_Tests
|
|
|
|
displayName: Run Unit Tests
|
2023-04-26 00:56:30 +03:00
|
|
|
condition: and(succeeded(), in(variables['Build.Reason'], 'PullRequest'))
|
2023-03-29 19:48:14 +03:00
|
|
|
|
|
|
|
- script: eng\CIBuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
2023-03-23 03:30:22 +03:00
|
|
|
-integrationTest
|
2023-03-29 19:48:14 +03:00
|
|
|
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'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-09-19 19:36:02 +03:00
|
|
|
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/log/$(_BuildConfig)
|
|
|
|
displayName: Finish background dump collection
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2023-03-30 00:59:23 +03:00
|
|
|
- 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
|
2023-04-26 00:56:30 +03:00
|
|
|
condition: in(variables['Build.Reason'], 'PullRequest')
|
2022-11-30 03:20:27 +03:00
|
|
|
|
2022-11-22 01:46:22 +03:00
|
|
|
# Publish an artifact that the RoslynInsertionTool is able to find by its name.
|
2023-03-30 00:59:23 +03:00
|
|
|
- publish: artifacts\VSSetup\$(_BuildConfig)
|
|
|
|
artifact: VSSetup
|
|
|
|
displayName: Publish VSSetup
|
2019-07-22 08:17:43 +03:00
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2023-03-30 00:59:23 +03:00
|
|
|
- publish: artifacts\packages\$(_BuildConfig)
|
|
|
|
artifact: Packages_$(Agent.Os)_$(_BuildConfig)
|
2019-07-22 08:17:43 +03:00
|
|
|
displayName: Publish package artifacts
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2023-04-03 18:15:33 +03:00
|
|
|
# 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:
|
2022-12-23 11:25:28 +03:00
|
|
|
- job: macOS
|
|
|
|
pool:
|
|
|
|
vmImage: macOS-12
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
2024-04-10 11:58:49 +03:00
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
2023-04-03 18:15:33 +03:00
|
|
|
|
2023-03-30 23:02:14 +03:00
|
|
|
variables:
|
|
|
|
- _BuildArgs: ''
|
|
|
|
|
2022-12-23 11:25:28 +03:00
|
|
|
steps:
|
2023-03-30 23:02:14 +03:00
|
|
|
- script: eng/cibuild.sh
|
|
|
|
--restore
|
|
|
|
--build
|
|
|
|
--pack
|
|
|
|
--publish
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
--test
|
|
|
|
$(_BuildArgs)
|
|
|
|
$(_InternalRuntimeDownloadArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Restore, Build and Test
|
|
|
|
condition: succeeded()
|
|
|
|
|
2024-07-03 04:42:42 +03:00
|
|
|
- publish: artifacts/log/$(_BuildConfig)
|
|
|
|
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) Logs
|
|
|
|
displayName: Publish Build Artifacts
|
|
|
|
condition: always()
|
|
|
|
|
2023-03-30 00:59:23 +03:00
|
|
|
- publish: artifacts/TestResults/$(_BuildConfig)
|
|
|
|
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) TestResults
|
|
|
|
displayName: Publish Test Results
|
2022-12-23 11:25:28 +03:00
|
|
|
condition: always()
|
2022-02-02 23:26:46 +03:00
|
|
|
|
2022-12-23 11:25:28 +03:00
|
|
|
- job: Linux
|
|
|
|
container:
|
2024-03-21 02:04:05 +03:00
|
|
|
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0
|
2022-12-23 11:25:28 +03:00
|
|
|
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
|
|
|
|
2022-12-23 11:25:28 +03:00
|
|
|
strategy:
|
2023-04-03 18:15:33 +03:00
|
|
|
matrix:
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
2024-04-10 11:58:49 +03:00
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
2023-03-30 23:02:14 +03:00
|
|
|
|
|
|
|
variables:
|
|
|
|
- LC_ALL: 'en_US.UTF-8'
|
|
|
|
- LANG: 'en_US.UTF-8'
|
|
|
|
- LANGUAGE: 'en_US.UTF-8'
|
|
|
|
- _BuildArgs: ''
|
|
|
|
|
2022-12-23 11:25:28 +03:00
|
|
|
steps:
|
2023-03-30 23:02:14 +03:00
|
|
|
- script: eng/cibuild.sh
|
|
|
|
--restore
|
|
|
|
--build
|
|
|
|
--pack
|
|
|
|
--publish
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
--test
|
|
|
|
$(_BuildArgs)
|
|
|
|
$(_InternalRuntimeDownloadArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Restore, Build and Test
|
|
|
|
condition: succeeded()
|
|
|
|
|
2024-07-03 04:42:42 +03:00
|
|
|
- publish: artifacts/log/$(_BuildConfig)
|
|
|
|
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) Logs
|
|
|
|
displayName: Publish Build Artifacts
|
|
|
|
condition: always()
|
|
|
|
|
2023-03-30 00:59:23 +03:00
|
|
|
- publish: artifacts/TestResults/$(_BuildConfig)/
|
|
|
|
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) TestResults
|
|
|
|
displayName: Publish Test Results
|
2022-12-23 11:25:28 +03:00
|
|
|
condition: always()
|