Nightly windows pipeline split into 4 jobs

This commit is contained in:
Dmitry Voitsekhovskiy 2019-09-30 14:02:40 +03:00 коммит произвёл Tom Minka
Родитель 4d6e13fe75
Коммит 29eda6edea
2 изменённых файлов: 115 добавлений и 60 удалений

Просмотреть файл

@ -14,50 +14,70 @@ trigger: none # disable CI build
queue:
name: Hosted VS2017
timeoutInMinutes: 120
steps:
- task: Bash@3
displayName: 'Updating assembly versions'
inputs:
filePath: build/updateversion.sh
workingDirectory: build
arguments: $(Build.BuildNumber)
# Cannot use matrix strategy to create jobs for different platforms,
# since then the platform is given as a variable which cannot be passed as a parameter to a template,
# because templates are actualized at a very early stage when the variable has no value yet.
jobs:
- job: Windows Build and Test (x64)
timeoutInMinutes: 180
- task: NuGetToolInstaller@0
inputs:
versionSpec: '4.7.0'
steps:
- template: windows-msbuild.yml
parameters:
BuildConfiguration: '$(BuildConfiguration)'
BuildNumber: '$(Build.BuildNumber)'
- task: NuGetCommand@2
displayName: 'Restoring NuGet packages'
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
- task: MSBuild@1
displayName: 'Building solutions'
inputs:
solution: '**/*.sln'
clean: true
configuration: $(BuildConfiguration)
- template: vstest-fast.yml
- template: vstest-fast.yml
parameters:
Platform: 'x64'
- template: vstest-fast.yml
- job: Windows Build and Test (x86)
timeoutInMinutes: 180
steps:
- template: windows-msbuild.yml
parameters:
BuildConfiguration: '$(BuildConfiguration)'
BuildNumber: '$(Build.BuildNumber)'
- template: vstest-fast.yml
parameters:
Platform: 'x86'
- template: evaluator-netcore.yml
- job: Windows Evaluator
timeoutInMinutes: 180
steps:
- template: windows-msbuild.yml
parameters:
BuildConfiguration: '$(BuildConfiguration)'
BuildNumber: '$(Build.BuildNumber)'
- template: evaluator-netcore.yml
parameters:
Configuration: '$(BuildConfiguration)'
- template: evaluator-netframework.yml
- template: evaluator-netframework.yml
parameters:
Configuration: '$(BuildConfiguration)'
- task: Bash@3
- job: Package and Publish
timeoutInMinutes: 30
dependsOn:
- Windows Build and Test (x64)
- Windows Build and Test (x86)
- Windows Evaluator
steps:
- template: windows-msbuild.yml
parameters:
BuildConfiguration: '$(BuildConfiguration)'
BuildNumber: '$(Build.BuildNumber)'
- task: Bash@3
displayName: 'Gathering built assemblies'
condition: eq(variables['BuildConfiguration'], 'Release')
inputs:
@ -65,7 +85,7 @@ steps:
arguments: ../bin $(BuildConfiguration)
workingDirectory: build
- task: NuGetCommand@2
- task: NuGetCommand@2
displayName: 'Creating NuGet packages'
condition: eq(variables['BuildConfiguration'], 'Release')
inputs:
@ -74,14 +94,14 @@ steps:
includeSymbols: true
buildProperties: version=$(Build.BuildNumber);bin=../bin
- task: CopyFiles@2
- task: CopyFiles@2
displayName: 'Copying build artifacts'
condition: eq(variables['BuildConfiguration'], 'Release')
inputs:
sourceFolder: bin
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
- task: PublishBuildArtifacts@1
displayName: 'Publishing build artifacts'
condition: eq(variables['BuildConfiguration'], 'Release')
inputs:

35
build/windows-msbuild.yml Normal file
Просмотреть файл

@ -0,0 +1,35 @@
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
# Template for building all solutions using MSBuild
parameters:
BuildNumber: '0.0.0'
BuildConfiguration: 'Release'
steps:
- task: Bash@3
displayName: 'Updating assembly versions'
inputs:
filePath: build/updateversion.sh
workingDirectory: build
arguments: ${{ parameters.BuildNumber }}
- task: NuGetToolInstaller@0
inputs:
versionSpec: '4.7.0'
- task: NuGetCommand@2
displayName: 'Restoring NuGet packages'
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
- task: MSBuild@1
displayName: 'Building solutions'
inputs:
solution: '**/*.sln'
clean: true
configuration: ${{ parameters.BuildConfiguration }}