Add NuGet publishing and release flow
Enables a Mu Tiano Platforms release flow that does the following: 1. Automatically drafts release notes and applies semantic versioning to every change via the release drafter flow from mu_devops. 2. Automatically kicks off a release pipeline on any release publication in the repo. 3. The release pipeline does the following: - Gets the repo release version (the published version) from GitHub - Creates a Q35 and Q35 SBSA NuGet package with the release version and publishes it to the mu_tiano_platforms as a release package - Creates a zip file with the same contents as the NuGet package and publishes it as an attached artifact to the release on GitHub - Note that both the NuGet package and zip file contain the GCC and Visual Studio binary builds Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
Родитель
fbed7d0257
Коммит
c7f3f99f15
|
@ -0,0 +1,43 @@
|
|||
## @file
|
||||
# Azure Pipeline build file to perform a release in this repo.
|
||||
#
|
||||
# Note: This file should be invoked immediately after a release has been published
|
||||
# on GitHub.
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: mu_devops
|
||||
type: github
|
||||
endpoint: microsoft
|
||||
name: microsoft/mu_devops
|
||||
ref: refs/tags/v2.0.1
|
||||
|
||||
name: $(Date:yyyyMMdd)$(Rev:.r) Mu Tiano Platforms Release
|
||||
|
||||
stages:
|
||||
- stage: BuildQemuQ35
|
||||
displayName: Build QEMU Q35
|
||||
jobs:
|
||||
- template: ../Platforms/QemuQ35Pkg/.azurepipelines/templates/Job-Ubuntu-GCC5.yml
|
||||
- template: ../Platforms/QemuQ35Pkg/.azurepipelines/templates/Job-Windows-VS.yml
|
||||
|
||||
- stage: BuildQemuSbsa
|
||||
displayName: Build QEMU SBSA
|
||||
dependsOn: [] # Build in parallel with the previous stage
|
||||
jobs:
|
||||
- template: ../Platforms/QemuSbsaPkg/.azurepipelines/templates/Job-Ubuntu-GCC5.yml
|
||||
|
||||
- stage: PublishReleaseArtifacts
|
||||
displayName: Publish Release Artifacts
|
||||
dependsOn:
|
||||
- BuildQemuQ35
|
||||
- BuildQemuSbsa
|
||||
jobs:
|
||||
- template: templates/Job-Publish.yml
|
|
@ -37,4 +37,3 @@ jobs:
|
|||
tool_chain_tag: $(tool_chain_tag)
|
||||
vm_image: ubuntu-latest
|
||||
container_build: true
|
||||
|
||||
|
|
|
@ -0,0 +1,200 @@
|
|||
## @file
|
||||
# Azure Pipeline build file for publishing release artifacts.
|
||||
#
|
||||
# Note: This file assumes it is run immediately after the release it applies to has been
|
||||
# published (that release is the latest release).
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
parameters:
|
||||
- name: publish_q35_binaries
|
||||
displayName: Publish QEMU Q35 Binaries
|
||||
type: boolean
|
||||
default: true
|
||||
- name: publish_sbsa_binaries
|
||||
displayName: Publish QEMU SBSA Binaries
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
- job: Publish
|
||||
|
||||
variables:
|
||||
- name: raw_content_url
|
||||
value: https://raw.githubusercontent.com
|
||||
- name: org_repo
|
||||
value: microsoft/mu_tiano_platforms
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
${{ if eq(parameters.publish_q35_binaries, true) }}:
|
||||
QEMU Q35 Debug:
|
||||
gcc_artifact_name: 'Binaries QemuQ35Pkg GCC5 DEBUG'
|
||||
gcc_folder_name: GCC-x64
|
||||
nuget_package_config_file: >-
|
||||
Platforms/QemuQ35Pkg/NugetPublishing/DebugConfig.yaml
|
||||
vs_artifact_name: 'Binaries QemuQ35Pkg VS2022 DEBUG'
|
||||
vs_folder_name: VisualStudio-x64
|
||||
|
||||
QEMU Q35 Release:
|
||||
gcc_artifact_name: 'Binaries QemuQ35Pkg GCC5 RELEASE'
|
||||
gcc_folder_name: GCC-x64
|
||||
nuget_package_config_file: >-
|
||||
Platforms/QemuQ35Pkg/NugetPublishing/ReleaseConfig.yaml
|
||||
vs_artifact_name: 'Binaries QemuQ35Pkg VS2022 RELEASE'
|
||||
vs_folder_name: VisualStudio-x64
|
||||
|
||||
${{ if eq(parameters.publish_sbsa_binaries, true) }}:
|
||||
QEMU SBSA Debug:
|
||||
gcc_artifact_name: 'Binaries QemuSbsaPkg GCC5 DEBUG'
|
||||
gcc_folder_name: GCC-AARCH64
|
||||
nuget_package_config_file: >-
|
||||
Platforms/QemuSbsaPkg/NugetPublishing/DebugConfig.yaml
|
||||
vs_artifact_name: ''
|
||||
vs_folder_name: ''
|
||||
|
||||
QEMU SBSA Release:
|
||||
gcc_artifact_name: 'Binaries QemuSbsaPkg GCC5 RELEASE'
|
||||
gcc_folder_name: GCC-AARCH64
|
||||
nuget_package_config_file: >-
|
||||
Platforms/QemuSbsaPkg/NugetPublishing/ReleaseConfig.yaml
|
||||
vs_artifact_name: ''
|
||||
vs_folder_name: ''
|
||||
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Use Python 3.10.x
|
||||
inputs:
|
||||
versionSpec: 3.10.x
|
||||
architecture: x64
|
||||
|
||||
- script: python -m pip install edk2-pytool-extensions==0.*
|
||||
displayName: Install edk2-pytool-extensions
|
||||
|
||||
- script: |
|
||||
curl -s https://api.github.com/repos/${ORG_REPO}/releases/latest --output release_response.json
|
||||
rawRepoVer=$(cat release_response.json | jq -r '.name')
|
||||
id=$(cat release_response.json | jq -r '.id')
|
||||
prefixToRemove="v"
|
||||
repoVer=$(echo "${rawRepoVer/#$prefixToRemove}")
|
||||
echo "##vso[task.setvariable variable=raw_repo_version;]${rawRepoVer}"
|
||||
echo "##vso[task.setvariable variable=repo_version;]${repoVer}"
|
||||
echo "##vso[task.setvariable variable=repo_release_id;]${id}"
|
||||
displayName: Get Current Repo Release ID & Version
|
||||
|
||||
- script: |
|
||||
read type tagSha < <(echo $(curl -s "https://api.github.com/repos/${ORG_REPO}/git/ref/tags/$RAW_REPO_VERSION" | jq -r '.object.type,.object.sha'))
|
||||
if [ $type == "commit" ]; then
|
||||
echo "##vso[task.setvariable variable=repo_release_commit_sha;]${tagSha}"
|
||||
else
|
||||
finalTagSha=$(curl -s "https://api.github.com/repos/${ORG_REPO}/git/tags/$tagSha" | jq '.object.sha')
|
||||
echo "##vso[task.setvariable variable=repo_release_commit_sha;]${finalTagSha}"
|
||||
fi
|
||||
displayName: Get Current Release Commit Hash
|
||||
|
||||
- script: |
|
||||
licenseFileName="License.txt"
|
||||
licenseFileUrl="${RAW_CONTENT_URL}/${ORG_REPO}/${RAW_REPO_VERSION}/${licenseFileName}"
|
||||
curl $licenseFileUrl --output "${BUILD_ARTIFACTSTAGINGDIRECTORY}/${licenseFileName}"
|
||||
displayName: Download NuGet Package License File
|
||||
|
||||
- script: |
|
||||
configFileUrl="${RAW_CONTENT_URL}/${ORG_REPO}/${RAW_REPO_VERSION}/${NUGET_PACKAGE_CONFIG_FILE}"
|
||||
curl $configFileUrl --output "${BUILD_ARTIFACTSTAGINGDIRECTORY}/NugetConfigFile.txt"
|
||||
displayName: Download NuGet Package Config File
|
||||
|
||||
- script: |
|
||||
nugetPackageName=$(grep '^name:' "${BUILD_ARTIFACTSTAGINGDIRECTORY}/NugetConfigFile.txt" | cut -d: -f2 | xargs)
|
||||
echo "##vso[task.setvariable variable=nuget_package_name;]${nugetPackageName}"
|
||||
displayName: Get NuGet Package Name
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
name: DownloadGccArtifacts
|
||||
displayName: Download GCC Artifacts
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: $(gcc_artifact_name)
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/$(gcc_folder_name)'
|
||||
condition: and(ne(variables.gcc_artifact_name, ''), ne(variables.gcc_folder_name, ''))
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy GCC Binaries
|
||||
inputs:
|
||||
targetFolder: '$(Build.StagingDirectory)/Nuget/package_contents/$(gcc_folder_name)'
|
||||
sourceFolder: '$(Build.ArtifactStagingDirectory)/$(gcc_folder_name)'
|
||||
contents: '**'
|
||||
flattenFolders: true
|
||||
condition: and(ne(variables.gcc_artifact_name, ''), ne(variables.gcc_folder_name, ''))
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
name: DownloadVisualStudioArtifacts
|
||||
displayName: Download Visual Studio Artifacts
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: $(vs_artifact_name)
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/$(vs_folder_name)'
|
||||
condition: and(ne(variables.vs_artifact_name, ''), ne(variables.vs_folder_name, ''))
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Visual Studio Binaries
|
||||
inputs:
|
||||
targetFolder: '$(Build.StagingDirectory)/Nuget/package_contents/$(vs_folder_name)'
|
||||
sourceFolder: '$(Build.ArtifactStagingDirectory)/$(vs_folder_name)'
|
||||
contents: '**'
|
||||
flattenFolders: true
|
||||
condition: and(ne(variables.vs_artifact_name, ''), ne(variables.vs_folder_name, ''))
|
||||
|
||||
- task: Bash@3
|
||||
name: PackAndPublishNugetPackage
|
||||
displayName: Pack and Push Nuget Package
|
||||
env:
|
||||
LICENSE_FILE_PATH: $(Build.ArtifactStagingDirectory)/License.txt
|
||||
NUGET_KEY: $(NUGET_KEY)
|
||||
NUGET_PACKAGE_CONFIG_FILE_PATH: $(Build.ArtifactStagingDirectory)/NugetConfigFile.txt
|
||||
NUGET_PACKAGE_VERSION: $(repo_version)
|
||||
RELEASE_COMMIT_SHA: $(repo_release_commit_sha)
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
apiKey=$NUGET_KEY
|
||||
configFilePath=$NUGET_PACKAGE_CONFIG_FILE_PATH
|
||||
customLicensePath=$LICENSE_FILE_PATH
|
||||
inputFolderPath="${BUILD_STAGINGDIRECTORY}/Nuget/package_contents"
|
||||
outputLogPath="${BUILD_STAGINGDIRECTORY}/Nuget/NugetPackagingLog.txt"
|
||||
packageVersion=$NUGET_PACKAGE_VERSION
|
||||
releaseCommitSha=$RELEASE_COMMIT_SHA
|
||||
nuget-publish --Operation PackAndPush --OutputLog "$outputLogPath" --ConfigFilePath "$configFilePath" --InputFolderPath "$inputFolderPath" --Version "$packageVersion" --ApiKey "$apiKey" --CustomLicensePath "$customLicensePath" --RepositoryCommit "$releaseCommitSha"
|
||||
|
||||
- task: Bash@3
|
||||
name: ZipAndPublishReleaseAsset
|
||||
displayName: Add Zip File Release Asset
|
||||
env:
|
||||
GH_TOKEN: $(NUGET_KEY)
|
||||
INPUT_FOLDER_PATH: "$(Build.StagingDirectory)/Nuget/package_contents"
|
||||
NUGET_PACKAGE_NAME: $(nuget_package_name)
|
||||
NUGET_PACKAGE_VERSION: $(repo_version)
|
||||
REPO_RELEASE_ID: $(repo_release_id)
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
inputFolderPath="${BUILD_STAGINGDIRECTORY}/Nuget/package_contents"
|
||||
zipFolderPath="${BUILD_STAGINGDIRECTORY}/Nuget/$NUGET_PACKAGE_NAME-$NUGET_PACKAGE_VERSION.zip"
|
||||
(cd "${inputFolderPath}" && zip -r "${zipFolderPath}" .)
|
||||
curl \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer $GH_TOKEN"\
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
"https://uploads.github.com/repos/${ORG_REPO}/releases/${REPO_RELEASE_ID}/assets?name=${NUGET_PACKAGE_NAME}-${NUGET_PACKAGE_VERSION}.zip" \
|
||||
--data-binary "@${zipFolderPath}"
|
|
@ -0,0 +1,25 @@
|
|||
# This workflow performs release work for this repo after a
|
||||
# release is published on GitHub.
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
|
||||
name: Create Repo Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
nuget_release:
|
||||
name: Publish via Azure Pipeline
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Azure Pipeline Publication
|
||||
uses: Azure/pipelines@v1
|
||||
with:
|
||||
azure-devops-project-url: https://dev.azure.com/projectmu/mu
|
||||
azure-pipeline-name: 'Mu Tiano Platforms Release'
|
||||
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}
|
|
@ -17,66 +17,5 @@ resources:
|
|||
name: microsoft/mu_devops
|
||||
ref: main
|
||||
|
||||
variables:
|
||||
- group: architectures-x86-64
|
||||
- group: tool-chain-ubuntu-gcc
|
||||
|
||||
jobs:
|
||||
- job: Platform_CI
|
||||
variables:
|
||||
package: 'QemuQ35Pkg'
|
||||
should_run: true
|
||||
run_flags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE"
|
||||
|
||||
# Use matrix to speed up the build process
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
QemuQ35_DEBUG:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "DEBUG"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
QemuQ35_RELEASE:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "RELEASE"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
# NOOPT build too big to fit in FVs
|
||||
#QemuQ35_NOOPT:
|
||||
# Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
# Build.Arch: $(arch_list)
|
||||
# Build.Flags: ""
|
||||
# Build.Target: "NOOPT"
|
||||
# Run.Flags: $(run_flags)
|
||||
# Run: $(should_run)
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: $(vm_image)
|
||||
|
||||
container: ghcr.io/tianocore/containers/fedora-35-test:5b8a008
|
||||
|
||||
steps:
|
||||
- script: echo "##vso[task.prependpath]/home/vsts_azpcontainer/.local/bin"
|
||||
displayName: Add User Local Bin to Path
|
||||
- template: Steps/BuildPlatform.yml@mu_devops
|
||||
parameters:
|
||||
tool_chain_tag: $(tool_chain_tag)
|
||||
build_pkg: $(package)
|
||||
build_target: $(Build.Target)
|
||||
build_arch: $(Build.Arch)
|
||||
build_file: $(Build.File)
|
||||
build_flags: $(Build.Flags)
|
||||
run_flags: $(Run.Flags)
|
||||
install_tools: false
|
||||
artifacts_identifier: '$(package) $(Build.Target)'
|
||||
artifacts_binary: |
|
||||
**/QEMUQ35_*.fd
|
||||
- template: templates/Job-Ubuntu-GCC5.yml
|
||||
|
|
|
@ -17,67 +17,5 @@ resources:
|
|||
name: microsoft/mu_devops
|
||||
ref: main
|
||||
|
||||
variables:
|
||||
- group: architectures-x86-64
|
||||
- group: tool-chain-windows-visual-studio-latest
|
||||
|
||||
jobs:
|
||||
- job: Platform_CI
|
||||
variables:
|
||||
package: 'QemuQ35Pkg'
|
||||
should_run: true
|
||||
run_flags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE"
|
||||
|
||||
#Use matrix to speed up the build process
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
QemuQ35_DEBUG:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "DEBUG"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
QemuQ35_RELEASE:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "RELEASE"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
# NOOPT build too big to fit in FV.
|
||||
#QemuQ35_NOOPT:
|
||||
# Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
# Build.Arch: $(arch_list)
|
||||
# Build.Flags: ""
|
||||
# Build.Target: "NOOPT"
|
||||
# Run.Flags: $(run_flags)
|
||||
# Run: $(should_run)
|
||||
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: $(vm_image)
|
||||
|
||||
steps:
|
||||
- template: Steps/BuildPlatform.yml@mu_devops
|
||||
parameters:
|
||||
tool_chain_tag: $(tool_chain_tag)
|
||||
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=2022.8.31; 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())
|
||||
artifacts_identifier: '$(package) $(Build.Target)'
|
||||
artifacts_binary: |
|
||||
**/QEMUQ35_*.fd
|
||||
|
||||
- template: templates/Job-Windows-VS.yml
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
## @file
|
||||
# Azure Pipeline build file for building a platform.
|
||||
#
|
||||
# Platform: QemuQ35
|
||||
# OS: Ubuntu
|
||||
# Toolchain: GCC
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
jobs:
|
||||
- job: Q35_GCC
|
||||
displayName: QemuQ35Pkg GCC
|
||||
|
||||
variables:
|
||||
- group: architectures-x86-64
|
||||
- group: tool-chain-ubuntu-gcc
|
||||
- name: package
|
||||
value: QemuQ35Pkg
|
||||
- name: should_run
|
||||
value: true
|
||||
- name: run_flags
|
||||
value: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE"
|
||||
|
||||
# Use matrix to speed up the build process
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
QemuQ35_DEBUG:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "DEBUG"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
QemuQ35_RELEASE:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "RELEASE"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
# NOOPT build too big to fit in FVs
|
||||
#QemuQ35_NOOPT:
|
||||
# Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
# Build.Arch: $(arch_list)
|
||||
# Build.Flags: ""
|
||||
# Build.Target: "NOOPT"
|
||||
# Run.Flags: $(run_flags)
|
||||
# Run: $(should_run)
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: $(vm_image)
|
||||
|
||||
container: ghcr.io/tianocore/containers/fedora-35-test:5b8a008
|
||||
|
||||
steps:
|
||||
- script: echo "##vso[task.prependpath]/home/vsts_azpcontainer/.local/bin"
|
||||
displayName: Add User Local Bin to Path
|
||||
- template: Steps/BuildPlatform.yml@mu_devops
|
||||
parameters:
|
||||
tool_chain_tag: $(tool_chain_tag)
|
||||
build_pkg: $(package)
|
||||
build_target: $(Build.Target)
|
||||
build_arch: $(Build.Arch)
|
||||
build_file: $(Build.File)
|
||||
build_flags: $(Build.Flags)
|
||||
run_flags: $(Run.Flags)
|
||||
install_tools: false
|
||||
artifacts_identifier: '$(package) $(tool_chain_tag) $(Build.Target)'
|
||||
artifacts_binary: |
|
||||
**/QEMUQ35_*.fd
|
|
@ -0,0 +1,77 @@
|
|||
## @file
|
||||
# Azure Pipeline build file for building a platform.
|
||||
#
|
||||
# Platform: QemuQ35
|
||||
# OS: Windows
|
||||
# Toolchain: Visual Studio
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
jobs:
|
||||
- job: Q35_VS
|
||||
displayName: QemuQ35Pkg VS
|
||||
|
||||
variables:
|
||||
- group: architectures-x86-64
|
||||
- group: tool-chain-windows-visual-studio-latest
|
||||
- name: package
|
||||
value: QemuQ35Pkg
|
||||
- name: should_run
|
||||
value: true
|
||||
- name: run_flags
|
||||
value: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE"
|
||||
|
||||
#Use matrix to speed up the build process
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
QemuQ35_DEBUG:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "DEBUG"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
QemuQ35_RELEASE:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "RELEASE"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
# NOOPT build too big to fit in FV.
|
||||
#QemuQ35_NOOPT:
|
||||
# Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
# Build.Arch: $(arch_list)
|
||||
# Build.Flags: ""
|
||||
# Build.Target: "NOOPT"
|
||||
# Run.Flags: $(run_flags)
|
||||
# Run: $(should_run)
|
||||
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: $(vm_image)
|
||||
|
||||
steps:
|
||||
- template: Steps/BuildPlatform.yml@mu_devops
|
||||
parameters:
|
||||
tool_chain_tag: $(tool_chain_tag)
|
||||
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=2022.8.31; 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())
|
||||
artifacts_identifier: '$(package) $(tool_chain_tag) $(Build.Target)'
|
||||
artifacts_binary: |
|
||||
**/QEMUQ35_*.fd
|
|
@ -0,0 +1,9 @@
|
|||
author_string: Microsoft Core UEFI
|
||||
copyright_string: Copyright (c) Microsoft Corporation.
|
||||
description_string: QEMU Q35 DEBUG Platform Firmware
|
||||
name: Mu.QemuQ35.FW.DEBUG
|
||||
project_url: https://microsoft.github.io/mu/
|
||||
repository_type: git
|
||||
repository_url: https://github.com/microsoft/mu_tiano_platforms
|
||||
server_url: https://nuget.pkg.github.com/microsoft/index.json
|
||||
tags_string: ''
|
|
@ -0,0 +1,9 @@
|
|||
author_string: Microsoft Core UEFI
|
||||
copyright_string: Copyright (c) Microsoft Corporation.
|
||||
description_string: QEMU Q35 RELEASE Platform Firmware
|
||||
name: Mu.QemuQ35.FW.RELEASE
|
||||
project_url: https://microsoft.github.io/mu/
|
||||
repository_type: git
|
||||
repository_url: https://github.com/microsoft/mu_tiano_platforms
|
||||
server_url: https://nuget.pkg.github.com/microsoft/index.json
|
||||
tags_string: ''
|
|
@ -1,7 +1,7 @@
|
|||
## @file
|
||||
# Azure Pipeline build file for building a platform.
|
||||
#
|
||||
# Platform: QemuQ35
|
||||
# Platform: Qemu SBSA
|
||||
# OS: Ubuntu
|
||||
# Toolchain: GCC
|
||||
#
|
||||
|
@ -17,71 +17,5 @@ resources:
|
|||
name: microsoft/mu_devops
|
||||
ref: main
|
||||
|
||||
variables:
|
||||
- group: architectures-arm64
|
||||
- group: tool-chain-ubuntu-gcc
|
||||
|
||||
jobs:
|
||||
- job: Platform_CI
|
||||
variables:
|
||||
package: 'QemuSbsaPkg'
|
||||
should_run: true
|
||||
run_flags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE"
|
||||
|
||||
# Use matrix to speed up the build process
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
QemuSbsa_DEBUG:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "DEBUG"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
QemuSbsa_RELEASE:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "RELEASE"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
# NOOPT build too big to fit in FVs
|
||||
#QemuSbsa_NOOPT:
|
||||
# Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
# Build.Arch: $(arch_list)
|
||||
# Build.Flags: ""
|
||||
# Build.Target: "NOOPT"
|
||||
# Run.Flags: $(run_flags)
|
||||
# Run: $(should_run)
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: $(vm_image)
|
||||
|
||||
container: ghcr.io/tianocore/containers/fedora-35-test:5b8a008
|
||||
|
||||
steps:
|
||||
- script: echo "##vso[task.prependpath]/home/vsts_azpcontainer/.local/bin"
|
||||
displayName: Add User Local Bin to Path
|
||||
- template: Steps/BuildPlatform.yml@mu_devops
|
||||
parameters:
|
||||
tool_chain_tag: $(tool_chain_tag)
|
||||
build_pkg: $(package)
|
||||
build_target: $(Build.Target)
|
||||
build_arch: $(Build.Arch)
|
||||
build_file: $(Build.File)
|
||||
build_flags: $(Build.Flags)
|
||||
run_flags: $(Run.Flags)
|
||||
install_tools: false
|
||||
extra_install_step:
|
||||
- script: sudo dnf --assumeyes install openssl-devel
|
||||
displayName: Install openssl
|
||||
condition: and(gt(variables.pkg_count, 0), succeeded())
|
||||
artifacts_identifier: '$(package) $(Build.Target)'
|
||||
artifacts_binary: |
|
||||
**/QEMU_EFI.fd
|
||||
**/SECURE_FLASH0.fd
|
||||
- template: templates/Job-Ubuntu-GCC5.yml
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
## @file
|
||||
# Azure Pipeline build file for building a platform.
|
||||
#
|
||||
# Platform: Qemu SBSA
|
||||
# OS: Ubuntu
|
||||
# Toolchain: GCC
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
jobs:
|
||||
- job: SBSA_GCC
|
||||
displayName: QemuSbsaPkg GCC
|
||||
|
||||
variables:
|
||||
- group: architectures-arm64
|
||||
- group: tool-chain-ubuntu-gcc
|
||||
- name: package
|
||||
value: QemuSbsaPkg
|
||||
- name: should_run
|
||||
value: true
|
||||
- name: run_flags
|
||||
value: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE"
|
||||
|
||||
# Use matrix to speed up the build process
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
QemuSbsa_DEBUG:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "DEBUG"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
QemuSbsa_RELEASE:
|
||||
Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
Build.Arch: $(arch_list)
|
||||
Build.Flags: ""
|
||||
Build.Target: "RELEASE"
|
||||
Run.Flags: $(run_flags)
|
||||
Run: $(should_run)
|
||||
|
||||
# NOOPT build too big to fit in FVs
|
||||
#QemuSbsa_NOOPT:
|
||||
# Build.File: "Platforms/$(package)/PlatformBuild.py"
|
||||
# Build.Arch: $(arch_list)
|
||||
# Build.Flags: ""
|
||||
# Build.Target: "NOOPT"
|
||||
# Run.Flags: $(run_flags)
|
||||
# Run: $(should_run)
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
pool:
|
||||
vmImage: $(vm_image)
|
||||
|
||||
container: ghcr.io/tianocore/containers/fedora-35-test:5b8a008
|
||||
|
||||
steps:
|
||||
- script: echo "##vso[task.prependpath]/home/vsts_azpcontainer/.local/bin"
|
||||
displayName: Add User Local Bin to Path
|
||||
- template: Steps/BuildPlatform.yml@mu_devops
|
||||
parameters:
|
||||
tool_chain_tag: $(tool_chain_tag)
|
||||
build_pkg: $(package)
|
||||
build_target: $(Build.Target)
|
||||
build_arch: $(Build.Arch)
|
||||
build_file: $(Build.File)
|
||||
build_flags: $(Build.Flags)
|
||||
run_flags: $(Run.Flags)
|
||||
install_tools: false
|
||||
extra_install_step:
|
||||
- script: sudo dnf --assumeyes install openssl-devel
|
||||
displayName: Install openssl
|
||||
condition: and(gt(variables.pkg_count, 0), succeeded())
|
||||
artifacts_identifier: '$(package) $(tool_chain_tag) $(Build.Target)'
|
||||
artifacts_binary: |
|
||||
**/QEMU_EFI.fd
|
||||
**/SECURE_FLASH0.fd
|
|
@ -0,0 +1,9 @@
|
|||
author_string: Microsoft Core UEFI
|
||||
copyright_string: Copyright (c) Microsoft Corporation.
|
||||
description_string: QEMU SBSA DEBUG Platform Firmware
|
||||
name: Mu.QemuSbsa.FW.DEBUG
|
||||
project_url: https://microsoft.github.io/mu/
|
||||
repository_type: git
|
||||
repository_url: https://github.com/microsoft/mu_tiano_platforms
|
||||
server_url: https://nuget.pkg.github.com/microsoft/index.json
|
||||
tags_string: ''
|
|
@ -0,0 +1,9 @@
|
|||
author_string: Microsoft Core UEFI
|
||||
copyright_string: Copyright (c) Microsoft Corporation.
|
||||
description_string: QEMU SBSA RELEASE Platform Firmware
|
||||
name: Mu.QemuSbsa.FW.RELEASE
|
||||
project_url: https://microsoft.github.io/mu/
|
||||
repository_type: git
|
||||
repository_url: https://github.com/microsoft/mu_tiano_platforms
|
||||
server_url: https://nuget.pkg.github.com/microsoft/index.json
|
||||
tags_string: ''
|
Загрузка…
Ссылка в новой задаче