зеркало из https://github.com/microsoft/testfx.git
199 строки
6.6 KiB
YAML
199 строки
6.6 KiB
YAML
# Branches that trigger a build on commit
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel/*
|
|
exclude:
|
|
- rel/2.*
|
|
- rel/3.0.*
|
|
|
|
parameters:
|
|
- name: isRTM
|
|
displayName: "Produce RTM version?"
|
|
type: boolean
|
|
default: False
|
|
- name: products
|
|
displayName: "Select the products to generate"
|
|
type: string
|
|
default: all
|
|
values:
|
|
- all
|
|
- mstest
|
|
- testing-platform
|
|
# 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
|
|
|
|
variables:
|
|
- template: /eng/common/templates-official/variables/pool-providers.yml@self
|
|
# Cannot use key:value syntax in root defined variables
|
|
- name: _TeamName
|
|
value: MSTest
|
|
- name: _RunAsInternal
|
|
value: True
|
|
- name: _RunAsPublic
|
|
value: False
|
|
- name: _ReleaseVersionKind
|
|
value: ''
|
|
- name: _BuildConfig
|
|
value: Release
|
|
- name: _Products
|
|
value: ${{parameters.products}}
|
|
# _SignType and _Sign are required for signing even if not used directly here
|
|
- name: _SignType
|
|
value: real
|
|
- name: _Sign
|
|
value: True
|
|
|
|
- ${{ if eq(parameters.isRTM, True) }}:
|
|
- name: _ReleaseVersionKind
|
|
value: release
|
|
|
|
- group: DotNet-Symbol-Server-Pats
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: 1ESPipelineTemplates
|
|
type: git
|
|
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
|
ref: refs/tags/release
|
|
|
|
extends:
|
|
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
|
parameters:
|
|
sdl:
|
|
policheck:
|
|
enabled: true
|
|
featureFlags:
|
|
autoBaseline: true
|
|
pool:
|
|
name: $(DncEngInternalBuildPool)
|
|
image: windows.vs2022.amd64
|
|
os: windows
|
|
customBuildTags:
|
|
- ES365AIMigrationTooling
|
|
stages:
|
|
|
|
- stage: build
|
|
displayName: Build
|
|
jobs:
|
|
|
|
- template: /eng/common/templates-official/jobs/jobs.yml@self
|
|
parameters:
|
|
enableMicrobuild: true
|
|
enablePublishBuildArtifacts: true
|
|
enablePublishTestResults: true
|
|
testResultsFormat: 'vstest'
|
|
enablePublishBuildAssets: true
|
|
enablePublishUsingPipelines: true
|
|
enableTelemetry: true
|
|
jobs:
|
|
- job: Windows
|
|
timeoutInMinutes: 90
|
|
pool:
|
|
name: $(DncEngInternalBuildPool)
|
|
image: windows.vs2022.amd64
|
|
os: windows
|
|
steps:
|
|
- task: PowerShell@2
|
|
displayName: 'Install Windows SDK'
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: './eng/install-windows-sdk.ps1'
|
|
failOnStderr: true
|
|
showWarnings: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: 'Install procdump'
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: ./eng/install-procdump.ps1
|
|
failOnStderr: true
|
|
showWarnings: true
|
|
|
|
|
|
- script: eng\common\CIBuild.cmd
|
|
-configuration $(_BuildConfig)
|
|
-prepareMachine
|
|
/p:TeamName=$(_TeamName)
|
|
/p:DotNetFinalVersionKind=$(_ReleaseVersionKind)
|
|
/p:DotNetPublishUsingPipelines=true
|
|
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
|
/p:ProductsToBuild=$(_Products)
|
|
/p:Test=false
|
|
name: Build
|
|
displayName: Build
|
|
|
|
- ${{ 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
|
|
- script: Test.cmd
|
|
-configuration $(_BuildConfig)
|
|
-ci
|
|
-nobl
|
|
name: Test
|
|
displayName: Test
|
|
|
|
# Remove temporary artifacts to avoid finding binskim issues for exes we don't own.
|
|
- pwsh: |
|
|
Remove-Item -Path $(Build.SourcesDirectory)/artifacts/tmp -Recurse -Force
|
|
displayName: Remove artifacts/tmp
|
|
|
|
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
|
|
# through the console or trx
|
|
- task: 1ES.PublishBuildArtifacts@1
|
|
displayName: 'Publish Test Results folders'
|
|
inputs:
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
|
|
ArtifactName: TestResults
|
|
condition: failed()
|
|
|
|
- task: NuGetAuthenticate@1
|
|
displayName: 'NuGet Authenticate to test-tools feed'
|
|
|
|
- task: 1ES.PublishNuget@1
|
|
displayName: 'Publish NuGet packages to test-tools feed'
|
|
inputs:
|
|
# Do not push symbol packages nor Microsoft.Testing.Platform package
|
|
packageParentPath: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)'
|
|
packagesToPush: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/**/*.symbols.nupkg;!$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/NonShipping/Microsoft.Testing.Platform.*.nupkg'
|
|
publishVstsFeed: 'public/test-tools'
|
|
|
|
- job: Linux
|
|
timeoutInMinutes: 90
|
|
pool:
|
|
name: $(DncEngInternalBuildPool)
|
|
image: 1es-ubuntu-2204
|
|
os: linux
|
|
steps:
|
|
- script: eng/common/cibuild.sh
|
|
-configuration $(_BuildConfig)
|
|
-prepareMachine
|
|
/p:Test=false
|
|
/p:NonWindowsBuild=true
|
|
displayName: Build
|
|
|
|
- ${{ 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
|
|
- script: |
|
|
chmod +x ./test.sh
|
|
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl
|
|
name: Test
|
|
displayName: Tests
|
|
|
|
- ${{ if eq(variables['Build.SourceBranchName'], 'main') }}:
|
|
- template: /eng/common/templates-official/job/onelocbuild.yml@self
|
|
parameters:
|
|
GitHubOrg: microsoft
|
|
MirrorRepo: testfx
|
|
LclSource: lclFilesfromPackage
|
|
LclPackageId: 'LCL-JUNO-PROD-TESTFX'
|
|
|
|
- template: eng\common\templates-official\post-build\post-build.yml@self
|