Skip to content

Commit

Permalink
Merge branch 'tianocore:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
tqh authored Feb 4, 2023
2 parents 852a813 + 7c138e4 commit c977ce9
Show file tree
Hide file tree
Showing 780 changed files with 45,636 additions and 10,433 deletions.
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
9 changes: 9 additions & 0 deletions .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-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.10.6"
default_linux_image: "ghcr.io/tianocore/containers/fedora-35-test:47addc9"
12 changes: 11 additions & 1 deletion .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.10.6"
versionSpec: ${{ parameters.usePythonVersion }}
architecture: "x64"
condition: ne('${{ parameters.usePythonVersion }}', '')

- script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
Expand Down
59 changes: 58 additions & 1 deletion .azurepipelines/templates/pr-gate-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ parameters:
tool_chain_tag: ''
vm_image: ''
arch_list: ''
extra_install_step: []
usePythonVersion: ''
container: ''

# Build step
jobs:
Expand All @@ -21,6 +24,10 @@ jobs:
#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 @@ -37,14 +44,17 @@ jobs:
Build.Pkgs: 'NetworkPkg,RedfishPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_OTHER:
Build.Pkgs: 'PcAtChipsetPkg,PrmPkg,ShellPkg,StandaloneMmPkg'
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:
Build.Pkgs: 'CryptoPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_FSP:
Build.Pkgs: 'IntelFsp2Pkg,IntelFsp2WrapperPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
TARGET_SECURITY:
Build.Pkgs: 'SecurityPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
Expand All @@ -63,10 +73,57 @@ jobs:
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.10.6'
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
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## @file
# GitHub issue configuration file.
#
# This file is meant to direct contributors familiar with GitHub's issue tracker
# to the external resources used by TianoCore.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##

blank_issues_enabled: false
contact_links:
- name: Bugs and Feature Requests
url: https://bugzilla.tianocore.org/
about: Submit bug reports and feature requests here
- name: Reporting Security Issues
url: https://github.com/tianocore/tianocore.github.io/wiki/Reporting-Security-Issues
about: Read the wiki page that describes the process here
- name: EDK II Development Mailing List
url: https://edk2.groups.io/g/devel
about: Submit code patches and ask questions on the mailing list ([email protected])
- name: EDK II Discussions
url: https://github.com/tianocore/edk2/discussions
about: You can also reach out on the Discussion section of this repository
29 changes: 29 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## @file
# CodeQL configuration file for edk2.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##

name: "CodeQL config"

# The following line disables the default queries. This is used because we want to enable on query at a time by
# explicitly specifying each query in a "queries" array as they are enabled.
#
# See the following for more information about adding custom queries:
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-a-custom-configuration-file

#disable-default-queries: true

queries:
- name: EDK2 CodeQL Query List
uses: ./.github/codeql/edk2.qls

# We must specify a query for CodeQL to run. Until the first query is enabled, enable the security query suite but
# exclude all problem levels from impacting the results. After the first query is enabled, this filter can be relaxed
# to find the level of problems desired from the query.
query-filters:
- exclude:
problem.severity:
- warning
- recommendation
14 changes: 14 additions & 0 deletions .github/codeql/edk2.qls
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- description: EDK2 (C++) queries

# Bring in all queries from the official cpp-queries suite so individual queries can be explicitly enabled.

- queries: '.'
from: codeql/cpp-queries

# Enable individual queries below.

- include:
id: cpp/infinite-loop-with-unsatisfiable-exit-condition
- include:
id: cpp/overflow-buffer
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## @file
# Dependabot configuration file to enable GitHub services for managing and updating
# dependencies.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
##
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "pip"
reviewers:
- "makubacki"
- "mdkinney"
- "spbrogan"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
commit-message:
prefix: "GitHub Action"
reviewers:
- "makubacki"
- "mdkinney"
- "spbrogan"
Loading

0 comments on commit c977ce9

Please sign in to comment.