Skip to content

Commit

Permalink
Merge pull request #3 from tianocore/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
chengchiehhuang authored Oct 18, 2023
2 parents 4bac086 + 772ec92 commit 34e7057
Show file tree
Hide file tree
Showing 6,180 changed files with 860,419 additions and 370,733 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 8 additions & 3 deletions .azurepipelines/Ubuntu-GCC5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# 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:
Expand All @@ -12,10 +13,14 @@ pr:
- master
- stable/*

variables:
- template: templates/defaults.yml

jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: 'GCC5'
vm_image: 'ubuntu-latest'
arch_list: "IA32,X64,ARM,AARCH64,RISCV64"

vm_image: 'ubuntu-22.04'
container: ${{ variables.default_linux_image }}
arch_list: "IA32,X64,ARM,AARCH64,RISCV64,LOONGARCH64"
usePythonVersion: '' # use Python from the container image
2 changes: 1 addition & 1 deletion .azurepipelines/Ubuntu-PatchCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7.x'
versionSpec: '3.11'
architecture: 'x64'

- script: |
Expand Down
11 changes: 10 additions & 1 deletion .azurepipelines/Windows-VS2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@ pr:
- master
- stable/*

variables:
- template: templates/defaults.yml

jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: 'VS2019'
vm_image: 'windows-latest'
vm_image: 'windows-2019'
arch_list: "IA32,X64"
usePythonVersion: ${{ variables.default_python_version }}
extra_install_step:
- powershell: choco install opencppcoverage; Write-Host "##vso[task.prependpath]C:\Program Files\OpenCppCoverage"
displayName: Install Code Coverage Tool
condition: and(gt(variables.pkg_count, 0), succeeded())

9 changes: 0 additions & 9 deletions .azurepipelines/templates/basetools-build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ parameters:
tool_chain_tag: ''

steps:
- ${{ if contains(parameters.tool_chain_tag, 'GCC') }}:
- bash: sudo apt-get update
displayName: Update apt
condition: and(gt(variables.pkg_count, 0), succeeded())

- bash: sudo apt-get install gcc g++ make uuid-dev
displayName: Install required tools
condition: and(gt(variables.pkg_count, 0), succeeded())

- task: CmdLine@1
displayName: Build Base Tools from source
inputs:
Expand Down
12 changes: 12 additions & 0 deletions .azurepipelines/templates/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## @file
# File templates/default.yml
#
# template file containing common default values
#
# Copyright (c) Red Hat, Inc.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##

variables:
default_python_version: "3.11"
default_linux_image: "ghcr.io/tianocore/containers/fedora-37-test:a0dd931"
14 changes: 12 additions & 2 deletions .azurepipelines/templates/platform-build-run-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,26 @@ parameters:
- name: extra_install_step
type: stepList
default: []
- name: usePythonVersion
type: string
default: ''

steps:
- bash: |
echo "##vso[task.prependpath]${HOME}/.local/bin"
echo "new PATH=${PATH}"
displayName: Set PATH
condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')

- checkout: self
clean: true
fetchDepth: 1

- task: UsePythonVersion@0
inputs:
versionSpec: "3.8.x"
versionSpec: ${{ parameters.usePythonVersion }}
architecture: "x64"
condition: ne('${{ parameters.usePythonVersion }}', '')

- script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
Expand Down Expand Up @@ -106,7 +116,7 @@ steps:
filename: stuart_build
arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} --FlashOnly
condition: and(and(gt(variables.pkg_count, 0), succeeded()), eq(variables['Run'], true))
timeoutInMinutes: 1
timeoutInMinutes: 2

# Copy the build logs to the artifact staging directory
- task: CopyFiles@2
Expand Down
77 changes: 70 additions & 7 deletions .azurepipelines/templates/pr-gate-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ parameters:
tool_chain_tag: ''
vm_image: ''
arch_list: ''
extra_install_step: []
usePythonVersion: ''
container: ''

# Build step
jobs:

- job: Build_${{ parameters.tool_chain_tag }}

timeoutInMinutes: 120
#Use matrix to speed up the build process
strategy:
matrix:
${{ if eq(parameters.tool_chain_tag, 'GCC5') }}:
TARGET_GCC_ONLY:
Build.Pkgs: 'EmbeddedPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_ARM_ARMPLATFORM:
Build.Pkgs: 'ArmPkg,ArmPlatformPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
Expand All @@ -35,35 +42,91 @@ jobs:
Build.Targets: 'RELEASE,NO-TARGET'
TARGET_NETWORK:
Build.Pkgs: 'NetworkPkg,RedfishPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_OTHER:
Build.Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
Build.Pkgs: 'PcAtChipsetPkg,PrmPkg,ShellPkg,SourceLevelDebugPkg,StandaloneMmPkg,SignedCapsulePkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_FMP_FAT_TEST:
Build.Pkgs: 'FmpDevicePkg,FatPkg,UnitTestFrameworkPkg,DynamicTablesPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_CRYPTO:
TARGET_CRYPTO_DEBUG:
Build.Pkgs: 'CryptoPkg'
Build.Targets: 'DEBUG,NOOPT'
TARGET_CRYPTO_RELEASE:
Build.Pkgs: 'CryptoPkg'
Build.Targets: 'RELEASE,NO-TARGET'
TARGET_FSP:
Build.Pkgs: 'IntelFsp2Pkg,IntelFsp2WrapperPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_SECURITY:
Build.Pkgs: 'SecurityPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_UEFIPAYLOAD:
Build.Pkgs: 'UefiPayloadPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_PLATFORMS:
# For Platforms only check code. Leave it to Platform CI
# to build them.
Build.Pkgs: 'ArmVirtPkg,EmulatorPkg,OvmfPkg'
Build.Targets: 'NO-TARGET'
Build.Targets: 'NO-TARGET,NOOPT'

workspace:
clean: all

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

${{ if not(eq(parameters.container, '')) }}:
container: ${{ parameters.container }}

steps:
- template: pr-gate-steps.yml
parameters:
tool_chain_tag: ${{ parameters.tool_chain_tag }}
build_pkgs: $(Build.Pkgs)
build_targets: $(Build.Targets)
build_archs: ${{ parameters.arch_list }}
usePythonVersion: ${{ parameters.usePythonVersion }}
extra_install_step: ${{ parameters.extra_install_step }}

- job: Build_${{ parameters.tool_chain_tag }}_TARGET_CODE_COVERAGE
dependsOn: Build_${{ parameters.tool_chain_tag }}
workspace:
clean: all

pool:
vmImage: 'windows-2019'

steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: true

- task: DownloadPipelineArtifact@2
displayName: 'Download Build Artifacts'
inputs:
buildType: 'current'
targetPath: '$(Build.ArtifactStagingDirectory)'

- powershell: Write-Host "##vso[task.setvariable variable=is_code_coverage]0"
displayName: Give default value for whether CodeCoverage or not

- powershell: if (Test-Path -Path $(Build.ArtifactStagingDirectory)/**/coverage.xml) {Write-Host "##vso[task.setvariable variable=is_code_coverage]1"}
displayName: Check coverage.xml exist or not

