Skip to content

Commit

Permalink
OvmfPkg/PlatformCI: add AmdSevBuild.py
Browse files Browse the repository at this point in the history
Add build test for OvmfPkg/AmdSev.

Signed-off-by: Gerd Hoffmann <[email protected]>
Acked-by: Jiewen Yao <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Philippe Mathieu-Daude <[email protected]>
  • Loading branch information
kraxel authored and mergify[bot] committed Dec 13, 2021
1 parent 04eacd3 commit 8b8ae60
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ jobs:
Run.Flags: $(run_flags)
Run: $(should_run)

AMDSEV_X64_DEBUG:
Build.File: "$(package)/PlatformCI/AmdSevBuild.py"
Build.Arch: "X64"
Build.Flags: ""
Build.Target: "DEBUG"
# restricted + stripped down build
# can't boot to uefi shell -> skip test
Run.Flags: "QEMU_SKIP=TRUE"
Run: $(should_run)

BHYVE_X64_DEBUG:
Build.File: "$(package)/PlatformCI/BhyveBuild.py"
Build.Arch: "X64"
Expand Down
37 changes: 37 additions & 0 deletions OvmfPkg/PlatformCI/AmdSevBuild.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys

sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder

# ####################################################################################### #
# Common Configuration #
# ####################################################################################### #
class CommonPlatform():
''' Common settings for this platform. Define static data here and use
for the different parts of stuart
'''
PackagesSupported = ("OvmfPkg",)
ArchSupported = ("X64",)
TargetsSupported = ("DEBUG", "RELEASE", "NOOPT")
Scopes = ('ovmf', 'edk2-build')
WorkspaceRoot = os.path.realpath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), "..", ".."))

@classmethod
def GetDscName(cls, ArchCsv: str) -> str:
''' return the DSC given the architectures requested.
ArchCsv: csv string containing all architectures to build
'''
return "AmdSev/AmdSevX64.dsc"

import PlatformBuildLib
PlatformBuildLib.CommonPlatform = CommonPlatform

0 comments on commit 8b8ae60

Please sign in to comment.