2021-07-16 08:30:19 +03:00
|
|
|
# see https://docs.microsoft.com/azure/devops/pipelines/process/phases for info on yaml ADO jobs
|
2020-08-26 01:12:02 +03:00
|
|
|
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
|
|
|
variables:
|
2021-07-16 08:30:19 +03:00
|
|
|
- template: WindowsAppSDK-Versions.yml
|
|
|
|
- template: WindowsAppSDK-CommonVariables.yml
|
2022-02-25 22:29:13 +03:00
|
|
|
- name: buildOutputDir
|
|
|
|
value: $(Build.SourcesDirectory)\BuildOutput
|
2022-06-15 09:58:45 +03:00
|
|
|
|
2020-08-26 01:12:02 +03:00
|
|
|
jobs:
|
2022-04-05 00:33:41 +03:00
|
|
|
- job: PreChecks
|
2021-02-26 23:12:43 +03:00
|
|
|
pool:
|
2022-08-10 21:24:52 +03:00
|
|
|
vmImage: 'windows-2022'
|
2021-02-26 23:12:43 +03:00
|
|
|
steps:
|
2022-04-05 00:33:41 +03:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Smoke test props and targets in \build\NuSpecs'
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: |
|
|
|
|
$targetPaths = "$(Build.SourcesDirectory)\build\NuSpecs\*.targets"
|
|
|
|
$propPaths = "$(Build.SourcesDirectory)\build\NuSpecs\*.props"
|
|
|
|
Get-ChildItem $targetPaths | ForEach-Object { $_.Name; [xml](Get-Content $_) | Out-Null }
|
|
|
|
Get-ChildItem $propPaths | ForEach-Object { $_.Name; [xml](Get-Content $_) | Out-Null }
|
|
|
|
failOnStderr: true
|
|
|
|
|
2022-06-22 01:14:09 +03:00
|
|
|
# Scans the root source folder for security vulnerability
|
2023-04-15 03:01:45 +03:00
|
|
|
- task: CredScan@3
|
2022-06-22 01:14:09 +03:00
|
|
|
inputs:
|
2023-04-15 03:01:45 +03:00
|
|
|
toolMajorVersion: 'Latest'
|
2022-06-22 01:14:09 +03:00
|
|
|
|
|
|
|
# This PostAnalysis will fail the pipeline if CredScan identifies an issue
|
2023-04-15 03:01:45 +03:00
|
|
|
- task: PostAnalysis@2
|
2022-06-22 01:14:09 +03:00
|
|
|
inputs:
|
|
|
|
AllTools: false
|
|
|
|
APIScan: false
|
|
|
|
BinSkim: false
|
|
|
|
CodesignValidation: false
|
|
|
|
CredScan: true
|
|
|
|
FortifySCA: false
|
|
|
|
FxCop: false
|
|
|
|
ModernCop: false
|
|
|
|
PoliCheck: false
|
|
|
|
RoslynAnalyzers: false
|
|
|
|
SDLNativeRules: false
|
|
|
|
Semmle: false
|
|
|
|
TSLint: false
|
|
|
|
ToolLogsNotFoundAction: 'Standard'
|
2021-02-26 23:12:43 +03:00
|
|
|
|
2022-07-25 18:16:00 +03:00
|
|
|
- job: VerifyCopyrightHeaders
|
|
|
|
pool:
|
2022-08-25 20:50:02 +03:00
|
|
|
vmImage: 'windows-2022'
|
2022-07-25 18:16:00 +03:00
|
|
|
steps:
|
|
|
|
- task: powershell@2
|
|
|
|
displayName: 'Verify copyright headers'
|
|
|
|
inputs:
|
|
|
|
targetType: filePath
|
|
|
|
filePath: tools\VerifyCopyrightHeaders.ps1
|
|
|
|
|
2023-08-22 02:27:45 +03:00
|
|
|
- job: BuildBinaries
|
2020-08-26 01:12:02 +03:00
|
|
|
pool:
|
2022-08-10 21:24:52 +03:00
|
|
|
vmImage: 'windows-2022'
|
2020-08-26 01:12:02 +03:00
|
|
|
timeoutInMinutes: 120
|
|
|
|
strategy:
|
|
|
|
maxParallel: 10
|
|
|
|
matrix:
|
2023-08-22 02:27:45 +03:00
|
|
|
# TODO: Reenable when LNK2019 error is fixed Bug#46043382
|
|
|
|
# Debug_x86:
|
|
|
|
# buildPlatform: 'x86'
|
|
|
|
# buildConfiguration: 'Debug'
|
2020-08-26 01:12:02 +03:00
|
|
|
Release_x86:
|
|
|
|
buildPlatform: 'x86'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
PGOBuildMode: 'Optimize'
|
|
|
|
Release_x64:
|
|
|
|
buildPlatform: 'x64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
PGOBuildMode: 'Optimize'
|
|
|
|
Release_Arm64:
|
|
|
|
buildPlatform: 'arm64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
steps:
|
2022-10-20 22:31:25 +03:00
|
|
|
# Required by the Packaged ES SDL Templates.
|
|
|
|
- checkout: self
|
|
|
|
persistCredentials: true
|
|
|
|
|
|
|
|
- task: NuGetToolInstaller@1
|
2021-10-20 04:56:27 +03:00
|
|
|
|
2022-10-20 22:31:25 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml
|
2023-08-22 02:27:45 +03:00
|
|
|
parameters:
|
|
|
|
IsOneBranch: false
|
2022-10-20 22:31:25 +03:00
|
|
|
|
|
|
|
- task: PowerShell@2
|
|
|
|
name: BuildBinaries
|
|
|
|
inputs:
|
2022-12-07 02:01:27 +03:00
|
|
|
filePath: 'BuildAll.ps1'
|
2022-10-20 22:31:25 +03:00
|
|
|
arguments: -Platform "$(buildPlatform)" -Configuration "$(buildConfiguration)" -AzureBuildStep "BuildBinaries"
|
2020-08-26 01:12:02 +03:00
|
|
|
|
2023-08-22 02:27:45 +03:00
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: MoveToOutputDirectory
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(build.SourcesDirectory)\packages'
|
|
|
|
TargetFolder: '$(build.SourcesDirectory)\BuildOutput\packages'
|
|
|
|
|
2022-02-25 22:29:13 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
2022-10-20 22:31:25 +03:00
|
|
|
displayName: 'Publish artifact: Full Nuget'
|
2022-02-25 22:29:13 +03:00
|
|
|
inputs:
|
2022-10-20 22:31:25 +03:00
|
|
|
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
|
2023-08-22 02:27:45 +03:00
|
|
|
artifactName: 'FoundationBinaries_$(buildConfiguration)_$(buildPlatform)'
|
2022-02-25 22:29:13 +03:00
|
|
|
|
2023-08-22 02:27:45 +03:00
|
|
|
- job: BuildBinaries_release_anycpu
|
2022-10-20 22:31:25 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2022'
|
|
|
|
steps:
|
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
|
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml
|
2023-08-22 02:27:45 +03:00
|
|
|
parameters:
|
|
|
|
IsOneBranch: false
|
2022-10-20 22:31:25 +03:00
|
|
|
|
|
|
|
- task: PowerShell@2
|
|
|
|
name: BuildBinaries
|
2022-06-22 01:14:09 +03:00
|
|
|
inputs:
|
2022-12-07 02:01:27 +03:00
|
|
|
filePath: 'BuildAll.ps1'
|
2022-10-20 22:31:25 +03:00
|
|
|
arguments: -AzureBuildStep "BuildAnyCPU"
|
2022-06-22 01:14:09 +03:00
|
|
|
|
2022-10-20 22:31:25 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish artifact: Full Nuget'
|
2022-06-22 01:14:09 +03:00
|
|
|
inputs:
|
2022-10-20 22:31:25 +03:00
|
|
|
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
|
2023-08-22 02:27:45 +03:00
|
|
|
artifactName: 'FoundationBinaries_Release_AnyCPU'
|
2022-06-22 01:14:09 +03:00
|
|
|
|
2021-02-24 06:45:02 +03:00
|
|
|
- job: BuildMRT
|
|
|
|
pool:
|
2022-08-10 21:24:52 +03:00
|
|
|
vmImage: 'windows-2022'
|
2021-02-24 06:45:02 +03:00
|
|
|
strategy:
|
|
|
|
maxParallel: 10
|
|
|
|
matrix:
|
|
|
|
Release_x86:
|
|
|
|
buildPlatform: 'x86'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
Release_x64:
|
|
|
|
buildPlatform: 'x64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
Release_Arm64:
|
|
|
|
buildPlatform: 'ARM64'
|
|
|
|
buildConfiguration: 'Release'
|
2023-08-22 02:27:45 +03:00
|
|
|
variables:
|
|
|
|
ob_artifactBaseName: "MrtBinaries_$(buildConfiguration)_$(buildPlatform)" # For BuildMRT to publish t
|
2021-02-24 06:45:02 +03:00
|
|
|
steps:
|
2022-10-20 22:31:25 +03:00
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
|
2023-05-13 00:55:39 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildMRT-Steps.yml
|
2023-08-22 02:27:45 +03:00
|
|
|
parameters:
|
|
|
|
IsOneBranch: false
|
2022-08-26 09:53:15 +03:00
|
|
|
|
2023-08-22 02:27:45 +03:00
|
|
|
- job: Test
|
2022-10-20 22:31:25 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2022'
|
2023-08-22 02:27:45 +03:00
|
|
|
strategy:
|
|
|
|
maxParallel: 10
|
|
|
|
matrix:
|
|
|
|
Release_x86:
|
|
|
|
buildPlatform: 'x86'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
testLocale: en-US
|
|
|
|
Release_x64:
|
|
|
|
buildPlatform: 'x64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
testLocale: en-US
|
|
|
|
Release_Arm64:
|
|
|
|
buildPlatform: 'ARM64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
testLocale: en-US
|
2022-10-20 22:31:25 +03:00
|
|
|
dependsOn:
|
2023-08-22 02:27:45 +03:00
|
|
|
- BuildBinaries
|
|
|
|
- BuildBinaries_release_anycpu
|
|
|
|
- BuildMRT
|
|
|
|
variables:
|
|
|
|
testPayloadArtifactDir: $(Build.SourcesDirectory)\BuildOutput\$(buildConfiguration)\$(buildPlatform)
|
2022-10-20 22:31:25 +03:00
|
|
|
steps:
|
2023-08-22 02:27:45 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-RunTests-Steps.yml
|
|
|
|
parameters:
|
|
|
|
buildPlatform: $(buildPlatform)
|
|
|
|
buildConfiguration: $(buildConfiguration)
|
|
|
|
testLocale: $(testLocale)
|