ArmVirtPkg/PlatformCI: factor out reusable PlatformBuildLib.py

In order to reduce the amount of code duplication, refactor the
PlatformBuild.py script that builds ArmVirtQemu.dsc into a reusable
PlatformBuildLib.py containing most of the bits and pieces, and a small
QemuBuild.py which is specific to the DSC in question.

Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
Ard Biesheuvel
2023-01-24 15:34:24 +00:00
committed by mergify[bot]
parent 619f077252
commit 01a06884a1
3 changed files with 39 additions and 23 deletions

View File

@@ -30,42 +30,42 @@ jobs:
strategy:
matrix:
QEMU_AARCH64_DEBUG:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "AARCH64"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_AARCH64_RELEASE:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "AARCH64"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_AARCH64_NOOPT:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "AARCH64"
Build.Flags: ""
Build.Target: "NOOPT"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_ARM_DEBUG:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "DEBUG"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_ARM_RELEASE:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "RELEASE"
Run.Flags: $(run_flags)
Run: $(should_run)
QEMU_ARM_NOOPT:
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
Build.File: "$(package)/PlatformCI/QemuBuild.py"
Build.Arch: "ARM"
Build.Flags: ""
Build.Target: "NOOPT"