提交 c38ed78e 编写于 作者: S Santiago Fernandez Madero 提交者: GitHub

Add Azure Dev Ops CI and Official build yml definitions (dotnet/corefx#33821)

* Move CI validation legs to yml using Azure Dev Ops

* Change corefx-base to take jobs as parameters

* Add official build support

* Add publish step and stop using buildtools to publish

* Rebase and change variables syntax to new '- key: value' syntax


Commit migrated from https://github.com/dotnet/corefx/commit/f8e0a2bbf31885356d786eef47ea0ed5db534f7f
上级 c7114fbc
# Disable triggers for now. TODO: add right merge triggers.
trigger: none
# TODO: add paths to exclude CI when modifying docs or stuff not affecting the build
# TODO: enable PR triggers when helix SDK issues are fixed
pr: none
resources:
containers:
- container: rhel7_container
image: microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2
- container: rhel6_container
image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331
- container: alpine_36_container
image: microsoft/dotnet-buildtools-prereqs:alpine-3.6-WithNode-f4d3fe3-20181213005010
- container: ubuntu_1604_arm64_cross_container
image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
- container: ubuntu_1604_arm_cross_container
image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-ef0ac75-20175511035548
jobs:
# Windows legs
- template: /eng/pipelines/windows.yml
${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
parameters:
isOfficialBuild: true
# Linux legs
- template: /eng/pipelines/linux.yml
${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
parameters:
isOfficialBuild: true
# MacOS legs
- template: /eng/pipelines/macos.yml
${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
parameters:
isOfficialBuild: true
# Only run in official builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
# Redhat6 leg is only for official builds
- template: /eng/pipelines/redhat6.yml
# Publish step
- template: /eng/pipelines/publish.yml
\ No newline at end of file
parameters:
# Required: TargetOS value to know what script commands to use
# Accepted values:
# - Windows_NT
# - Linux
# - OSX
# - FreeBSD
targetOS: ''
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
jobs: []
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
# EACH JOB SHOULD INCLUDE THE FOLLOWING PROPERTIES (ASIDE FROM THE REQUIRED ONES IN THE JOB SCHEMA)
# Required: as part of the strategy matrix, the following variables should be defined
# _configuration: Debug | Release
# _architecture: x64 | x86 | arm | arm64
# _framework: (netcoreapp, netfx, uap, etc).
# _helixQueues: Windows.Amd64 (Only needed if submitToHelix -> true.) -- Queues should be separated by + if multiple.
# Required: as part of the variables object, the following values need to be passed:
# _skipTests: true | false
# _outerloop: true | false
# Required: submitToHelix -> Boolean -> Value to know if it should submit tests payloads to helix.
# Optional: buildScriptPrefix -> String -> string to append to Unix build script.
# buildScriptPrefix: 'HOME=/home/ ' -> 'HOME=/home/ ./build.sh ...'
# Optional: buildExtraArguments -> String -> string to append at the end of the build arguments
# buildExtraArguments: /p:RuntimeOS=win10 -> 'build.cmd ... /p:RuntimeOS=win10'
# Optional: customBuildSteps -> Array -> list of steps to run instead of the common build steps.
# customBuildSteps:
# - script: echo Hello World
# displayName: MyScript
# Optional: enableMicrobuild -> Boolean - if microbuild plugin for signing should be enabled
# Default: false
# Optional: preBuildSteps -> Array -> list of steps to be executed before common build steps.
# In example, to install build dependencies, or setup an environment.
# preBuildSteps:
# - script: brew install cmake
# displayName: Install Cmake
# timeoutInMinutes: if a job doesn't define it, we will default it to 150 minutes
jobs:
- ${{ each job in parameters.jobs }}:
- template: ../common/templates/job/job.yml
parameters:
variables:
# pass along job variables
- ${{ each variable in job.variables }}:
- ${{ if ne(variable.name, '') }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}
# handle key-value variable syntax.
# example:
# - [key]: [value]
- ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}:
- ${{ each pair in variable }}:
- name: ${{ pair.key }}
value: ${{ pair.value }}
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber)
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- _msbuildCommonParameters: ''
- ${{ if eq(job.submitToHelix, 'true') }}:
- group: DotNet-HelixApi-Access
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- HelixApiAccessToken: $(BotAccount-dotnet-github-anon-kaonashi-bot-helix-token)
# Windows variables
- ${{ if eq(parameters.targetOS, 'Windows_NT') }}:
- _buildScript: build.cmd
- _commonArguments: -ci -includetests
- _msbuildCommand: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _optionalToolsArguments: /p:OptionalToolSourceUser=dn-bot
/p:OptionalToolSource=$(OptionalToolSourceUri)
/p:OptionalToolSourcePassword=$(dn-bot-devdiv-nuget-feed-read)
- _windowsOfficialBuildArguments: -sign
/p:DotNetSignType=$(_SignType)
/p:EnableProfileGuidedOptimization=true
$(_optionalToolsArguments)
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- _windowsOfficialBuildArguments: ''
# Optional tooling variables
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- group: DotNet-Internal-Tools-Feed
# Non-Windows variables
- ${{ if ne(parameters.targetOS, 'Windows_NT') }}:
- _buildScript: ${{ job.buildScriptPrefix }}./build.sh
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _commonArguments: --ci -includetests -stripSymbols
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- _commonArguments: --ci -includetests
- _msbuildCommand: ${{ job.buildScriptPrefix }}./eng/common/msbuild.sh --warnaserror false --ci
- _windowsOfficialBuildArguments: ''
- ${{ if and(eq(job.enableMicrobuild, 'true'), eq(parameters.isOfficialBuild, 'true')) }}:
- _TeamName: DotNetCore
- _SignType: real
# pass along job properties
${{ each property in job }}:
${{ if and(ne(property.key, 'job'), ne(property.key, 'variables'), ne(property.key, 'enableMicrobuild')) }}:
${{ property.key }}: ${{ property.value }}
name: ${{ job.job }}
workspace:
clean: all
${{ if ne(job.enableMicrobuild, '') }}:
enableMicrobuild: ${{ job.enableMicrobuild }}
${{ if eq(job.timeoutInMinutes, '') }}:
timeoutInMinutes: 150
steps:
- ${{ if ne(job.preBuildSteps[0], '') }}:
- ${{ job.preBuildSteps }}
- ${{ if eq(job.customBuildSteps[0], '') }}:
- script: $(_buildScript)
$(_commonArguments)
-framework $(_framework)
/p:ArchGroup=$(_architecture)
/p:ConfigurationGroup=$(_configuration)
/p:SkipTests=$(_skipTests)
/p:Outerloop=$(_outerloop)
/p:ArchiveTests=${{ job.submitToHelix }}
${{ job.buildExtraArguments }}
$(_msbuildCommonParameters)
$(_windowsOfficialBuildArguments)
displayName: Build Sources and Tests
- ${{ if ne(job.customBuildSteps[0], '') }}:
- ${{ job.customBuildSteps }}
- ${{ if eq(job.submitToHelix, 'true') }}:
- template: /eng/pipelines/helix.yml
parameters:
targetOS: ${{ parameters.targetOS }}
archGroup: $(_architecture)
configuration: $(_configuration)
helixQueues: $(_helixQueues)
msbuildScript: $(_msbuildCommand)
framework: $(_framework)
helixToken: $(HelixApiAccessToken)
${{ if eq(parameters.isOfficialBuild, 'true') }}:
isExternal: false
waitForCompletion: false
officialBuildId: $(Build.BuildNumber)
${{ if eq(parameters.isOfficialBuild, 'false') }}:
creator: $(Build.RequestedFor)
isExternal: true
waitForCompletion: true
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- task: PublishBuildArtifacts@1
displayName: Publish packages to artifacts container
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/packages/$(_configuration)
artifactName: packages
artifactType: container
condition: and(succeeded(), ne(variables['_skipPublishPackages'], 'true'))
parameters:
archGroup: ''
configuration: ''
creator: ''
framework: ''
helixQueues: ''
helixToken: ''
isExternal: '' # true | false
msbuildScript: ''
targetOS: ''
waitForCompletion: '' # true | false
officialBuildId: ''
steps:
- script: ${{ parameters.msbuildScript }}
eng/sendtohelix.proj
/t:test
/p:ArchGroup=${{ parameters.archGroup }}
/p:ConfigurationGroup=${{ parameters.configuration }}
/p:OSGroup=${{ parameters.targetOS }}
/p:TargetGroup=${{ parameters.framework }}
/p:HelixTargetQueues=${{ parameters.helixQueues }}
/p:HelixBuild=$(Build.BuildNumber)
/p:HelixAccessToken=${{ parameters.helixToken }}
/p:WaitForWorkItemCompletion=${{ parameters.waitForCompletion }}
/p:IsExternal=${{ parameters.isExternal }}
/p:Creator=${{ parameters.creator }}
/p:OfficialBuildId=${{ parameters.officialBuildId }}
/p:EnableAzurePipelinesReporter=true
displayName: Send to Helix
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
# Linux legs
parameters:
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
jobs:
- template: corefx-base.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
targetOS: Linux
jobs:
# Legs with Helix testing
- job: LinuxTest
displayName: Linux
strategy:
matrix:
x64_Release:
_configuration: Release
_architecture: x64
_framework: netcoreapp
_helixQueues: $(linuxDefaultQueues)
_dockerContainer: rhel7_container
_buildScriptPrefix: ''
_buildExtraArguments: ''
arm64_Release:
_configuration: Release
_architecture: arm64
_framework: netcoreapp
_helixQueues: $(linuxArm64Queues)
_dockerContainer: ubuntu_1604_arm64_cross_container
_buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm64 '
_buildExtraArguments: ''
${{ if eq(parameters.isOfficialBuild, 'true') }}:
musl_x64_Release:
_configuration: Release
_architecture: x64
_framework: netcoreapp
_helixQueues: $(alpineQueues)
_dockerContainer: alpine_36_container
_buildScriptPrefix: ''
_buildExtraArguments: /p:RuntimeOS=linux-musl /p:PortableBuild=false
pool:
name: Hosted Ubuntu 1604
container: $[ variables['_dockerContainer'] ]
buildScriptPrefix: $(_buildScriptPrefix)
buildExtraArguments: $(_buildExtraArguments)
submitToHelix: true
variables:
- _skipTests: true
- _outerloop: ${{ parameters.isOfficialBuild }}
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+Fedora.27.Amd64.Open
- linuxArm64Queues: Ubuntu.1604.Arm64.Open
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+Fedora.27.Amd64+Fedora.28.Amd64
- linuxArm64Queues: Ubuntu.1604.Arm64
- alpineQueues: Alpine.36.Amd64+Alpine.38.Amd64
# Legs without helix testing
- job: LinuxNoTest
displayName: Linux
strategy:
matrix:
${{ if eq(parameters.isOfficialBuild, 'false') }}:
musl_x64_Debug:
_configuration: Debug
_architecture: x64
_framework: netcoreapp
_dockerContainer: alpine_36_container
_buildScriptPrefix: ''
_buildExtraArguments: /p:RuntimeOS=linux-musl /p:PortableBuild=false
arm_Release:
_configuration: Release
_architecture: arm
_framework: netcoreapp
_buildExtraArguments: /p:RuntimeOS=ubuntu.16.04
_buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm '
_dockerContainer: ubuntu_1604_arm_cross_container
pool:
name: Hosted Ubuntu 1604
container: $[ variables['_dockerContainer'] ]
buildExtraArguments: $(_buildExtraArguments)
buildScriptPrefix: $(_buildScriptPrefix)
submitToHelix: false
variables:
- _skipTests: true
- _outerloop: ${{ parameters.isOfficialBuild }}
# macOS legs
parameters:
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
jobs:
- template: corefx-base.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
targetOS: OSX
jobs:
# Legs with Helix testing
- job: MacOS
displayName: MacOS
strategy:
matrix:
${{ if eq(parameters.isOfficialBuild, 'false') }}:
x64_Debug:
_configuration: Debug
_architecture: x64
_framework: netcoreapp
_helixQueues: $(macOSQueues)
${{ if eq(parameters.isOfficialBuild, 'true') }}:
x64_Release:
_configuration: Release
_architecture: x64
_framework: netcoreapp
_helixQueues: $(macOSQueues)
pool:
name: Hosted Mac Internal Sierra
preBuildSteps:
- script: |
brew install pkgconfig openssl
ln -s /usr/local/opt/openssl/lib/pkgconfig/libcrypto.pc /usr/local/lib/pkgconfig/
ln -s /usr/local/opt/openssl/lib/pkgconfig/libssl.pc /usr/local/lib/pkgconfig/
ln -s /usr/local/opt/openssl/lib/pkgconfig/openssl.pc /usr/local/lib/pkgconfig/
displayName: Install Build Dependencies
submitToHelix: true
variables:
- _skipTests: true
- _outerloop: ${{ parameters.isOfficialBuild }}
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- macOSQueues: OSX.1012.Amd64.Open+OSX.1013.Amd64.Open
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- macOSQueues: OSX.1012.Amd64+OSX.1013.Amd64+OSX.1014.Amd64
parameters:
buildConfiguration: Release
jobs:
- job: Publish
displayName: Publish Packages
timeoutInMinutes: 120
dependsOn:
- WindowsTest
- WindowsNoTest
- AllConfigurations
- LinuxTest
- LinuxNoTest
- MacOS
- RedHat6
pool:
name: dotnet-internal-temp
workspace:
clean: all
variables:
- group: Publish-Build-Assets
- group: DotNet-Blob-Feed
- group: DotNet-MyGet-Publish
- name: _dotnetFeedUrl
value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- name: _maestroApiEndpoint
value: https://maestro-prod.westus2.cloudapp.azure.com
- name: _mygetFeedUrl
value: https://dotnet.myget.org/F/dotnet-core/api/v2/package
steps:
- task: DownloadBuildArtifacts@0
displayName: Download packages to publish
inputs:
artifactName: packages
downloadPath: $(Build.SourcesDirectory)/artifacts
- script: build.cmd -InitTools
displayName: Restore Tools
- script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 eng\publish.proj
-warnaserror:0 -ci
/t:PublishToAzureBlobFeed
/p:ManifestBuildId=$(Build.BuildNumber)
/p:ManifestBranch=$(Build.SourceBranchName)
/p:ManifestCommit=$(Build.SourceVersion)
/p:ManifestRepoUri=$(Build.Repository.Uri)
/p:AccountKey=$(dotnetfeed-storage-access-key-1)
/p:ExpectedFeedUrl=$(_dotnetFeedUrl)
displayName: Push to dotnet feed
- task: PublishBuildArtifacts@1
displayName: Publish assets manifest to artifacts
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/AssetManifests
artifactName: BuildAssetsManifest
artifactType: container
- script: eng\common\publishbuildassets.cmd
/p:ManifestsPath='$(Build.SourcesDirectory)/artifacts/AssetManifests'
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
/p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
/p:Configuration=${{ parameters.buildConfiguration }}
displayName: Publish to Build Assets Registry
- script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 eng\publish.proj
-warnaserror:0 -ci
/t:NuGetPush
/p:NuGetSource=$(_mygetFeedUrl)
/p:NuGetApiKey=$(dotnet-myget-org-api-key)
displayName: Push to myget.org
# RedHat 6 leg. Only for used in Official Builds
jobs:
- template: corefx-base.yml
parameters:
isOfficialBuild: true
targetOS: Linux
jobs:
- job: RedHat6
strategy:
matrix:
x64_Release:
_configuration: Release
_architecture: x64
_framework: netcoreapp
_buildExtraArguments: /p:RuntimeOS=rhel.6 /p:PortableBuild=false
_dockerContainer: rhel6_container
_helixQueues: $(redhatHelixQueue)
pool:
name: Hosted Ubuntu 1604
container: $[ variables['_dockerContainer'] ]
buildExtraArguments: $(_buildExtraArguments)
submitToHelix: true
variables:
- _skipTests: true
- _outerloop: true # Only runs in official builds
- redhatHelixQueue: RedHat.6.Amd64
# Windows legs
parameters:
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
jobs:
- template: corefx-base.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
targetOS: Windows_NT
jobs:
# Legs with Helix testing
- job: WindowsTest
displayName: Windows
strategy:
matrix:
# PR CI Matrix
${{ if eq(parameters.isOfficialBuild, 'false') }}:
x64_Debug:
_configuration: Debug
_architecture: x64
_framework: netcoreapp
_helixQueues: $(netcoreappWindowsQueues)+$(nanoQueues)
x86_Release:
_configuration: Release
_architecture: x86
_framework: netcoreapp
_helixQueues: $(netcoreappWindowsQueues)
NETFX_x86_Release:
_configuration: Release
_architecture: x86
_framework: netfx
_helixQueues: $(uapNetfxQueues)
UWP_CoreCLR_x64_Debug:
_configuration: Debug
_architecture: x64
_framework: uap
_helixQueues: $(uapNetfxQueues)
# Official build LEGS with HELIX Testing
${{ if eq(parameters.isOfficialBuild, 'true') }}:
x64_Release:
_configuration: Release
_architecture: x64
_framework: netcoreapp
_helixQueues: $(netcoreappWindowsQueues)+$(nanoQueues)
x86_Release:
_configuration: Release
_architecture: x86
_framework: netcoreapp
_helixQueues: $(netcoreappWindowsQueues)
NETFX_x86_Release:
_configuration: Release
_architecture: x86
_framework: netfx
_helixQueues: $(uapNetfxQueues)
_skipPublishPackages: true # In NETFX leg we don't produce packages
NETFX_x64_Release:
_configuration: Release
_architecture: x64
_framework: netfx
_helixQueues: $(uapNetfxQueues)
_skipPublishPackages: true # In NETFX leg we don't produce packages
UAP_x64_Release:
_configuration: Release
_architecture: x64
_framework: uap
_helixQueues: $(uapNetfxQueues)
UAP_x86_Release:
_configuration: Release
_architecture: x86
_framework: uap
_helixQueues: $(uapNetfxQueues)
UAP_arm_Release:
_configuration: Release
_architecture: arm
_framework: uap
_helixQueues: $(windowsArmQueue)
pool:
${{ if eq(parameters.isOfficialBuild, 'true') }}:
name: dotnet-internal-temp
${{ if eq(parameters.isOfficialBuild, 'false') }}:
name: Hosted VS2017
submitToHelix: true
enableMicrobuild: ${{ parameters.isOfficialBuild }}
buildExtraArguments: /p:RuntimeOS=win10
variables:
- _skipTests: true
- _outerloop: ${{ parameters.isOfficialBuild }}
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open
- nanoQueues: Windows.10.Nano.Amd64.Open
- uapNetfxQueues: Windows.10.Amd64.ClientRS4.Open
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4
- nanoQueues: Windows.10.Nano.Amd64
- uapNetfxQueues: Windows.10.Amd64.ClientRS4
- windowsArmQueue: Windows.10.Arm64
# Packaging all configurations
- job: AllConfigurations
displayName: Packaging All Configurations
strategy:
matrix:
# PR Validation Matrix
${{ if eq(parameters.isOfficialBuild, 'false') }}:
x64_Debug:
_configuration: Debug
_architecture: x64
_framework: allConfigurations
# Official Build Matrix
${{ if eq(parameters.isOfficialBuild, 'true') }}:
x64_Release:
_configuration: Release
_architecture: x64
_framework: allConfigurations
pool:
${{ if eq(parameters.isOfficialBuild, 'true') }}:
name: dotnet-internal-temp
${{ if eq(parameters.isOfficialBuild, 'false') }}:
name: Hosted VS2017
submitToHelix: false
enableMicrobuild: ${{ parameters.isOfficialBuild }}
customBuildSteps:
- script: build.cmd
-ci
-$(_framework)
/p:ArchGroup=$(_architecture)
/p:ConfigurationGroup=$(_configuration)
/p:RuntimeOS=win10
$(_windowsOfficialBuildArguments)
$(_msbuildCommonParameters)
displayName: Build Packages
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- script: build.cmd
-ci
-test
/p:TargetGroup=netstandard
/p:ArchGroup=$(_architecture)
/p:ConfigurationGroup=$(_configuration)
/p:SkipTests=true
displayName: Build Netstandard Test Suite
- script: build.cmd
-ci
-test
-$(_framework)
/p:ArchGroup=$(_architecture)
/p:ConfigurationGroup=$(_configuration)
displayName: Run Package Tests
# TODO: UAPAOT official builds should send to helix using continuation runner.
# Legs without HELIX testing
- job: WindowsNoTest
displayName: Windows
strategy:
matrix:
${{ if eq(parameters.isOfficialBuild, 'false') }}:
UWP_NETNative_x86_Release:
_configuration: Release
_architecture: x86
_framework: uapaot
${{ if eq(parameters.isOfficialBuild, 'true') }}:
arm_Release:
_configuration: Release
_architecture: arm
_framework: netcoreapp
arm64_Release:
_configuration: Release
_architecture: arm64
_framework: netcoreapp
UAPAOT_x86_Release:
_configuration: Release
_architecture: x86
_framework: uapaot
UAPAOT_x64_Release:
_configuration: Release
_architecture: x64
_framework: uapaot
UAPAOT_arm_Release:
_configuration: Release
_architecture: arm
_framework: uapaot
UAPAOT_arm64_Release:
_configuration: Release
_architecture: arm64
_framework: uapaot
pool:
${{ if eq(parameters.isOfficialBuild, 'true') }}:
name: dotnet-internal-temp
${{ if eq(parameters.isOfficialBuild, 'false') }}:
name: Hosted VS2017
submitToHelix: false
enableMicrobuild: ${{ parameters.isOfficialBuild }}
buildExtraArguments: /p:RuntimeOS=win10
variables:
- _skipTests: true
- _outerloop: ${{ parameters.isOfficialBuild }}
<Project>
<Import Project="..\Directory.Build.props" />
<Import Project="..\Directory.Build.targets" />
<PropertyGroup>
<GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">corefx</GitHubRepositoryName>
<AssetManifestFilePath>$(ArtifactsDir)AssetManifests\$(GitHubRepositoryName).xml</AssetManifestFilePath>
<PackageOutputRoot Condition="'$(PackagesOutputRoot)' == ''">$(ArtifactsDir)/packages/</PackageOutputRoot>
<FinalPublishPattern>$(PackageOutputRoot)*.nupkg</FinalPublishPattern>
<FinalPublishPrivatePattern>$(PackageOutputRoot)*Private*.nupkg</FinalPublishPrivatePattern>
<FinalPublishExperimentalPattern>$(PackageOutputRoot)*Experimental*.nupkg</FinalPublishExperimentalPattern>
</PropertyGroup>
<ItemGroup Condition="'$(PackagesGlob)' != ''">
<PackagesToPublish Include="$(PackagesGlob)" />
</ItemGroup>
<ItemGroup Condition="'$(PackagesGlob)' == ''">
<PackagesToPublish Include="$(FinalPublishPrivatePattern);$(FinalPublishExperimentalPattern)">
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
</PackagesToPublish>
<PackagesToPublish Include="$(FinalPublishPattern)" Exclude="@(PackagesToPublish)" />
</ItemGroup>
<Target Name="PublishToAzureBlobFeed">
<Error Condition="'@(PackagesToPublish)'==''" Text="PackagesToPublish for packages is empty." />
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(PackagesToPublish)"
Overwrite="$(PublishOverwrite)"
AssetManifestPath="$(AssetManifestFilePath)"
ManifestBuildId="$(ManifestBuildId)"
ManifestBranch="$(ManifestBranch)"
ManifestCommit="$(ManifestCommit)"
ManifestRepoUri="$(ManifestRepoUri)" />
</Target>
<Target Name="NuGetPush">
<Error Condition="'$(NuGetSource)' == ''" Text="NuGetSource property is not defined." />
<Error Condition="'@(PackagesToPublish)' == ''" Text="PackagesToPublish for packages is empty." />
<PropertyGroup>
<DotnetCliExe Condition="'$(DotnetCliExe)' == ''">$(RepoRoot)\.dotnet\dotnet.exe</DotnetCliExe>
<NuGetTimeout Condition="'$(NuGetTimeout)' == ''">600</NuGetTimeout>
<NuGetPushArgsBase>nuget push</NuGetPushArgsBase>
<NuGetPushArgsBase>$(NuGetPushArgsBase) --source $(NuGetSource)</NuGetPushArgsBase>
<NuGetPushArgsBase>$(NuGetPushArgsBase) --timeout $(NuGetTimeout)</NuGetPushArgsBase>
<NuGetPushArgsBase Condition="'$(NuGetApiKey)'!=''">$(NuGetPushArgsBase) --api-key $(NuGetApiKey)</NuGetPushArgsBase>
<IgnorableErrorMessagesExistingPackageMessage>Overwriting existing packages is forbidden according to the package retention settings for this feed.</IgnorableErrorMessagesExistingPackageMessage>
</PropertyGroup>
<ItemGroup>
<NuGetPushCommand Include="@(PackagesToPublish -> '$(DotnetCliExe) $(NuGetPushArgsBase) %(Identity)')">
<PackageToPush>%(Identity)</PackageToPush>
</NuGetPushCommand>
<!-- There are special failure scenarios that we want to ignore. Those scenarios are
when NuGet reports a failure during a push attempt for something server or timeout related,
and then gets a "Forbidden" response on the next attempt because the package "already exists".
This indicates that the failure was reported, but the push was actually successful.
-->
<IgnorableErrorMessages Include="$(IgnorableErrorMessagesExistingPackageMessage)">
<ConditionalErrorMessage>Pushing took too long</ConditionalErrorMessage>
</IgnorableErrorMessages>
<IgnorableErrorMessages Include="$(IgnorableErrorMessagesExistingPackageMessage)">
<ConditionalErrorMessage>The connection with the server was terminated abnormally</ConditionalErrorMessage>
</IgnorableErrorMessages>
<IgnorableErrorMessages Include="$(IgnorableErrorMessagesExistingPackageMessage)">
<ConditionalErrorMessage>An existing connection was forcibly closed by the remote host</ConditionalErrorMessage>
</IgnorableErrorMessages>
</ItemGroup>
<ExecWithRetriesForNuGetPush
Command="%(NuGetPushCommand.Identity)"
MaxAttempts="$(MaxAttempts)"
RetryDelayBase="$(RetryDelayBase)"
RetryDelayConstant="$(RetryDelayConstant)"
IgnoredErrorMessagesWithConditional="@(IgnorableErrorMessages)"
PackageFile="%(NuGetPushCommand.PackageToPush)"
PassIfIdenticalV2Feed="$(PassIfIdenticalV2Feed)" />
</Target>
<Target Name="CheckForBuildTools" />
</Project>
\ No newline at end of file
<Project InitialTargets="BuildHelixWorkItems" Sdk="Microsoft.DotNet.Helix.Sdk">
<PropertyGroup>
<!-- Set helix source -->
<HelixSourcePrefix>pr/</HelixSourcePrefix>
<HelixSourcePrefix Condition="'$(OfficialBuildId)' != ''">official/</HelixSourcePrefix>
<HelixSource Condition="'$(HelixSource)' == ''">$(HelixSourcePrefix)dotnet/corefx</HelixSource>
<HelixSource Condition="'$(BUILD_SOURCEBRANCH)' != ''">$(HelixSource)/$(BUILD_SOURCEBRANCH)</HelixSource>
<!-- Set helix build to build number if available -->
<HelixBuild Condition="'$(HelixBuild)' == ''">$(BUILD_BUILDNUMBER)</HelixBuild>
<HelixBuild Condition="'$(HelixBuild)' == ''">default</HelixBuild>
<HelixType Condition="'$(HelixType)' == ''">test/functional/cli</HelixType>
<TimeoutInSeconds Condition="'$(TimeoutInSeconds)' == ''">600</TimeoutInSeconds>
<_timeoutSpan>$([System.TimeSpan]::FromSeconds($(TimeoutInSeconds)))</_timeoutSpan>
<!-- We need to enable xunit reporter so that it parses test results -->
<EnableXunitReporter>true</EnableXunitReporter>
<TestArchiveRuntimeFile>$(TestArchiveRuntimeRoot)test-runtime-$(BuildConfiguration).zip</TestArchiveRuntimeFile>
<!-- The helix runtime payload and the tests to run -->
<HelixCorrelationPayload Condition="'$(HelixCorrelationPayload)' == ''">$(TestArchiveRuntimeFile)</HelixCorrelationPayload>
<WorkItemArchiveWildCard Condition="'$(WorkItemArchiveWildCard)' == ''">$(TestArchiveTestsRoot)**/*.zip</WorkItemArchiveWildCard>
<HelixConfiguration>$(ConfigurationGroup)</HelixConfiguration>
<HelixArchitecture>$(ArchGroup)</HelixArchitecture>
<!-- This property is used to show the tests results in Azure Dev Ops. By setting this property the
test run name will be displayed as $(BuildConfiguration)-$(HelixTargetQueue) -->
<TestRunNamePrefix>$(BuildConfiguration)-</TestRunNamePrefix>
</PropertyGroup>
<PropertyGroup Condition="'$(MaxRetryCount)' == ''">
<!-- In Windows we need a higher value due to some flakyness in Nano. Can remove when helix provides new containers model -->
<MaxRetryCount Condition="'$(TargetsWindows)' == 'true'">9</MaxRetryCount>
<MaxRetryCount Condition="'$(TargetsWindows)' != 'true'">1</MaxRetryCount>
</PropertyGroup>
<PropertyGroup Condition="'$(HelixCommand)' == ''">
<!-- For windows we need to use call, since the command is going to be called from a bat script created by Helix
and we exit /b at the end of RunTests.cmd, Helix runs some other commands after ours within the bat script,
if we don't use call, then we cause the parent script to exit, and anything after will not be executed. -->
<HelixCommand Condition="'$(TargetsWindows)' == 'true'">call RunTests.cmd %HELIX_CORRELATION_PAYLOAD%</HelixCommand>
<HelixCommand Condition="'$(TargetsWindows)' != 'true'">./RunTests.sh $HELIX_CORRELATION_PAYLOAD</HelixCommand>
</PropertyGroup>
<!-- We need to include all dlls in the runtime path as inputs to make it really incremental
if we use the root folder, if a dll is updated, the folder's timestamp is not updated, therefore skipped. -->
<ItemGroup>
<_RuntimeInputs Include="$(TestHostRootPath)**/*.dll" />
</ItemGroup>
<Target Name="CompressRuntimeDirectory"
Inputs="@(_RuntimeInputs)"
Outputs="$(TestArchiveRuntimeFile)">
<MakeDir Directories="$(TestArchiveRuntimeRoot)" />
<ZipDirectory
SourceDirectory="$(TestHostRootPath)"
DestinationFile="$(TestArchiveRuntimeFile)"
Overwrite="true" />
</Target>
<Target Name="BuildHelixWorkItems" DependsOnTargets="CompressRuntimeDirectory">
<ItemGroup>
<HelixCorrelationPayload Include="$(HelixCorrelationPayload)" />
<_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" />
<HelixWorkItem Include="@(_WorkItem -> '%(FileName)')">
<PayloadArchive>%(Identity)</PayloadArchive>
<Command>$(HelixCommand)</Command>
<Timeout>$(_timeoutSpan)</Timeout>
</HelixWorkItem>
</ItemGroup>
</Target>
</Project>
......@@ -92,4 +92,7 @@
<UpdateVSConfigurations ProjectsToUpdate="@(_projectsToUpdate)" SolutionsToUpdate="@(_solutionsToUpdate)" />
<Message Importance="High" Text="Updating configurations for projects ... Done." />
</Target>
<!-- Define an empty Execute target for Arcade's publish to BAR finds it: https://github.com/dotnet/arcade/issues/1452 -->
<Target Name="Execute" />
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册