2019-05-07 16:35:43 +02:00
|
|
|
parameters:
|
|
|
|
additionalBuildArguments: ''
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
2019-05-07 16:57:46 +02:00
|
|
|
submodules: true
|
2019-05-07 16:35:43 +02:00
|
|
|
clean: true
|
|
|
|
|
|
|
|
- task: NuGetToolInstaller@0
|
|
|
|
displayName: Ensure NuGet 4.8.1
|
|
|
|
inputs:
|
|
|
|
versionSpec: 4.8.1
|
|
|
|
|
|
|
|
- task: VisualStudioTestPlatformInstaller@1
|
|
|
|
displayName: Ensure VSTest Platform
|
|
|
|
|
|
|
|
# In the Microsoft Azure DevOps tenant, NuGetCommand is ambiguous.
|
|
|
|
# This should be `task: NuGetCommand@2`
|
|
|
|
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
|
|
|
displayName: Restore NuGet packages
|
|
|
|
inputs:
|
|
|
|
command: restore
|
|
|
|
feedsToUse: config
|
|
|
|
configPath: NuGet.config
|
|
|
|
restoreSolution: OpenConsole.sln
|
|
|
|
restoreDirectory: '$(Build.SourcesDirectory)\packages'
|
|
|
|
|
2019-05-16 20:22:22 +02:00
|
|
|
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
|
|
|
displayName: 'NuGet restore packages for CI'
|
|
|
|
inputs:
|
|
|
|
command: restore
|
|
|
|
restoreSolution: build/.nuget/packages.config
|
|
|
|
feedsToUse: config
|
|
|
|
externalFeedCredentials: 'TAEF NuGet Feed'
|
|
|
|
nugetConfigPath: build/config/NuGet.config
|
|
|
|
restoreDirectory: '$(Build.SourcesDirectory)/packages'
|
|
|
|
|
2019-05-07 16:35:43 +02:00
|
|
|
- task: VSBuild@1
|
Fix our parallel (and repeating) builds (#3412)
The WAP packaging project in VS <= 16.3.7 produces a couple global
properties as part of its normal operation that cause MSBuild to flag
our projects as out-of-date and requiring a rebuild. By forcing those
properties to match the WAP values, we can get consistent builds.
One of those properties, however, is "GenerateAppxPackageOnBuild", and
WAP sets it to *false*. When we set that, of course, we don't get an
MSIX out of our build pipeline. Therefore, we have to break our build
into two phases -- build, then package.
This required us to change our approach to PCH deletion. A project
without a PCH is *also* considered out-of-date. Now, we keep all PCH
files but truncate them to 0 bytes.
TerminalApp, however, is re-linked during packaging because the Xaml
compiler emits a new generated C++ file on every build. We have to keep
those PCHs around.
* Remove WpfTerminalControl AnyCPU from Arch-specific builds
This removes another source of build nondeterminism: that WpfTerminalControl was propagating TargetFramework into architecture-specific C++ builds. Its "Any CPU" platform has been removed from architecture builds at the solution level.
This also cleans up some new projects that were added and build for "Any
CPU".
2019-11-01 22:38:13 +01:00
|
|
|
displayName: 'Build solution **\OpenConsole.sln (no packages)'
|
2019-05-07 16:35:43 +02:00
|
|
|
inputs:
|
|
|
|
solution: '**\OpenConsole.sln'
|
2019-06-26 23:13:32 +02:00
|
|
|
vsVersion: 16.0
|
2019-05-07 16:35:43 +02:00
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
Fix our parallel (and repeating) builds (#3412)
The WAP packaging project in VS <= 16.3.7 produces a couple global
properties as part of its normal operation that cause MSBuild to flag
our projects as out-of-date and requiring a rebuild. By forcing those
properties to match the WAP values, we can get consistent builds.
One of those properties, however, is "GenerateAppxPackageOnBuild", and
WAP sets it to *false*. When we set that, of course, we don't get an
MSIX out of our build pipeline. Therefore, we have to break our build
into two phases -- build, then package.
This required us to change our approach to PCH deletion. A project
without a PCH is *also* considered out-of-date. Now, we keep all PCH
files but truncate them to 0 bytes.
TerminalApp, however, is re-linked during packaging because the Xaml
compiler emits a new generated C++ file on every build. We have to keep
those PCHs around.
* Remove WpfTerminalControl AnyCPU from Arch-specific builds
This removes another source of build nondeterminism: that WpfTerminalControl was propagating TargetFramework into architecture-specific C++ builds. Its "Any CPU" platform has been removed from architecture builds at the solution level.
This also cleans up some new projects that were added and build for "Any
CPU".
2019-11-01 22:38:13 +01:00
|
|
|
# Until there is a servicing release of Visual Studio 2019 Update 3, we must force the values of:
|
|
|
|
# BuildingInsideVisualStudio
|
|
|
|
# _WapBuildingInsideVisualStudio
|
|
|
|
# GenerateAppxPackageOnBuild
|
|
|
|
# because otherwise, they will cause a build instability where MSBuild considers all projects
|
|
|
|
# to always be out-of-date.
|
|
|
|
msbuildArgs: "${{ parameters.additionalBuildArguments }} /p:BuildingInsideVisualStudio=false;_WapBuildingInsideVisualStudio=false;GenerateAppxPackageOnBuild=false"
|
2019-05-07 16:35:43 +02:00
|
|
|
clean: true
|
Fix our parallel (and repeating) builds (#3412)
The WAP packaging project in VS <= 16.3.7 produces a couple global
properties as part of its normal operation that cause MSBuild to flag
our projects as out-of-date and requiring a rebuild. By forcing those
properties to match the WAP values, we can get consistent builds.
One of those properties, however, is "GenerateAppxPackageOnBuild", and
WAP sets it to *false*. When we set that, of course, we don't get an
MSIX out of our build pipeline. Therefore, we have to break our build
into two phases -- build, then package.
This required us to change our approach to PCH deletion. A project
without a PCH is *also* considered out-of-date. Now, we keep all PCH
files but truncate them to 0 bytes.
TerminalApp, however, is re-linked during packaging because the Xaml
compiler emits a new generated C++ file on every build. We have to keep
those PCHs around.
* Remove WpfTerminalControl AnyCPU from Arch-specific builds
This removes another source of build nondeterminism: that WpfTerminalControl was propagating TargetFramework into architecture-specific C++ builds. Its "Any CPU" platform has been removed from architecture builds at the solution level.
This also cleans up some new projects that were added and build for "Any
CPU".
2019-11-01 22:38:13 +01:00
|
|
|
maximumCpuCount: true
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build solution **\OpenConsole.sln (CascadiaPackage only)'
|
|
|
|
inputs:
|
|
|
|
solution: '**\OpenConsole.sln'
|
|
|
|
vsVersion: 16.0
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArgs: "${{ parameters.additionalBuildArguments }} /p:BuildingInsideVisualStudio=false;_WapBuildingInsideVisualStudio=false;GenerateAppxPackageOnBuild=true /t:Terminal\\CascadiaPackage"
|
|
|
|
clean: false # we're relying on build output fropm the previous run
|
|
|
|
maximumCpuCount: true
|
2019-05-07 16:35:43 +02:00
|
|
|
|
2019-07-18 20:23:34 +02:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Check MSIX for common regressions'
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
$Package = Get-ChildItem -Recurse -Filter "CascadiaPackage_*.msix"
|
|
|
|
.\build\scripts\Test-WindowsTerminalPackage.ps1 -Verbose -Path $Package.FullName
|
|
|
|
|
2019-10-09 21:27:39 +02:00
|
|
|
- task: powershell@2
|
|
|
|
displayName: 'Source Index PDBs'
|
|
|
|
inputs:
|
|
|
|
targetType: filePath
|
|
|
|
filePath: build\scripts\Index-Pdbs.ps1
|
|
|
|
arguments: -SearchDir '$(Build.SourcesDirectory)' -SourceRoot '$(Build.SourcesDirectory)' -recursive -Verbose -CommitId $(Build.SourceVersion)
|
|
|
|
errorActionPreference: silentlyContinue
|
|
|
|
|
2019-05-07 16:35:43 +02:00
|
|
|
- task: VSTest@2
|
|
|
|
displayName: 'Run Unit Tests'
|
|
|
|
inputs:
|
|
|
|
testAssemblyVer2: |
|
|
|
|
$(BUILD.SOURCESDIRECTORY)\**\*unit.test*.dll
|
|
|
|
!**\obj\**
|
|
|
|
runSettingsFile: '$(BUILD.SOURCESDIRECTORY)\src\unit.tests.$(BuildPlatform).runsettings'
|
|
|
|
codeCoverageEnabled: true
|
|
|
|
runInParallel: False
|
|
|
|
testRunTitle: 'Console Unit Tests'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
condition: and(succeeded(), or(eq(variables['BuildPlatform'], 'x64'), eq(variables['BuildPlatform'], 'x86')))
|
|
|
|
|
|
|
|
- task: VSTest@2
|
|
|
|
displayName: 'Run Feature Tests (x64 only)'
|
|
|
|
inputs:
|
|
|
|
testAssemblyVer2: |
|
|
|
|
$(BUILD.SOURCESDIRECTORY)\**\*feature.test*.dll
|
|
|
|
!**\obj\**
|
|
|
|
runSettingsFile: '$(BUILD.SOURCESDIRECTORY)\src\unit.tests.$(BuildPlatform).runsettings'
|
|
|
|
codeCoverageEnabled: true
|
|
|
|
runInParallel: False
|
|
|
|
testRunTitle: 'Console Feature Tests'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
condition: and(succeeded(), eq(variables['BuildPlatform'], 'x64'))
|
2019-09-30 19:39:55 +02:00
|
|
|
|
2019-05-07 16:35:43 +02:00
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: 'Copy *.appx/*.msix to Artifacts (Non-PR builds only)'
|
|
|
|
inputs:
|
|
|
|
Contents: |
|
|
|
|
**/*.appx
|
|
|
|
**/*.msix
|
|
|
|
**/*.appxsym
|
|
|
|
!**/Microsoft.VCLibs*.appx
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/appx'
|
|
|
|
OverWrite: true
|
|
|
|
flattenFolders: true
|
|
|
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact (appx) (Non-PR builds only)'
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)/appx'
|
|
|
|
ArtifactName: 'appx-$(BuildConfiguration)'
|
|
|
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|