- task: CmdLine@2
displayName: Create code coverage report
inputs:
script: |
dotnet tool install -g dotnet-reportgenerator-globaltool
reportgenerator -reports:$(Build.ArtifactStagingDirectory)/**/coverage.xml -targetdir:$(Build.ArtifactStagingDirectory)/Coverage -reporttypes:Cobertura -filefilters:-*Build*;-*UnitTest*;-*Mock*;-*usr*
condition: eq(variables.is_code_coverage, 1)

- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.ArtifactStagingDirectory)/Coverage/Cobertura.xml'
condition: eq(variables.is_code_coverage, 1)

16 changes: 14 additions & 2 deletions .azurepipelines/templates/pr-gate-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@ parameters:
build_pkgs: ''
build_targets: ''
build_archs: ''
usePythonVersion: ''
extra_install_step: []

steps:
- bash: |
echo "##vso[task.prependpath]${HOME}/.local/bin"
echo "new PATH=${PATH}"
displayName: Set PATH
condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')

- checkout: self
clean: true
fetchDepth: 1

- task: UsePythonVersion@0
inputs:
versionSpec: '3.8.x'
architecture: 'x64'
versionSpec: ${{ parameters.usePythonVersion }}
architecture: "x64"
condition: ne('${{ parameters.usePythonVersion }}', '')

- script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
Expand All @@ -37,6 +46,8 @@ steps:
displayName: fetch target branch
condition: eq(variables['Build.Reason'], 'PullRequest')

- ${{ parameters.extra_install_step }}

# trim the package list if this is a PR
- task: CmdLine@1
displayName: Check if ${{ parameters.build_pkgs }} need testing
Expand Down Expand Up @@ -125,6 +136,7 @@ steps:
TestSuites.xml
**/BUILD_TOOLS_REPORT.html
**/OVERRIDELOG.TXT
coverage.xml
flattenFolders: true
condition: succeededOrFailed()

