Skip to content

Commit

Permalink
Use Mu DevOps (#19)
Browse files Browse the repository at this point in the history
Updates this repo to use mu_devops for Azure Pipeline definitions.

In order to centralize definitions and avoid build churn in individual
Mu repos,
some changes are made to allow build administrators to quickly adjust
settings:

- Toolchain, VM image, and architecture are controlled by build
administrators through centralized
   variable groups
- CI triggers, CI schedules, and PR triggers are controlled by build
administrators within the
  individual pipeline UI settings

- [ ] Breaking change?
- Will this change break pre-existing builds or functionality without
action being taken?
  **No**

Verified in test pipelines.

N/A - No developer integration required

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
  • Loading branch information
makubacki authored and kenlautner committed Dec 19, 2023
1 parent f49f73f commit e561e5a
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 648 deletions.
69 changes: 69 additions & 0 deletions .azurepipelines/Matrix-Build-Job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## @file
# Template file for generating a build job matrix for the packages currently supported for
# build in Mu Silicon Tiano Arm.
#
# 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'

jobs:

- job: Build
timeoutInMinutes: 120
# Use matrix to speed up the build process
strategy:
matrix:
TARGET_ARMPKG:
Build.Pkgs: 'ArmPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_ARMPLATFORMPKG:
Build.Pkgs: 'ArmPlatformPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_PLATFORMS:
Build.Pkgs: 'ArmVirtPkg'
Build.Targets: 'NO-TARGET,NOOPT'

workspace:
clean: all

pool:
vmImage: ${{ parameters.vm_image }}

steps:
- template: Steps/PrGate.yml@mu_devops
parameters:
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 }}
50 changes: 0 additions & 50 deletions .azurepipelines/ReadMe.md

This file was deleted.

45 changes: 17 additions & 28 deletions .azurepipelines/Ubuntu-GCC5.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,32 @@
## @file
# Azure Pipeline build file for a build using ubuntu and GCC5
# Azure Pipeline build file for a build using Ubuntu and GCC.
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
# MU_CHANGE BEGIN
trigger:
- dev/*
- release/202208
- release/202202

schedules:
- cron: "30 9 * * 0,3" # Sun/Wed at 2:30AM Pacific
displayName: Sun/Wed Build
branches:
include:
- dev/*
- release/202208
- release/202202
always: true # Always build, even if no changes
resources:
repositories:
- repository: mu_devops
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: main

pr:
- dev/*
- release/202208
- release/202202
# MU_CHANGE END
variables:
- group: architectures-arm-64-x86-64
- group: tool-chain-ubuntu-gcc

jobs:
- template: templates/pr-gate-build-job.yml
- template: Matrix-Build-Job.yml
parameters:
tool_chain_tag: 'GCC5'
vm_image: 'ubuntu-latest'
arch_list: "IA32,X64,ARM,AARCH64,LOONGARCH64"
usePythonVersion: '' # use Python from the container image
# MU_CHANGE
extra_steps:
arch_list: $(arch_list)
extra_build_args: CODE_COVERAGE=TRUE CC_HTML=TRUE
extra_install_step:
- script: |
sudo apt-get install -y mingw-w64 lcov
pip install lcov_cobertura pycobertura
displayName: Install Windows Resource Compiler for Linux & Code Coverage Tools
tool_chain_tag: $(tool_chain_tag)
vm_image: $(vm_image)
39 changes: 0 additions & 39 deletions .azurepipelines/Ubuntu-PatchCheck.yml

This file was deleted.

39 changes: 15 additions & 24 deletions .azurepipelines/Windows-VS.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
## @file
# Azure Pipeline build file for a build using Windows and the Visual Studio compiler
# Azure Pipeline build file for a build using Windows and the latest Visual Studio toolchain supported.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
# MU_CHANGE BEGIN
trigger:
- dev/*
- release/202208
- release/202202

schedules:
- cron: "0 8 * * 0,3" # Sun/Wed at 1AM Pacific
displayName: Sun/Wed Build
branches:
include:
- dev/*
- release/202208
- release/202202
always: true # Always build, even if no changes
resources:
repositories:
- repository: mu_devops
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: main

pr:
- dev/*
- release/202208
- release/202202
# MU_CHANGE END
variables:
- group: architectures-x86-64
- group: tool-chain-windows-visual-studio-latest

jobs:
- template: templates/pr-gate-build-job.yml
- template: Matrix-Build-Job.yml
parameters:
tool_chain_tag: 'VS2022'
vm_image: 'windows-2022'
arch_list: "IA32,X64"
arch_list: $(arch_list)
tool_chain_tag: $(tool_chain_tag)
vm_image: $(vm_image)
59 changes: 0 additions & 59 deletions .azurepipelines/templates/ReadMe.md

This file was deleted.

30 changes: 0 additions & 30 deletions .azurepipelines/templates/basetools-build-steps.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .azurepipelines/templates/github-file-fetch.yml

This file was deleted.

Loading

0 comments on commit e561e5a

Please sign in to comment.