Onboarding ARM64 builds on selfhosted Azure pipeline agents (#134)

# Preface

Please ensure you have read the [contribution
docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request
guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

## Description

This change added a few new matrix entries to support building
mu_tiano_platforms on native ARM64 systems. The PR will cover both
https://github.com/microsoft/mu_basecore/issues/369 and
https://github.com/microsoft/mu_basecore/issues/305.

The PR should also be incorporated with mu_devops change.

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

This was tested on selfhost-agents and existing agents.

## Integration Instructions

Pipeline changes, N/A for integration.
This commit is contained in:
kuqin12 2023-06-01 17:33:56 -07:00 коммит произвёл GitHub
Родитель 0a08258f33
Коммит 3f1944150b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 73 добавлений и 113 удалений

Просмотреть файл

@ -1,81 +0,0 @@
## @file
# Template file for generating a build job matrix for the packages currently supported for
# build in Mu Tiano Plus.
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
parameters:
- name: arch_list
displayName: Architectures (e.g. IA32, X64)
type: string
default: ''
- name: extra_build_args
displayName: Extra Build Command Arguments
type: string
default: ''
- name: extra_install_step
displayName: Extra Install Steps
type: stepList
default:
- script: echo No extra steps provided
- name: tool_chain_tag
displayName: Tool Chain (e.g. VS2022)
type: string
default: ''
- name: vm_image
displayName: Virtual Machine Image (e.g. windows-latest)
type: string
default: 'windows-latest'
- name: container_image
displayName: Container Image
type: string
default: ''
jobs:
- job: Build
timeoutInMinutes: 120
# Use matrix to speed up the build process
strategy:
matrix:
TARGET_OTHER:
Build.Pkgs: 'EmbeddedPkg,PrmPkg,SourceLevelDebugPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_FMP_FAT:
Build.Pkgs: 'FmpDevicePkg,FatPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_SECURITY:
Build.Pkgs: 'SecurityPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
workspace:
clean: all
${{ if ne(parameters.container_image, '') }}:
container: ${{ parameters.container_image }}
pool:
vmImage: ${{ parameters.vm_image }}
steps:
- ${{ if and(ne(parameters.container_image, ''), not(contains(parameters.vm_image, 'windows'))) }}:
- script: echo "##vso[task.prependpath]/home/vsts_azpcontainer/.local/bin"
displayName: Add User Local Bin to Path
- template: Steps/PrGate.yml@mu_devops
parameters:
artifacts_identifier: '$(Build.Pkgs) $(Build.Targets)'
build_archs: ${{ parameters.arch_list }}
build_pkgs: $(Build.Pkgs)
build_targets: $(Build.Targets)
do_ci_build: true
do_ci_setup: true
do_non_ci_build: false
do_non_ci_setup: true
do_pr_eval: true
extra_build_args: ${{ parameters.extra_build_args }}
extra_install_step: ${{ parameters.extra_install_step }}
tool_chain_tag: ${{ parameters.tool_chain_tag }}
install_tools: ${{ eq(parameters.container_image, '') }}

Просмотреть файл

@ -14,26 +14,45 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
resources:
repositories:
- repository: mu_devops
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: refs/tags/v3.0.0
containers:
- container: linux-gcc
image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:4a1f8d3
variables:
- group: architectures-arm-64-x86-64
- group: tool-chain-ubuntu-gcc
jobs:
- template: Matrix-Build-Job.yml
extends:
template: MuDevOpsWrapper.yml
parameters:
arch_list: $(arch_list)
extra_build_args: CODE_COVERAGE=TRUE
tool_chain_tag: 'GCC5'
vm_image: $(vm_image)
container_image: linux-gcc
do_ci_build: true
do_ci_setup: true
do_non_ci_build: false
do_non_ci_setup: true
do_pr_eval: true
container_build: true
os_type: Linux
build_matrix:
TARGET_OTHER:
Pkgs: 'EmbeddedPkg,PrmPkg,SourceLevelDebugPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
TARGET_FMP_FAT:
Pkgs: 'FmpDevicePkg,FatPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
TARGET_SECURITY:
Pkgs: 'SecurityPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
TARGET_OTHER_ARM:
Pkgs: 'EmbeddedPkg,PrmPkg,SourceLevelDebugPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
SelfHostAgent: true
TARGET_FMP_FAT_ARM:
Pkgs: 'FmpDevicePkg,FatPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
SelfHostAgent: true
TARGET_SECURITY_ARM:
Pkgs: 'SecurityPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
SelfHostAgent: true

Просмотреть файл

@ -14,22 +14,44 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
resources:
repositories:
- repository: mu_devops
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: refs/tags/v3.0.0
variables:
- group: architectures-x86-64
- group: tool-chain-windows-visual-studio-latest
jobs:
- template: Matrix-Build-Job.yml
extends:
template: MuDevOpsWrapper.yml
parameters:
arch_list: $(arch_list)
extra_build_args: CODE_COVERAGE=TRUE
tool_chain_tag: $(tool_chain_tag)
vm_image: $(vm_image)
do_ci_build: true
do_ci_setup: true
do_non_ci_build: false
do_non_ci_setup: true
do_pr_eval: true
os_type: Windows_NT
build_matrix:
TARGET_OTHER:
Pkgs: 'EmbeddedPkg,PrmPkg,SourceLevelDebugPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
TARGET_FMP_FAT:
Pkgs: 'FmpDevicePkg,FatPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
TARGET_SECURITY:
Pkgs: 'SecurityPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
TARGET_OTHER_ARM:
Pkgs: 'EmbeddedPkg,PrmPkg,SourceLevelDebugPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
SelfHostAgent: true
TARGET_FMP_FAT_ARM:
Pkgs: 'FmpDevicePkg,FatPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
SelfHostAgent: true
TARGET_SECURITY_ARM:
Pkgs: 'SecurityPkg'
Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
ArchList: $(arch_list)
SelfHostAgent: true