2 # File templates/pr-gate-build-job.yml
4 # template file used to build supported packages.
6 # Copyright (c) Microsoft Corporation.
7 # Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.<BR>
8 # SPDX-License-Identifier: BSD-2-Clause-Patent
15 extra_install_step: []
20 - job: Build_${{ parameters.tool_chain_tag }}
22 #Use matrix to speed up the build process
25 ${{ if eq(parameters.tool_chain_tag, 'GCC5') }}:
27 Build.Pkgs: 'EmbeddedPkg'
28 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
29 TARGET_ARM_ARMPLATFORM:
30 Build.Pkgs: 'ArmPkg,ArmPlatformPkg'
31 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
33 Build.Pkgs: 'MdePkg,UefiCpuPkg'
34 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
35 TARGET_MDEMODULE_DEBUG:
36 Build.Pkgs: 'MdeModulePkg'
37 Build.Targets: 'DEBUG,NOOPT'
38 TARGET_MDEMODULE_RELEASE:
39 Build.Pkgs: 'MdeModulePkg'
40 Build.Targets: 'RELEASE,NO-TARGET'
42 Build.Pkgs: 'NetworkPkg,RedfishPkg'
43 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
45 Build.Pkgs: 'PcAtChipsetPkg,PrmPkg,ShellPkg,SourceLevelDebugPkg,StandaloneMmPkg,SignedCapsulePkg'
46 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
48 Build.Pkgs: 'FmpDevicePkg,FatPkg,UnitTestFrameworkPkg,DynamicTablesPkg'
49 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
51 Build.Pkgs: 'CryptoPkg'
52 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
54 Build.Pkgs: 'IntelFsp2Pkg,IntelFsp2WrapperPkg'
55 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
57 Build.Pkgs: 'SecurityPkg'
58 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
60 Build.Pkgs: 'UefiPayloadPkg'
61 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
63 # For Platforms only check code. Leave it to Platform CI
65 Build.Pkgs: 'ArmVirtPkg,EmulatorPkg,OvmfPkg'
66 Build.Targets: 'NO-TARGET,NOOPT'
72 vmImage: ${{ parameters.vm_image }}
75 - template: pr-gate-steps.yml
77 tool_chain_tag: ${{ parameters.tool_chain_tag }}
78 build_pkgs: $(Build.Pkgs)
79 build_targets: $(Build.Targets)
80 build_archs: ${{ parameters.arch_list }}
81 extra_install_step: ${{ parameters.extra_install_step }}
83 - job: Build_${{ parameters.tool_chain_tag }}_TARGET_CODE_COVERAGE
84 dependsOn: Build_${{ parameters.tool_chain_tag }}
89 vmImage: 'windows-2019'
97 - task: DownloadPipelineArtifact@2
98 displayName: 'Download Build Artifacts'
101 targetPath: '$(Build.ArtifactStagingDirectory)'
104 displayName: Create code coverage report
107 dotnet tool install -g dotnet-reportgenerator-globaltool
108 reportgenerator -reports:$(Build.ArtifactStagingDirectory)/**/coverage.xml -targetdir:$(Build.ArtifactStagingDirectory)/Coverage -reporttypes:Cobertura -filefilters:-*Build*;-*UnitTest*;-*Mock*;-*usr*
110 - task: PublishCodeCoverageResults@1
111 displayName: 'Publish code coverage'
113 codeCoverageTool: Cobertura
114 summaryFileLocation: '$(Build.ArtifactStagingDirectory)/Coverage/Cobertura.xml'