2020-04-19 10:08:07 +02:00
|
|
|
## @file
|
|
|
|
# Azure Pipeline build file for building a platform.
|
|
|
|
#
|
|
|
|
# Platform: OVMF
|
|
|
|
# OS: Ubuntu
|
|
|
|
# Toolchain: GCC5
|
|
|
|
#
|
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
##
|
|
|
|
trigger:
|
|
|
|
- master
|
2020-12-19 03:19:09 +01:00
|
|
|
- stable/*
|
2020-04-19 10:08:07 +02:00
|
|
|
pr:
|
|
|
|
- master
|
2020-12-19 03:19:09 +01:00
|
|
|
- stable/*
|
2020-04-19 10:08:07 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: Platform_CI
|
|
|
|
variables:
|
|
|
|
package: 'OvmfPkg'
|
OvmfPkg/PlatformCI: stick with "ubuntu-18.04" for now
"vm_image: 'ubuntu-latest'" now refers to Ubuntu Focal (20.04LTS), not
Ubuntu Bionic (18.04LTS), according to
<https://github.com/actions/virtual-environments/issues/1816>.
In Focal, the "qemu" package is a dummy package with no dependencies, and
so the actual emulators are not pulled in. Compare:
https://packages.ubuntu.com/bionic/qemu
https://packages.ubuntu.com/focal/qemu
This causes CI runs to fail.
It would be best to switch to the "qemu-system" package name, which
continues to depend on the emulators:
https://packages.ubuntu.com/bionic/qemu-system
https://packages.ubuntu.com/focal/qemu-system
However, while that package does make the emulators available, the
emulators crash. So for now, stick with the previous Ubuntu environment,
which continues to be supported, per
<https://github.com/actions/virtual-environments/issues/1816>.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201217204049.26817-3-lersek@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-17 21:40:49 +01:00
|
|
|
vm_image: 'ubuntu-18.04'
|
2020-04-19 10:08:07 +02:00
|
|
|
should_run: true
|
|
|
|
run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"
|
|
|
|
|
|
|
|
#Use matrix to speed up the build process
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
OVMF_IA32_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_IA32_RELEASE:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "RELEASE"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_IA32_NOOPT:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "NOOPT"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
|
|
|
|
OVMF_X64_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_X64_RELEASE:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "RELEASE"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_X64_NOOPT:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "NOOPT"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
|
|
|
|
OVMF_IA32X64_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32,X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_IA32X64_RELEASE:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32,X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "RELEASE"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_IA32X64_NOOPT:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32,X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "NOOPT"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
|
|
|
|
OVMF_IA32X64_FULL_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32,X64"
|
2021-12-15 12:39:20 +01:00
|
|
|
Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM2_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
|
2020-04-19 10:08:07 +02:00
|
|
|
Build.Target: "DEBUG"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_IA32X64_FULL_RELEASE:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32,X64"
|
2021-12-15 12:39:20 +01:00
|
|
|
Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM2_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
|
2020-04-19 10:08:07 +02:00
|
|
|
Build.Target: "RELEASE"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
|
|
|
OVMF_IA32X64_FULL_NOOPT:
|
|
|
|
Build.File: "$(package)/PlatformCI/PlatformBuild.py"
|
|
|
|
Build.Arch: "IA32,X64"
|
2021-12-15 12:39:20 +01:00
|
|
|
Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM2_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
|
2020-04-19 10:08:07 +02:00
|
|
|
Build.Target: "NOOPT"
|
|
|
|
Run.Flags: $(run_flags)
|
|
|
|
Run: $(should_run)
|
2021-12-13 09:14:39 +01:00
|
|
|
|
2021-12-13 09:14:41 +01:00
|
|
|
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)
|
|
|
|
|
2021-12-13 09:14:39 +01:00
|
|
|
BHYVE_X64_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/BhyveBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
# this build is for freebsd bhyve not qemu-kvm
|
|
|
|
Run.Flags: "QEMU_SKIP=TRUE"
|
|
|
|
Run: $(should_run)
|
2021-12-13 09:14:40 +01:00
|
|
|
|
2022-01-11 13:31:35 +01:00
|
|
|
CLOUDHV_X64_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/CloudHvBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
# this build is for cloud-hypervisor not qemu-kvm
|
|
|
|
Run.Flags: "QEMU_SKIP=TRUE"
|
|
|
|
Run: $(should_run)
|
|
|
|
|
2021-12-13 09:14:40 +01:00
|
|
|
MICROVM_X64_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/MicrovmBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
# no storage supported by microvm build
|
|
|
|
# can't boot to uefi shell -> skip test
|
|
|
|
Run.Flags: "QEMU_SKIP=TRUE"
|
|
|
|
Run: $(should_run)
|
2021-12-13 09:14:43 +01:00
|
|
|
|
|
|
|
OVMF_XEN_X64_DEBUG:
|
|
|
|
Build.File: "$(package)/PlatformCI/XenBuild.py"
|
|
|
|
Build.Arch: "X64"
|
|
|
|
Build.Flags: ""
|
|
|
|
Build.Target: "DEBUG"
|
|
|
|
# this build is for xen not qemu-kvm
|
|
|
|
Run.Flags: "QEMU_SKIP=TRUE"
|
|
|
|
Run: $(should_run)
|
2020-04-19 10:08:07 +02:00
|
|
|
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)
|
|
|
|
extra_install_step:
|
|
|
|
- bash: sudo apt-get install qemu
|
|
|
|
displayName: Install qemu
|
|
|
|
condition: and(gt(variables.pkg_count, 0), succeeded())
|