VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/.azurepipelines/templates/pr-gate-build-job.yml@ 106129

Last change on this file since 106129 was 101291, checked in by vboxsync, 18 months ago

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • Property svn:eol-style set to native
File size: 4.4 KB
Line 
1## @file
2# File templates/pr-gate-build-job.yml
3#
4# template file used to build supported packages.
5#
6# Copyright (c) Microsoft Corporation.
7# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.<BR>
8# SPDX-License-Identifier: BSD-2-Clause-Patent
9##
10
11parameters:
12 tool_chain_tag: ''
13 vm_image: ''
14 arch_list: ''
15 extra_install_step: []
16 usePythonVersion: ''
17 container: ''
18
19# Build step
20jobs:
21
22- job: Build_${{ parameters.tool_chain_tag }}
23 timeoutInMinutes: 120
24 #Use matrix to speed up the build process
25 strategy:
26 matrix:
27 ${{ if eq(parameters.tool_chain_tag, 'GCC5') }}:
28 TARGET_GCC_ONLY:
29 Build.Pkgs: 'EmbeddedPkg'
30 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
31 TARGET_ARM_ARMPLATFORM:
32 Build.Pkgs: 'ArmPkg,ArmPlatformPkg'
33 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
34 TARGET_MDE_CPU:
35 Build.Pkgs: 'MdePkg,UefiCpuPkg'
36 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
37 TARGET_MDEMODULE_DEBUG:
38 Build.Pkgs: 'MdeModulePkg'
39 Build.Targets: 'DEBUG,NOOPT'
40 TARGET_MDEMODULE_RELEASE:
41 Build.Pkgs: 'MdeModulePkg'
42 Build.Targets: 'RELEASE,NO-TARGET'
43 TARGET_NETWORK:
44 Build.Pkgs: 'NetworkPkg,RedfishPkg'
45 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
46 TARGET_OTHER:
47 Build.Pkgs: 'PcAtChipsetPkg,PrmPkg,ShellPkg,SourceLevelDebugPkg,StandaloneMmPkg,SignedCapsulePkg'
48 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
49 TARGET_FMP_FAT_TEST:
50 Build.Pkgs: 'FmpDevicePkg,FatPkg,UnitTestFrameworkPkg,DynamicTablesPkg'
51 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
52 TARGET_CRYPTO_DEBUG:
53 Build.Pkgs: 'CryptoPkg'
54 Build.Targets: 'DEBUG,NOOPT'
55 TARGET_CRYPTO_RELEASE:
56 Build.Pkgs: 'CryptoPkg'
57 Build.Targets: 'RELEASE,NO-TARGET'
58 TARGET_FSP:
59 Build.Pkgs: 'IntelFsp2Pkg,IntelFsp2WrapperPkg'
60 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
61 TARGET_SECURITY:
62 Build.Pkgs: 'SecurityPkg'
63 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
64 TARGET_UEFIPAYLOAD:
65 Build.Pkgs: 'UefiPayloadPkg'
66 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
67 TARGET_PLATFORMS:
68 # For Platforms only check code. Leave it to Platform CI
69 # to build them.
70 Build.Pkgs: 'ArmVirtPkg,EmulatorPkg,OvmfPkg'
71 Build.Targets: 'NO-TARGET,NOOPT'
72
73 workspace:
74 clean: all
75
76 pool:
77 vmImage: ${{ parameters.vm_image }}
78
79 ${{ if not(eq(parameters.container, '')) }}:
80 container: ${{ parameters.container }}
81
82 steps:
83 - template: pr-gate-steps.yml
84 parameters:
85 tool_chain_tag: ${{ parameters.tool_chain_tag }}
86 build_pkgs: $(Build.Pkgs)
87 build_targets: $(Build.Targets)
88 build_archs: ${{ parameters.arch_list }}
89 usePythonVersion: ${{ parameters.usePythonVersion }}
90 extra_install_step: ${{ parameters.extra_install_step }}
91
92- job: Build_${{ parameters.tool_chain_tag }}_TARGET_CODE_COVERAGE
93 dependsOn: Build_${{ parameters.tool_chain_tag }}
94 workspace:
95 clean: all
96
97 pool:
98 vmImage: 'windows-2019'
99
100 steps:
101 - checkout: self
102 clean: true
103 fetchDepth: 1
104 submodules: true
105
106 - task: DownloadPipelineArtifact@2
107 displayName: 'Download Build Artifacts'
108 inputs:
109 buildType: 'current'
110 targetPath: '$(Build.ArtifactStagingDirectory)'
111
112 - powershell: Write-Host "##vso[task.setvariable variable=is_code_coverage]0"
113 displayName: Give default value for whether CodeCoverage or not
114
115 - powershell: if (Test-Path -Path $(Build.ArtifactStagingDirectory)/**/coverage.xml) {Write-Host "##vso[task.setvariable variable=is_code_coverage]1"}
116 displayName: Check coverage.xml exist or not
117
118 - task: CmdLine@2
119 displayName: Create code coverage report
120 inputs:
121 script: |
122 dotnet tool install -g dotnet-reportgenerator-globaltool
123 reportgenerator -reports:$(Build.ArtifactStagingDirectory)/**/coverage.xml -targetdir:$(Build.ArtifactStagingDirectory)/Coverage -reporttypes:Cobertura -filefilters:-*Build*;-*UnitTest*;-*Mock*;-*usr*
124 condition: eq(variables.is_code_coverage, 1)
125
126 - task: PublishCodeCoverageResults@1
127 displayName: 'Publish code coverage'
128 inputs:
129 codeCoverageTool: Cobertura
130 summaryFileLocation: '$(Build.ArtifactStagingDirectory)/Coverage/Cobertura.xml'
131 condition: eq(variables.is_code_coverage, 1)
132
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette