-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AzurePipeline: Add build test to basetools CI #29
base: newmaster
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
## @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 | ||
- newmaster | ||
pr: | ||
- master | ||
- newmaster | ||
|
||
resources: | ||
repositories: | ||
- repository: edk2 | ||
type: github | ||
endpoint: BobCF | ||
name: BobCF/edk2 | ||
|
||
jobs: | ||
- job: Platform_CI | ||
variables: | ||
package: 'OvmfPkg' | ||
vm_image: 'ubuntu-18.04' | ||
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: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32" | ||
Build.Flags: "" | ||
Build.Target: "DEBUG" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32_RELEASE: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32" | ||
Build.Flags: "" | ||
Build.Target: "RELEASE" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32_NOOPT: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32" | ||
Build.Flags: "" | ||
Build.Target: "NOOPT" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
|
||
OVMF_X64_DEBUG: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "X64" | ||
Build.Flags: "" | ||
Build.Target: "DEBUG" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_X64_RELEASE: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "X64" | ||
Build.Flags: "" | ||
Build.Target: "RELEASE" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_X64_NOOPT: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "X64" | ||
Build.Flags: "" | ||
Build.Target: "NOOPT" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
|
||
OVMF_IA32X64_DEBUG: | ||
Build.File: "edk2/$(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: "edk2/$(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: "edk2/$(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: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32,X64" | ||
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" | ||
Build.Target: "DEBUG" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32X64_FULL_RELEASE: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32,X64" | ||
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" | ||
Build.Target: "RELEASE" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32X64_FULL_NOOPT: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32,X64" | ||
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" | ||
Build.Target: "NOOPT" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
workspace: | ||
clean: all | ||
|
||
pool: | ||
vmImage: $(vm_image) | ||
|
||
steps: | ||
- template: templates/platform-build-run-steps.yml | ||
parameters: | ||
tool_chain_tag: GCC5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be "GCC" now, since the "GCC5" toolchain is deprecated. |
||
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()) | ||
- bash: sudo apt-get install mtools | ||
displayName: 'Install mtools' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
## @file | ||
# Azure Pipeline build file for building a platform. | ||
# | ||
# Platform: OVMF | ||
# OS: Windows | ||
# Toolchain: VS2019 | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
trigger: | ||
- master | ||
- newmaster | ||
pr: | ||
- master | ||
- newmaster | ||
|
||
resources: | ||
repositories: | ||
- repository: edk2 | ||
type: github | ||
endpoint: BobCF | ||
name: BobCF/edk2 | ||
|
||
jobs: | ||
- job: Platform_CI | ||
variables: | ||
package: 'OvmfPkg' | ||
vm_image: 'windows-latest' | ||
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: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32" | ||
Build.Flags: "" | ||
Build.Target: "DEBUG" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32_RELEASE: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32" | ||
Build.Flags: "" | ||
Build.Target: "RELEASE" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32_NOOPT: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32" | ||
Build.Flags: "" | ||
Build.Target: "NOOPT" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
|
||
OVMF_X64_DEBUG: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "X64" | ||
Build.Flags: "" | ||
Build.Target: "DEBUG" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_X64_RELEASE: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "X64" | ||
Build.Flags: "" | ||
Build.Target: "RELEASE" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_X64_NOOPT: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "X64" | ||
Build.Flags: "" | ||
Build.Target: "NOOPT" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
|
||
OVMF_IA32X64_DEBUG: | ||
Build.File: "edk2/$(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: "edk2/$(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: "edk2/$(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: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32,X64" | ||
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" | ||
Build.Target: "DEBUG" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
OVMF_IA32X64_FULL_RELEASE: | ||
Build.File: "edk2/$(package)/PlatformCI/PlatformBuild.py" | ||
Build.Arch: "IA32,X64" | ||
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" | ||
Build.Target: "RELEASE" | ||
Run.Flags: $(run_flags) | ||
Run: $(should_run) | ||
|
||
# This currently creates a very large image which is too big for the FDF declared range | ||
# Ovmf maintainers suggest to skip this build for now. | ||
# | ||
# OVMF_IA32X64_FULL_NOOPT: | ||
# Build.File: "$(package)/PlatformCI/PlatformBuild.py" | ||
# Build.Arch: "IA32,X64" | ||
# 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" | ||
# Build.Target: "NOOPT" | ||
# Run.Flags: $(run_flags) | ||
# Run: $(should_run) | ||
|
||
workspace: | ||
clean: all | ||
|
||
pool: | ||
vmImage: $(vm_image) | ||
|
||
steps: | ||
- template: 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) | ||
extra_install_step: | ||
- powershell: choco install qemu --version=2021.5.5; Write-Host "##vso[task.prependpath]c:\Program Files\qemu" | ||
displayName: Install QEMU and Set QEMU on path # friendly name displayed in the UI | ||
condition: and(gt(variables.pkg_count, 0), succeeded()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## @file | ||
# Azure Pipeline build file for a build using ubuntu and GCC5 | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
trigger: | ||
- master | ||
- newmaster | ||
pr: | ||
- master | ||
- newmaster | ||
|
||
resources: | ||
repositories: | ||
- repository: edk2 | ||
type: github | ||
endpoint: BobCF | ||
name: BobCF/edk2 | ||
|
||
jobs: | ||
- template: templates/pr-gate-build-job.yml | ||
parameters: | ||
tool_chain_tag: 'GCC5' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, this should be "GCC". |
||
vm_image: 'ubuntu-latest' | ||
arch_list: "IA32,X64,ARM,AARCH64,RISCV64" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want loonsong too? |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## @file | ||
# Azure Pipeline build file for a build using Windows and VS2019 | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
trigger: | ||
- master | ||
- newmaster | ||
|
||
pr: | ||
- master | ||
- newmaster | ||
|
||
resources: | ||
repositories: | ||
- repository: edk2 | ||
type: github | ||
endpoint: BobCF | ||
name: BobCF/edk2 | ||
|
||
jobs: | ||
- template: templates/pr-gate-build-job.yml | ||
parameters: | ||
tool_chain_tag: 'VS2019' | ||
vm_image: 'windows-latest' | ||
arch_list: "IA32,X64" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## @file | ||
# File templates/basetools-build-job.yml | ||
# | ||
# template file to build basetools | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
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: | ||
filename: python | ||
arguments: edk2/BaseTools/Edk2ToolsBuild.py -t ${{ parameters.tool_chain_tag }} | ||
condition: and(gt(variables.pkg_count, 0), succeeded()) | ||
|
||
- task: CopyFiles@2 | ||
displayName: "Copy base tools build log" | ||
inputs: | ||
targetFolder: '$(Build.ArtifactStagingDirectory)' | ||
SourceFolder: 'edk2/BaseTools/BaseToolsBuild' | ||
contents: | | ||
BASETOOLS_BUILD*.* | ||
flattenFolders: true | ||
condition: and(gt(variables.pkg_count, 0), succeededOrFailed()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ubuntu 18.04 is really old now. Could we use something newer like 22.04 or 24.04?