# see https://docs.microsoft.com/azure/devops/pipelines/process/phases for info on yaml ADO jobs name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr) variables: - template: WindowsAppSDK-Versions.yml - template: WindowsAppSDK-CommonVariables.yml - name: buildOutputDir value: $(Build.SourcesDirectory)\BuildOutput jobs: - job: PreChecks pool: vmImage: 'windows-2022' steps: - 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 # Scans the root source folder for security vulnerability - task: CredScan@3 inputs: toolMajorVersion: 'Latest' # This PostAnalysis will fail the pipeline if CredScan identifies an issue - task: PostAnalysis@2 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' - job: VerifyCopyrightHeaders pool: vmImage: 'windows-2022' steps: - task: powershell@2 displayName: 'Verify copyright headers' inputs: targetType: filePath filePath: tools\VerifyCopyrightHeaders.ps1 - job: BuildBinaries pool: vmImage: 'windows-2022' timeoutInMinutes: 120 strategy: maxParallel: 10 matrix: # TODO: Reenable when LNK2019 error is fixed Bug#46043382 # Debug_x86: # buildPlatform: 'x86' # buildConfiguration: 'Debug' Release_x86: buildPlatform: 'x86' buildConfiguration: 'Release' PGOBuildMode: 'Optimize' Release_x64: buildPlatform: 'x64' buildConfiguration: 'Release' PGOBuildMode: 'Optimize' Release_Arm64: buildPlatform: 'arm64' buildConfiguration: 'Release' steps: # Required by the Packaged ES SDL Templates. - checkout: self persistCredentials: true - task: NuGetToolInstaller@1 - template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml parameters: IsOneBranch: false - task: PowerShell@2 name: BuildBinaries inputs: filePath: 'BuildAll.ps1' arguments: -Platform "$(buildPlatform)" -Configuration "$(buildConfiguration)" -AzureBuildStep "BuildBinaries" - task: CopyFiles@2 displayName: MoveToOutputDirectory inputs: SourceFolder: '$(build.SourcesDirectory)\packages' TargetFolder: '$(build.SourcesDirectory)\BuildOutput\packages' - task: PublishBuildArtifacts@1 displayName: 'Publish artifact: Full Nuget' inputs: PathtoPublish: '$(build.SourcesDirectory)\BuildOutput' artifactName: 'FoundationBinaries_$(buildConfiguration)_$(buildPlatform)' - job: BuildBinaries_release_anycpu pool: vmImage: 'windows-2022' steps: - task: NuGetToolInstaller@1 - template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml parameters: IsOneBranch: false - task: PowerShell@2 name: BuildBinaries inputs: filePath: 'BuildAll.ps1' arguments: -AzureBuildStep "BuildAnyCPU" - task: PublishBuildArtifacts@1 displayName: 'Publish artifact: Full Nuget' inputs: PathtoPublish: '$(build.SourcesDirectory)\BuildOutput' artifactName: 'FoundationBinaries_Release_AnyCPU' - job: BuildMRT pool: vmImage: 'windows-2022' strategy: maxParallel: 10 matrix: Release_x86: buildPlatform: 'x86' buildConfiguration: 'Release' Release_x64: buildPlatform: 'x64' buildConfiguration: 'Release' Release_Arm64: buildPlatform: 'ARM64' buildConfiguration: 'Release' variables: ob_artifactBaseName: "MrtBinaries_$(buildConfiguration)_$(buildPlatform)" # For BuildMRT to publish t steps: - task: NuGetToolInstaller@1 - template: AzurePipelinesTemplates\WindowsAppSDK-BuildMRT-Steps.yml parameters: IsOneBranch: false - job: Test pool: vmImage: 'windows-2022' 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 dependsOn: - BuildBinaries - BuildBinaries_release_anycpu - BuildMRT variables: testPayloadArtifactDir: $(Build.SourcesDirectory)\BuildOutput\$(buildConfiguration)\$(buildPlatform) steps: - template: AzurePipelinesTemplates\WindowsAppSDK-RunTests-Steps.yml parameters: buildPlatform: $(buildPlatform) buildConfiguration: $(buildConfiguration) testLocale: $(testLocale)