Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
106 changes: 53 additions & 53 deletions .azurepipelines/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
# Azure DevOps Pipelines
These yml files are used to provide CI builds using the Azure DevOps Pipeline Service.
Most of the CI leverages edk2-pytools to support cross platform building and execution.
## Core CI
Focused on building and testing all packages in Edk2 without an actual target platform.
See `.pytools/ReadMe.py` for more details
## Platform CI
Focused on building a single target platform and confirming functionality on that platform.
## Conventions
* Files extension should be *.yml. *.yaml is also supported but in Edk2 we use those for our package configuration.
* Platform CI files should be in the `<PlatformPkg>/.azurepipelines` folder.
* Core CI files are in the root folder.
* Shared templates are in the `templates` folder.
* Top level CI files should be named `<host os>-<tool_chain>.yml`
* The pipeline YAML file name is referenced in Azure Pipelines. To allow flexibility for toolchain updates in the
YAML file without necessitating changes in Azure Pipelines, the toolchain version is not included in the filename.
For example, `Windows-VS.yml` is used instead of `Windows-VS2022.yml`.
## Links
* Basic Azure Landing Site - https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops
* Pipeline jobs - https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
* Pipeline yml scheme - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema
* Pipeline expression - https://docs.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops
* PyTools - https://github.com/tianocore/edk2-pytool-extensions and https://github.com/tianocore/edk2-pytool-library
## Lessons Learned
### Templates and parameters
They are great but evil. If they are used as part of determining the steps of a build they must resolve before the build starts. They can not use variables set in a yml or determined as part of a matrix. If they are used in a step then they can be bound late.
### File matching patterns
On Linux this can hang if there are too many files in the search list.
### Templates and file splitting
Suggestion is to do one big yaml file that does what you want for one of your targets. Then do the second one and find the deltas. From that you can start to figure out the right split of files, steps, jobs.
### Conditional steps
If you want the step to show up in the log but not run, use a step conditional. This is great when a platform doesn't currently support a feature but you want the builders to know that the features exists and maybe someday it will.
If you want the step to not show up use a template step conditional wrapper. Beware this will be evaluated early (at build start). This can hide things not needed on a given OS for example.
# Azure DevOps Pipelines

These yml files are used to provide CI builds using the Azure DevOps Pipeline Service.
Most of the CI leverages edk2-pytools to support cross platform building and execution.

## Core CI

Focused on building and testing all packages in Edk2 without an actual target platform.

See `.pytools/ReadMe.py` for more details

## Platform CI

Focused on building a single target platform and confirming functionality on that platform.

## Conventions

* Files extension should be *.yml. *.yaml is also supported but in Edk2 we use those for our package configuration.
* Platform CI files should be in the `<PlatformPkg>/.azurepipelines` folder.
* Core CI files are in the root folder.
* Shared templates are in the `templates` folder.
* Top level CI files should be named `<host os>-<tool_chain>.yml`
* The pipeline YAML file name is referenced in Azure Pipelines. To allow flexibility for toolchain updates in the
YAML file without necessitating changes in Azure Pipelines, the toolchain version is not included in the filename.
For example, `Windows-VS.yml` is used instead of `Windows-VS2022.yml`.

## Links

* Basic Azure Landing Site - https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops
* Pipeline jobs - https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
* Pipeline yml scheme - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema
* Pipeline expression - https://docs.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops
* PyTools - https://github.com/tianocore/edk2-pytool-extensions and https://github.com/tianocore/edk2-pytool-library

## Lessons Learned

### Templates and parameters

They are great but evil. If they are used as part of determining the steps of a build they must resolve before the build starts. They can not use variables set in a yml or determined as part of a matrix. If they are used in a step then they can be bound late.

### File matching patterns

On Linux this can hang if there are too many files in the search list.

### Templates and file splitting

Suggestion is to do one big yaml file that does what you want for one of your targets. Then do the second one and find the deltas. From that you can start to figure out the right split of files, steps, jobs.

### Conditional steps

If you want the step to show up in the log but not run, use a step conditional. This is great when a platform doesn't currently support a feature but you want the builders to know that the features exists and maybe someday it will.

