2022-12-22 13:04:18 +03:00
|
|
|
# Branches that trigger a build on commit
|
2022-09-01 17:13:02 +03:00
|
|
|
trigger:
|
2023-04-28 16:31:41 +03:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- main
|
|
|
|
- rel/*
|
2024-01-15 20:00:53 +03:00
|
|
|
- dev/3.3.X
|
2023-04-28 16:31:41 +03:00
|
|
|
exclude:
|
|
|
|
- rel/2.*
|
|
|
|
- rel/3.0.*
|
2022-09-01 17:13:02 +03:00
|
|
|
|
2022-12-22 13:04:18 +03:00
|
|
|
# Branch(es) that trigger(s) build(s) on PR
|
2022-09-01 17:06:02 +03:00
|
|
|
pr:
|
2022-12-22 13:04:18 +03:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- main
|
|
|
|
- rel/*
|
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- .github/*
|
|
|
|
- .devcontainer/*
|
2022-12-22 13:38:23 +03:00
|
|
|
- docs/*
|
2022-12-22 15:34:57 +03:00
|
|
|
- .markdownlint.json
|
|
|
|
- .markdownlintignore
|
2022-12-22 13:38:23 +03:00
|
|
|
- CODE_OF_CONDUCT.md
|
|
|
|
- CONTRIBUTING.md
|
|
|
|
- README.md
|
2022-12-22 13:04:18 +03:00
|
|
|
- SECURITY.md
|
2023-11-30 21:58:15 +03:00
|
|
|
- src/**/*.xlf
|
2022-12-22 13:04:18 +03:00
|
|
|
|
|
|
|
parameters:
|
2024-01-23 13:36:12 +03:00
|
|
|
# This option should be used with caution. This is useful for unblocking circular deps issue with testanywhere
|
|
|
|
- name: SkipTests
|
|
|
|
displayName: "Skip tests"
|
|
|
|
type: boolean
|
|
|
|
default: False
|
2022-12-22 13:04:18 +03:00
|
|
|
|
|
|
|
variables:
|
|
|
|
# Cannot use key:value syntax in root defined variables
|
2023-01-03 23:13:17 +03:00
|
|
|
- name: _TeamName
|
2022-12-22 13:04:18 +03:00
|
|
|
value: MSTest
|
|
|
|
- name: Codeql.Enabled
|
|
|
|
value: true
|
|
|
|
- name: _RunAsInternal
|
2024-03-07 17:05:06 +03:00
|
|
|
value: False
|
2022-12-22 13:04:18 +03:00
|
|
|
- name: _RunAsPublic
|
2024-03-07 17:05:06 +03:00
|
|
|
value: True
|
2023-07-13 13:20:23 +03:00
|
|
|
|
2022-12-22 13:04:18 +03:00
|
|
|
stages:
|
|
|
|
|
|
|
|
- stage: build
|
|
|
|
displayName: Build
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enableMicrobuild: true
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enablePublishTestResults: true
|
2023-01-02 17:48:57 +03:00
|
|
|
testResultsFormat: 'vstest'
|
2023-01-03 23:13:17 +03:00
|
|
|
enablePublishBuildAssets: true
|
2022-12-22 13:04:18 +03:00
|
|
|
enablePublishUsingPipelines: true
|
|
|
|
enableTelemetry: true
|
|
|
|
jobs:
|
|
|
|
- job: Windows
|
2023-11-27 22:52:10 +03:00
|
|
|
timeoutInMinutes: 90
|
2022-12-22 13:04:18 +03:00
|
|
|
pool:
|
2024-03-07 17:05:06 +03:00
|
|
|
name: NetCore-Public
|
|
|
|
demands: ImageOverride -equals windows.vs2022preview.amd64.open
|
2022-12-22 13:04:18 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Release:
|
|
|
|
_BuildConfig: Release
|
2024-03-07 17:05:06 +03:00
|
|
|
Debug:
|
|
|
|
_BuildConfig: Debug
|
2022-12-22 13:04:18 +03:00
|
|
|
steps:
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Install Windows SDK'
|
|
|
|
inputs:
|
|
|
|
targetType: filePath
|
2024-02-06 19:37:04 +03:00
|
|
|
filePath: './eng/install-windows-sdk.ps1'
|
2022-12-22 13:04:18 +03:00
|
|
|
failOnStderr: true
|
|
|
|
showWarnings: true
|
2024-06-12 12:07:35 +03:00
|
|
|
|
2024-06-03 17:14:04 +03:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Install procdump'
|
|
|
|
inputs:
|
|
|
|
targetType: filePath
|
|
|
|
filePath: ./eng/install-procdump.ps1
|
|
|
|
failOnStderr: true
|
|
|
|
showWarnings: true
|
2022-12-22 13:04:18 +03:00
|
|
|
|
2023-01-03 23:13:17 +03:00
|
|
|
- script: eng\common\CIBuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
/p:Test=false
|
2024-06-13 23:25:40 +03:00
|
|
|
/p:FastAcceptanceTest=true
|
2023-01-03 23:13:17 +03:00
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
|
2024-01-23 13:36:12 +03:00
|
|
|
- ${{ if eq(parameters.SkipTests, False) }}:
|
|
|
|
# -ci is allowing to import some environment variables and some required configurations
|
2024-06-12 12:57:53 +03:00
|
|
|
# -nobl avoids overwriting build binlog with binlog from tests
|
2024-01-23 13:36:12 +03:00
|
|
|
- script: Test.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-ci
|
2024-06-12 12:57:53 +03:00
|
|
|
-nobl
|
2024-01-23 13:36:12 +03:00
|
|
|
name: Test
|
|
|
|
displayName: Test
|
|
|
|
|
|
|
|
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
|
|
|
|
# through the console or trx
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Test Results folders'
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
|
|
|
|
ArtifactName: TestResults
|
|
|
|
condition: failed()
|
2022-12-22 13:04:18 +03:00
|
|
|
|
2023-11-27 22:52:10 +03:00
|
|
|
- job: Linux
|
|
|
|
timeoutInMinutes: 90
|
|
|
|
pool:
|
2024-03-07 17:05:06 +03:00
|
|
|
name: NetCore-Public
|
2024-06-12 12:07:35 +03:00
|
|
|
demands: ImageOverride -equals build.ubuntu.2004.amd64.open
|
2023-11-27 22:52:10 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Release:
|
|
|
|
_BuildConfig: Release
|
2024-03-07 17:05:06 +03:00
|
|
|
Debug:
|
|
|
|
_BuildConfig: Debug
|
2023-11-27 22:52:10 +03:00
|
|
|
steps:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
/p:Test=false
|
2023-11-27 23:27:47 +03:00
|
|
|
/p:NonWindowsBuild=true
|
2024-06-13 23:25:40 +03:00
|
|
|
/p:FastAcceptanceTest=true
|
2023-11-27 22:52:10 +03:00
|
|
|
displayName: Build
|
|
|
|
|
2024-01-23 13:36:12 +03:00
|
|
|
- ${{ if eq(parameters.SkipTests, False) }}:
|
2024-06-12 15:32:19 +03:00
|
|
|
# --ci is allowing to import some environment variables and some required configurations
|
2024-06-12 16:08:22 +03:00
|
|
|
# --nobl avoids overwriting build binlog with binlog from tests
|
2024-01-23 13:36:12 +03:00
|
|
|
- script: |
|
|
|
|
chmod +x ./test.sh
|
2024-06-13 23:25:40 +03:00
|
|
|
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl
|
2024-01-23 13:36:12 +03:00
|
|
|
name: Test
|
|
|
|
displayName: Tests
|