testfx/azure-pipelines.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

158 строки
4.3 KiB
YAML
Исходник Обычный вид История

2022-12-22 13:04:18 +03:00
# Branches that trigger a build on commit
2022-09-01 17:13:02 +03:00
trigger:
branches:
include:
- main
- rel/*
2024-01-15 20:00:53 +03:00
- dev/3.3.X
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
value: False
2022-12-22 13:04:18 +03:00
- name: _RunAsPublic
value: True
2022-12-22 15:34:57 +03:00
# Set default value for variables of PR and Public builds
- name: _SignType
value: test
- name: _SignArgs
value: ''
- name: _Sign
value: False
2023-01-03 23:13:17 +03:00
- name: _InternalBuildArgs
2022-12-22 13:04:18 +03:00
value: ' '
2023-07-13 13:20:23 +03:00
- name: _ReleaseVersionKind
value: ''
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
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:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022preview.amd64.open
2022-12-22 13:04:18 +03:00
strategy:
matrix:
Release:
_BuildConfig: Release
Debug:
_BuildConfig: Debug
2022-12-22 13:04:18 +03:00
steps:
- task: PowerShell@2
displayName: 'Install Windows SDK'
inputs:
targetType: filePath
filePath: './eng/install-windows-sdk.ps1'
2022-12-22 13:04:18 +03:00
failOnStderr: true
showWarnings: true
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
$(_InternalBuildArgs)
/p:Test=false
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
# -nobl avoids overwriting build binlog with binlog from tests
2024-01-23 13:36:12 +03:00
- script: Test.cmd
-configuration $(_BuildConfig)
-ci
-nobl
/p:FastAcceptanceTest=true
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:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.2004.amd64.open
2023-11-27 22:52:10 +03:00
strategy:
matrix:
Release:
_BuildConfig: Release
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
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-01-23 13:36:12 +03:00
- script: |
chmod +x ./test.sh
2024-06-12 15:49:20 +03:00
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest /p:FastAcceptanceTest=true
2024-01-23 13:36:12 +03:00
name: Test
displayName: Tests