ProjectReunion/build/ProjectReunion-CI.yml

169 строки
4.3 KiB
YAML

# 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
jobs:
- job: CredScan
pool:
vmImage: 'windows-2019'
steps:
# Scans the root source folder for security vulnerability
- task: CredScan@2
inputs:
toolMajorVersion: 'V2'
# This PostAnalysis will fail the pipeline if CredScan identifies an issue
- task: PostAnalysis@1
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: Build
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 120
strategy:
maxParallel: 10
matrix:
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'
variables:
buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
publishDir : $(Build.ArtifactStagingDirectory)
steps:
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildDevProject-Steps.yml
parameters:
channel: ${{ variables.channel }}
- template: AzurePipelinesTemplates\WindowsAppSDK-PublishProjectOutput-Steps.yml
- task: BinSkim@3
inputs:
InputType: 'Basic'
Function: 'analyze'
AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
AnalyzeVerbose: true
condition: ne(variables['buildConfiguration'], 'Debug')
- task: PostAnalysis@1
inputs:
AllTools: false
APIScan: false
BinSkim: true
BinSkimBreakOn: 'Error'
CodesignValidation: false
CredScan: false
FortifySCA: false
FxCop: false
ModernCop: false
PoliCheck: false
RoslynAnalyzers: false
SDLNativeRules: false
Semmle: false
TSLint: false
ToolLogsNotFoundAction: 'Standard'
- job: BuildMRT
pool:
vmImage: 'windows-latest'
strategy:
maxParallel: 10
matrix:
Release_x86:
buildPlatform: 'x86'
buildConfiguration: 'Release'
Release_x64:
buildPlatform: 'x64'
buildConfiguration: 'Release'
Release_Arm64:
buildPlatform: 'ARM64'
buildConfiguration: 'Release'
steps:
- template: build-mrt.yml
parameters:
buildJobName: 'BuildMRTCore'
- task: BinSkim@3
inputs:
InputType: 'Basic'
Function: 'analyze'
AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
AnalyzeVerbose: true
- task: PostAnalysis@1
inputs:
AllTools: false
APIScan: false
BinSkim: true
BinSkimBreakOn: 'Error'
CodesignValidation: false
CredScan: false
FortifySCA: false
FxCop: false
ModernCop: false
PoliCheck: false
RoslynAnalyzers: false
SDLNativeRules: false
Semmle: false
TSLint: false
ToolLogsNotFoundAction: 'Standard'
- job: PublishMRT
dependsOn:
- BuildMRT
condition: in(dependencies.BuildMRT.result, 'Succeeded')
pool:
vmImage: 'windows-latest'
steps:
- template: publish-mrt.yml
- template: AzurePipelinesTemplates\WindowsAppSDK-RunHelixTests-Job.yml
parameters:
name: 'RunTestsInHelix'
dependsOn:
- Build
- BuildMRT
condition: in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues')
# Create Nuget Package
- template: AzurePipelinesTemplates\WindowsAppSDK-CreateNugetPackage-Job.yml
parameters:
publishToMaestro: false
jobName: CreateNugetPackage
dependsOn:
- Build
- PublishMRT
prereleaseVersionTag: ci
condition: |
and
(
in(dependencies.PublishMRT.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
)