Skip to content

Commit

Permalink
EmulatorPkg: Add Platform CI and configuration for Core CI
Browse files Browse the repository at this point in the history
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2570

Add new Azure Pipeline definitions to build and run EmulatorPkg with:
  * Ubuntu GCC5
  * Windows VS2019
Add PyTool based build of EmulatorPkg
Add EmulatorPkg.ci.yaml for Core CI
Add ReadMe.md for details and instructions

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>

Reviewed-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
  • Loading branch information
spbrogan committed Apr 24, 2020
1 parent dcb55f7 commit 8bdb907
Show file tree
Hide file tree
Showing 5 changed files with 665 additions and 0 deletions.
85 changes: 85 additions & 0 deletions EmulatorPkg/EmulatorPkg.ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
## @file
# Core CI configuration for EmulatorPkg
#
# EmulatorPkg is part of Platform Ci for builds so this is only
# used for code analysis.
#
# Copyright (c) Microsoft Corporation
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
{
## options defined .pytool/Plugin/CompilerPlugin
"CompilerPlugin": {
"DscPath": "" # Don't support this test
},

## options defined .pytool/Plugin/HostUnitTestCompilerPlugin
"HostUnitTestCompilerPlugin": {
"DscPath": "" # Don't support this test
},

## options defined .pytool/Plugin/CharEncodingCheck
"CharEncodingCheck": {
"IgnoreFiles": []
},

## options defined .pytool/Plugin/DependencyCheck
"DependencyCheck": {
"AcceptableDependencies": [
# For this platform all packages are allowed???
"MdePkg/MdePkg.dec",
"MdeModulePkg/MdeModulePkg.dec",
"EmulatorPkg/EmulatorPkg.dec",
"NetworkPkg/NetworkPkg.dec",
"EmbeddedPkg/EmbeddedPkg.dec", ## is this one OK??
],
# For host based unit tests
"AcceptableDependencies-HOST_APPLICATION":[
"UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec"
],
# For UEFI shell based apps
"AcceptableDependencies-UEFI_APPLICATION":[],
"IgnoreInf": []
},

## options defined .pytool/Plugin/DscCompleteCheck
"DscCompleteCheck": {
"IgnoreInf": [""],
"DscPath": "" # Don't support this test
},

## options defined .pytool/Plugin/HostUnitTestDscCompleteCheck
"HostUnitTestDscCompleteCheck": {
"IgnoreInf": [""],
"DscPath": "" # Don't support this test
},

## options defined .pytool/Plugin/GuidCheck
"GuidCheck": {
"IgnoreGuidName": [],
"IgnoreGuidValue": [],
"IgnoreFoldersAndFiles": [],
"IgnoreDuplicates": [],
},

## options defined .pytool/Plugin/LibraryClassCheck
"LibraryClassCheck": {
"IgnoreHeaderFile": []
},

## options defined .pytool/Plugin/SpellCheck
"SpellCheck": {
"AuditOnly": True, # Fails right now with over 270 errors
"IgnoreFiles": [], # use gitignore syntax to ignore errors in matching files
"ExtendWords": [
"setjump",
"plong",
"lparam",
"lpdword",
"lpthread",
"lresult",
], # words to extend to the dictionary for this package
"IgnoreStandardPaths": [], # Standard Plugin defined paths that should be ignore
"AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported)
}
}
95 changes: 95 additions & 0 deletions EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
## @file
# Azure Pipeline build file for building a platform.
#
# Platform: EmulatorPkg
# OS: Ubuntu
# Toolchain: GCC5
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger:
- master
pr:
- master
jobs:
- job: Platform_CI
variables:
package: 'EmulatorPkg'
vm_image: 'ubuntu-latest'
should_run: false
run_flags: "MAKE_STARTUP_NSH=TRUE"

#Use matrix to speed up the build process
strategy:
matrix:
EmulatorPkg_X64_DEBUG:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_X64_RELEASE:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_X64_NOOPT:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_IA32_DEBUG:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "IA32"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_IA32_RELEASE:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "IA32"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_IA32_NOOPT:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "IA32"
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)

workspace:
clean: all

pool:
vmImage: $(vm_image)

steps:
- template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
parameters:
tool_chain_tag: GCC5
build_pkg: $(package)
build_target: $(Build.Target)
build_arch: $(Build.Arch)
build_file: $(Build.File)
build_flags: $(Build.Flags)
run_flags: $(Run.Flags)
# Add steps to install some IA32 only dependencies
extra_install_step:
- bash: sudo dpkg --add-architecture i386
displayName: Add i386 to dpkg
condition: and(gt(variables.pkg_count, 0), eq(variables['Build.Arch'], 'IA32'), succeeded())
- bash: sudo apt-get update
displayName: do apt-get update
condition: and(gt(variables.pkg_count, 0), eq(variables['Build.Arch'], 'IA32'), succeeded())
- bash: sudo apt-get install libc6-dev:i386 libx11-dev:i386 libxext-dev:i386 lib32gcc-7-dev
displayName: Add additional i386 packages
condition: and(gt(variables.pkg_count, 0), eq(variables['Build.Arch'], 'IA32'), succeeded())
85 changes: 85 additions & 0 deletions EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
## @file
# Azure Pipeline build file for building a platform.
#
# Platform: EMULATORPKG
# OS: Windows
# Toolchain: VS2019
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
trigger:
- master
pr:
- master

jobs:
- job: Platform_CI
variables:
package: 'EmulatorPkg'
vm_image: 'windows-latest'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE"

#Use matrix to speed up the build process
strategy:
matrix:
EmulatorPkg_X64_DEBUG:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_X64_RELEASE:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_X64_NOOPT:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_IA32_DEBUG:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "IA32 "
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_IA32_RELEASE:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "IA32 "
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
EmulatorPkg_IA32_NOOPT:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.Arch: "IA32 "
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)

workspace:
clean: all

pool:
vmImage: $(vm_image)

steps:
- template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
parameters:
tool_chain_tag: VS2019
build_pkg: $(package)
build_target: $(Build.Target)
build_arch: $(Build.Arch)
build_file: $(Build.File)
build_flags: $(Build.Flags)
run_flags: $(Run.Flags)

0 comments on commit 8bdb907

Please sign in to comment.