Expand Down
2 changes: 1 addition & 1 deletion .azurepipelines/templates/spell-check-prereq-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ steps:
#checkLatest: false # Optional
condition: and(gt(variables.pkg_count, 0), succeeded())

- script: npm install -g cspell
- script: npm install -g cspell@5.20.0
displayName: 'Install cspell npm'
condition: and(gt(variables.pkg_count, 0), succeeded())
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"image": "ghcr.io/tianocore/containers/fedora-35-dev:latest",
"postCreateCommand": "git config --global --add safe.directory * && pip install --upgrade -r pip-requirements.txt",
"customizations": {
"vscode": {
"extensions": [
"DavidAnson.vscode-markdownlint",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"ms-vscode.cpptools",
"walonli.edk2-vscode",
"zachflower.uncrustify"
]
}
}
}
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# EditorConfig file: https://EditorConfig.org

root = true

[*]
charset = latin1
end_of_line = crlf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
charset = utf-8
indent_style = space
indent_size = 4

[*.sh]
end_of_line = lf

[.gitattributes]
end_of_line = lf

[.mailmap]
charset = utf-8

[Maintainers.txt]
charset = utf-8

[Makefile,GNUmakefile]
indent_style = tab
52 changes: 52 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# PrmPkg: Apply uncrustify changes
a298a84478053872ed9da660a75f182ce81b8ddc
# UnitTestFrameworkPkg: Apply uncrustify changes
7c0ad2c33810ead45b7919f8f8d0e282dae52e71
# UefiPayloadPkg: Apply uncrustify changes
e5efcf8be8a1bf59aa98875787475e3144ee4cef
# UefiCpuPkg: Apply uncrustify changes
053e878bfb5c9d5eca779789b62891add30b14ba
# StandaloneMmPkg: Apply uncrustify changes
91415a36ae7aaeabb2bbab3762f39544f9aed683
# SourceLevelDebugPkg: Apply uncrustify changes
c1e126b1196de75e0a4cda21e4551ea9bb05e059
# SignedCapsulePkg: Apply uncrustify changes
b87864896714cf3062a7bc6d577d8fbd62d105e5
# ShellPkg: Apply uncrustify changes
47d20b54f9a65b08aa602a1866c1b59a69088dfc
# SecurityPkg: Apply uncrustify changes
c411b485b63a671a1e276700cff025c73997233c
# RedfishPkg: Apply uncrustify changes
39de741e2dcb8f11e9b4438e37224797643d8451
# PcAtChipsetPkg: Apply uncrustify changes
5220bd211df890f2672c23c050082862cd1e82d6
# OvmfPkg: Apply uncrustify changes
ac0a286f4d747a4c6c603a7b225917293cbe1e9f
# NetworkPkg: Apply uncrustify changes
d1050b9dff1cace252aff86630bfdb59dff5f507
# MdePkg: Apply uncrustify changes
2f88bd3a1296c522317f1c21377876de63de5be7
# MdeModulePkg: Apply uncrustify changes
1436aea4d5707e672672a11bda72be2c63c936c3
# IntelFsp2WrapperPkg: Apply uncrustify changes
7c7184e201a90a1d2376e615e55e3f4074731468
# IntelFsp2Pkg: Apply uncrustify changes
111f2228ddf487b0ac3491e416bb3dcdcfa4f979
# FmpDevicePkg: Apply uncrustify changes
45ce0a67bb4ee80f27da93777c623f51f344f23b
# FatPkg: Apply uncrustify changes
bcdcc4160d7460c46c08c9395aae81be44ef23a9
# EmulatorPkg: Apply uncrustify changes
a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97
# EmbeddedPkg: Apply uncrustify changes
e7108d0e9655b1795c94ac372b0449f28dd907df
# DynamicTablesPkg: Apply uncrustify changes
731c67e1d77b7741a91762d17659fc9fbcb9e305
# CryptoPkg: Apply uncrustify changes
7c342378317039e632d9a1a5d4cf7c21aec8cb7a
# ArmVirtPkg: Apply uncrustify changes
2b16a4fb91b9b31c0d152588f5ac51080c6c0763
# ArmPlatformPkg: Apply uncrustify changes
40b0b23ed34f48c26d711d3e4613a4bb35eeadff
# ArmPkg: Apply uncrustify changes
429309e0c6b74792d679681a8edd0d5ae0ff850c
Loading

0 comments on commit 34e7057

Please sign in to comment.