If you want the step to not show up use a template step conditional wrapper. Beware this will be evaluated early (at build start). This can hide things not needed on a given OS for example.
64 changes: 32 additions & 32 deletions .azurepipelines/Ubuntu-CLANGDWARF.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
## @file
# Azure Pipeline build file for a build using Ubuntu and CLANGDWARF
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger: none
schedules:
- cron: "0 7 * * *"
displayName: Daily Build
branches:
include:
- master
- stable/*
always: true
pr: none
variables:
- template: templates/defaults.yml
jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: CLANGDWARF
vm_image: ${{ variables.default_linux_vm }}
container: ${{ variables.default_linux_container }}
arch_list: "IA32,X64,AARCH64,RISCV64"
usePythonVersion: '' # use Python from the container image
## @file
# Azure Pipeline build file for a build using Ubuntu and CLANGDWARF
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger: none

schedules:
- cron: "0 7 * * *"
displayName: Daily Build
branches:
include:
- master
- stable/*
always: true

pr: none

variables:
- template: templates/defaults.yml

jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: CLANGDWARF
vm_image: ${{ variables.default_linux_vm }}
container: ${{ variables.default_linux_container }}
arch_list: "IA32,X64,AARCH64,RISCV64"
usePythonVersion: '' # use Python from the container image
68 changes: 34 additions & 34 deletions .azurepipelines/Ubuntu-CLANGPDB.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
## @file
# Azure Pipeline build file for a build using Ubuntu and CLANGPDB
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger: none
schedules:
- cron: "0 7 * * *"
displayName: Daily Build
branches:
include:
- master
- stable/*
always: true
pr:
- master
- stable/*
variables:
- template: templates/defaults.yml
jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: CLANGPDB
vm_image: ${{ variables.default_linux_vm }}
container: ${{ variables.default_linux_container }}
arch_list: "IA32,X64,AARCH64"
usePythonVersion: '' # use Python from the container image
## @file
# Azure Pipeline build file for a build using Ubuntu and CLANGPDB
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger: none

schedules:
- cron: "0 7 * * *"
displayName: Daily Build
branches:
include:
- master
- stable/*
always: true

pr:
- master
- stable/*

variables:
- template: templates/defaults.yml

jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: CLANGPDB
vm_image: ${{ variables.default_linux_vm }}
container: ${{ variables.default_linux_container }}
arch_list: "IA32,X64,AARCH64"
usePythonVersion: '' # use Python from the container image
68 changes: 34 additions & 34 deletions .azurepipelines/Ubuntu-GCC.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
## @file
# 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>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger: none
schedules:
- cron: "0 7 * * *"
displayName: Daily Build
branches:
include:
- master
- stable/*
always: true
pr:
- master
- stable/*
variables:
- template: templates/defaults.yml
jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: GCC
vm_image: ${{ variables.default_linux_vm }}
container: ${{ variables.default_linux_container }}
arch_list: "IA32,X64,AARCH64,RISCV64,LOONGARCH64"
usePythonVersion: '' # use Python from the container image
## @file
# 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>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger: none

schedules:
- cron: "0 7 * * *"
displayName: Daily Build
branches:
include:
- master
- stable/*
always: true

pr:
- master
- stable/*

variables:
- template: templates/defaults.yml

jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: GCC
vm_image: ${{ variables.default_linux_vm }}
container: ${{ variables.default_linux_container }}
arch_list: "IA32,X64,AARCH64,RISCV64,LOONGARCH64"
usePythonVersion: '' # use Python from the container image
72 changes: 36 additions & 36 deletions .azurepipelines/Ubuntu-PatchCheck.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
## @file
# Azure Pipielines YML file that evalues the patch series in a PR using the
# python script BaseTools/Scripts/PatchCheck.py.
#
# NOTE: This example monitors pull requests against the edk2-ci branch. Most
# environments would replace 'edk2-ci' with 'master'.
#
# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# https://github.com/tianocore
#
##
trigger: none
pr:
- master
- stable/*
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
clean: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
architecture: 'x64'
- script: |
git fetch origin $(System.PullRequest.TargetBranch):$(System.PullRequest.TargetBranch)
python BaseTools/Scripts/PatchCheck.py $(System.PullRequest.TargetBranch)..$(System.PullRequest.SourceCommitId)
displayName: 'Use PatchCheck.py to verify patch series in pull request'
## @file
# Azure Pipielines YML file that evalues the patch series in a PR using the
# python script BaseTools/Scripts/PatchCheck.py.
#
# NOTE: This example monitors pull requests against the edk2-ci branch. Most
# environments would replace 'edk2-ci' with 'master'.
#
# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# https://github.com/tianocore
#
##

trigger: none

pr:
- master
- stable/*

pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
clean: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
architecture: 'x64'

- script: |
git fetch origin $(System.PullRequest.TargetBranch):$(System.PullRequest.TargetBranch)
python BaseTools/Scripts/PatchCheck.py $(System.PullRequest.TargetBranch)..$(System.PullRequest.SourceCommitId)
displayName: 'Use PatchCheck.py to verify patch series in pull request'
Loading
Loading