From 8526da8b459d13c99f64fe30996ec34a1b2d3ec4 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Mon, 15 May 2023 17:10:08 -0700 Subject: [PATCH 1/7] fixing up the job? fixing the pipeline files? Fixing the arm builds Fixing builds? fixing stages Change depends? Fixing a dependency? Does this work? fixing another round? do not do ci setup for this repo misspell? Adding conditions using new model? Fixing the builds? do not do ci for windows, do not run containers for linux Now we have more parameters reset the parameters to the origianl matrix job well. still use container for gcc specify the arch list --- .azurepipelines/Matrix-Build-Job.yml | 104 --------------------------- .azurepipelines/MuDevOpsSync.yml | 87 ++++++++++++++++++++++ .azurepipelines/Ubuntu-GCC5.yml | 102 ++++++++++++++++++++------ .azurepipelines/Windows-VS.yml | 93 ++++++++++++++++++++---- UnitTestFrameworkPkg/ReadMe.md | 2 +- 5 files changed, 247 insertions(+), 141 deletions(-) delete mode 100644 .azurepipelines/Matrix-Build-Job.yml create mode 100644 .azurepipelines/MuDevOpsSync.yml diff --git a/.azurepipelines/Matrix-Build-Job.yml b/.azurepipelines/Matrix-Build-Job.yml deleted file mode 100644 index b328eca145..0000000000 --- a/.azurepipelines/Matrix-Build-Job.yml +++ /dev/null @@ -1,104 +0,0 @@ -## @file -# Template file for generating a build job matrix for the packages currently supported for -# build in Mu Basecore. -# -# Copyright (c) Microsoft Corporation. -# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -parameters: -- name: arch_list - displayName: Architectures (e.g. IA32, X64) - type: string - default: '' -- name: extra_build_args - displayName: Extra Build Command Arguments - type: string - default: '' -- name: extra_install_step - displayName: Extra Install Steps - type: stepList - default: - - script: echo No extra steps provided -- name: tool_chain_tag - displayName: Tool Chain (e.g. VS2022) - type: string - default: '' -- name: vm_image - displayName: Virtual Machine Image (e.g. windows-latest) - type: string - default: 'windows-latest' -- name: container_image - displayName: Container Image - type: string - default: '' - -jobs: - -- job: Build - timeoutInMinutes: 120 - # Use matrix to speed up the build process - strategy: - matrix: - TARGET_MDE_CPU: - Build.Pkgs: 'MdePkg,UefiCpuPkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_MDEMODULE_DEBUG: - Build.Pkgs: 'MdeModulePkg' - Build.Targets: 'DEBUG,NOOPT' - TARGET_MDEMODULE_RELEASE: - Build.Pkgs: 'MdeModulePkg' - Build.Targets: 'RELEASE,NO-TARGET' - TARGET_NETWORK: - Build.Pkgs: 'NetworkPkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_OTHER: - Build.Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_TEST_POLICY: - Build.Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_CRYPTO: - Build.Pkgs: 'CryptoPkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - - workspace: - clean: all - - ${{ if ne(parameters.container_image, '') }}: - container: ${{ parameters.container_image }} - - pool: - vmImage: ${{ parameters.vm_image }} - - steps: - - ${{ if and(ne(parameters.container_image, ''), not(contains(parameters.vm_image, 'windows'))) }}: - - script: echo "##vso[task.prependpath]/home/vsts_azpcontainer/.local/bin" - displayName: Add User Local Bin to Path - - template: Steps/PrGate.yml@mu_devops - parameters: - artifacts_identifier: '$(Build.Pkgs) $(Build.Targets)' - build_archs: ${{ parameters.arch_list }} - build_pkgs: $(Build.Pkgs) - build_targets: $(Build.Targets) - do_ci_build: true - do_ci_setup: false - do_non_ci_build: false - do_non_ci_setup: true - do_pr_eval: true - extra_build_args: ${{ parameters.extra_build_args }} - extra_install_step: ${{ parameters.extra_install_step }} - tool_chain_tag: ${{ parameters.tool_chain_tag }} - install_tools: ${{ eq(parameters.container_image, '') }} - -- job: PublishCoverage - dependsOn: Build - workspace: - clean: all - - pool: - vmImage: 'windows-latest' - - steps: - - template: Steps/PublishCodeCoverage.yml@mu_devops diff --git a/.azurepipelines/MuDevOpsSync.yml b/.azurepipelines/MuDevOpsSync.yml new file mode 100644 index 0000000000..9f2c90a960 --- /dev/null +++ b/.azurepipelines/MuDevOpsSync.yml @@ -0,0 +1,87 @@ +## @file +# Azure Pipeline build file for a build using Windows and Visual Studio. +# +# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there +# instead of the file in this repo. +# +# - Mu DevOps Repo: https://github.com/microsoft/mu_devops +# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +resources: + repositories: + - repository: mu_devops + type: github + endpoint: microsoft + name: kuqin12/mu_devops + ref: test_arm64 + +parameters: +- name: do_ci_build + displayName: Perform Stuart CI Build + type: boolean + default: true +- name: do_ci_setup + displayName: Perform Stuart CI Setup + type: boolean + default: true +- name: do_non_ci_build + displayName: Perform non-CI Stuart Build + type: boolean + default: false +- name: do_non_ci_setup + displayName: Perform non-CI Stuart Setup + type: boolean + default: false +- name: do_pr_eval + displayName: Perform Stuart PR Evaluation + type: boolean + default: true +- name: container_build + displayName: Flag for whether this repo should do stuart_setup + type: boolean + default: false +- name: os_type + displayName: OS type on the self-hosted agent pools + type: string + values: + - Windows_NT + - Linux + default: Windows_NT +- name: build_matrix + displayName: Build matrix for this repository + type: object +- name: pool_name + displayName: Variable name that hosts pool name to be used for self-hosted agents + type: string + default: pool_name +- name: extra_install_step + displayName: Extra Install Steps + type: stepList + default: + - script: echo No extra steps provided +- name: extra_jobs + displayName: Extra Jobs to be run after build + type: jobList + default: [] + +jobs: +- template: Jobs/PrGate.yml@mu_devops + parameters: + do_ci_build: ${{ parameters.do_ci_build }} + do_ci_setup: ${{ parameters.do_ci_setup }} + do_pr_eval: ${{ parameters.do_pr_eval }} + do_non_ci_setup: ${{ parameters.do_non_ci_setup }} + do_non_ci_build: ${{ parameters.do_non_ci_build }} + build_matrix: ${{ parameters.build_matrix }} + os_type: ${{ parameters.os_type }} + pool_name: ${{ parameters.pool_name }} + tool_chain_tag: $(tool_chain_tag) + vm_image: $(vm_image) + container_build: ${{ parameters.container_build }} + linux_container_image: ghcr.io/tianocore/containers/fedora-37-build:3b3eb8f + +- ${{ parameters.extra_jobs }} diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml index 7042cf939e..3f5ffd9943 100644 --- a/.azurepipelines/Ubuntu-GCC5.yml +++ b/.azurepipelines/Ubuntu-GCC5.yml @@ -14,30 +14,88 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent ## -resources: - repositories: - - repository: mu_devops - type: github - endpoint: microsoft - name: microsoft/mu_devops - ref: refs/tags/v2.5.1 - containers: - - container: linux-gcc - image: ghcr.io/tianocore/containers/fedora-37-build:3b3eb8f - variables: - group: architectures-arm-64-x86-64 - group: tool-chain-ubuntu-gcc -jobs: -- template: Matrix-Build-Job.yml +extends: + template: MuDevOpsSync.yml parameters: - arch_list: $(arch_list) - extra_build_args: CODE_COVERAGE=TRUE - extra_install_step: - - script: | - sudo dnf install --assumeyes mingw64-gcc - displayName: Install Windows Resource Compiler for Linux - tool_chain_tag: 'GCC5' - vm_image: $(vm_image) - container_image: linux-gcc + do_ci_build: true + do_ci_setup: false + do_non_ci_build: false + do_non_ci_setup: true + do_pr_eval: true + container_build: true + os_type: Linux + build_matrix: + TARGET_MDE_CPU: + Pkgs: 'MdePkg,UefiCpuPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_MDEMODULE_DEBUG: + Pkgs: 'MdeModulePkg' + Targets: 'DEBUG,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_MDEMODULE_RELEASE: + Pkgs: 'MdeModulePkg' + Targets: 'RELEASE,NO-TARGET' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_NETWORK: + Pkgs: 'NetworkPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_OTHER: + Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_TEST_POLICY: + Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_CRYPTO: + Pkgs: 'CryptoPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_MDE_CPU_ARM: + Pkgs: 'MdePkg,UefiCpuPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_MDEMODULE_DEBUG_ARM: + Pkgs: 'MdeModulePkg' + Targets: 'DEBUG,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_MDEMODULE_RELEASE_ARM: + Pkgs: 'MdeModulePkg' + Targets: 'RELEASE,NO-TARGET' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_NETWORK_ARM: + Pkgs: 'NetworkPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_OTHER_ARM: + Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_TEST_POLICY_ARM: + Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_CRYPTO_ARM: + Pkgs: 'CryptoPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true diff --git a/.azurepipelines/Windows-VS.yml b/.azurepipelines/Windows-VS.yml index 5998a93a27..97034d3de9 100644 --- a/.azurepipelines/Windows-VS.yml +++ b/.azurepipelines/Windows-VS.yml @@ -14,22 +14,87 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent ## -resources: - repositories: - - repository: mu_devops - type: github - endpoint: microsoft - name: microsoft/mu_devops - ref: refs/tags/v2.5.1 - variables: - group: architectures-x86-64 - group: tool-chain-windows-visual-studio-latest -jobs: -- template: Matrix-Build-Job.yml +extends: + template: MuDevOpsSync.yml parameters: - arch_list: $(arch_list) - extra_build_args: CODE_COVERAGE=TRUE - tool_chain_tag: $(tool_chain_tag) - vm_image: $(vm_image) + do_ci_build: true + do_ci_setup: false + do_non_ci_build: false + do_non_ci_setup: true + do_pr_eval: true + os_type: Windows_NT + build_matrix: + TARGET_MDE_CPU: + Pkgs: 'MdePkg,UefiCpuPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_MDEMODULE_DEBUG: + Pkgs: 'MdeModulePkg' + Targets: 'DEBUG,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_MDEMODULE_RELEASE: + Pkgs: 'MdeModulePkg' + Targets: 'RELEASE,NO-TARGET' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_NETWORK: + Pkgs: 'NetworkPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_OTHER: + Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_TEST_POLICY: + Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_CRYPTO: + Pkgs: 'CryptoPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: false + TARGET_MDE_CPU_ARM: + Pkgs: 'MdePkg,UefiCpuPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_MDEMODULE_DEBUG_ARM: + Pkgs: 'MdeModulePkg' + Targets: 'DEBUG,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_MDEMODULE_RELEASE_ARM: + Pkgs: 'MdeModulePkg' + Targets: 'RELEASE,NO-TARGET' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_NETWORK_ARM: + Pkgs: 'NetworkPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_OTHER_ARM: + Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_TEST_POLICY_ARM: + Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true + TARGET_CRYPTO_ARM: + Pkgs: 'CryptoPkg' + Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' + ArchList: $(arch_list) + SelfHostAgent: true diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md index 5fdd362cb7..afa67c5cd1 100644 --- a/UnitTestFrameworkPkg/ReadMe.md +++ b/UnitTestFrameworkPkg/ReadMe.md @@ -610,7 +610,7 @@ uses the same test fixture and makes use of its `RtServicesMock`, `Status`, and `SecureBootMode` variables. ```cpp -TEST_F(SetSecureBootModeTest, PropogateModeToSetVar) { +TEST_F(SetSecureBootModeTest, PropagateModeToSetVar) { EXPECT_CALL(RtServicesMock, gRT_SetVariable( Char16StrEq(EFI_CUSTOM_MODE_NAME), From 3822a17d30c5b7dab738645299c300e20fdadc2c Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Mon, 22 May 2023 18:03:25 -0700 Subject: [PATCH 2/7] See if this will fix the unit tests? --- .azurepipelines/MuDevOpsSync.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azurepipelines/MuDevOpsSync.yml b/.azurepipelines/MuDevOpsSync.yml index 9f2c90a960..1a76491f7b 100644 --- a/.azurepipelines/MuDevOpsSync.yml +++ b/.azurepipelines/MuDevOpsSync.yml @@ -79,6 +79,7 @@ jobs: build_matrix: ${{ parameters.build_matrix }} os_type: ${{ parameters.os_type }} pool_name: ${{ parameters.pool_name }} + extra_install_step: ${{ parameters.extra_install_step }} tool_chain_tag: $(tool_chain_tag) vm_image: $(vm_image) container_build: ${{ parameters.container_build }} From d6e1e9e48fabe4d552eab293778fc8a32b0e7259 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Thu, 25 May 2023 16:17:31 -0700 Subject: [PATCH 3/7] Removing the optional host flag --- .azurepipelines/Ubuntu-GCC5.yml | 7 ------- .azurepipelines/Windows-VS.yml | 7 ------- 2 files changed, 14 deletions(-) diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml index 3f5ffd9943..dc9299d05a 100644 --- a/.azurepipelines/Ubuntu-GCC5.yml +++ b/.azurepipelines/Ubuntu-GCC5.yml @@ -33,37 +33,30 @@ extends: Pkgs: 'MdePkg,UefiCpuPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_MDEMODULE_DEBUG: Pkgs: 'MdeModulePkg' Targets: 'DEBUG,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_MDEMODULE_RELEASE: Pkgs: 'MdeModulePkg' Targets: 'RELEASE,NO-TARGET' ArchList: $(arch_list) - SelfHostAgent: false TARGET_NETWORK: Pkgs: 'NetworkPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_OTHER: Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_TEST_POLICY: Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_CRYPTO: Pkgs: 'CryptoPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_MDE_CPU_ARM: Pkgs: 'MdePkg,UefiCpuPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' diff --git a/.azurepipelines/Windows-VS.yml b/.azurepipelines/Windows-VS.yml index 97034d3de9..e316bdff34 100644 --- a/.azurepipelines/Windows-VS.yml +++ b/.azurepipelines/Windows-VS.yml @@ -32,37 +32,30 @@ extends: Pkgs: 'MdePkg,UefiCpuPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_MDEMODULE_DEBUG: Pkgs: 'MdeModulePkg' Targets: 'DEBUG,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_MDEMODULE_RELEASE: Pkgs: 'MdeModulePkg' Targets: 'RELEASE,NO-TARGET' ArchList: $(arch_list) - SelfHostAgent: false TARGET_NETWORK: Pkgs: 'NetworkPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_OTHER: Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_TEST_POLICY: Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_CRYPTO: Pkgs: 'CryptoPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' ArchList: $(arch_list) - SelfHostAgent: false TARGET_MDE_CPU_ARM: Pkgs: 'MdePkg,UefiCpuPkg' Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' From 6fda29c5c66370c49482d9cd9d1f97a498eb9248 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Wed, 31 May 2023 11:31:57 -0700 Subject: [PATCH 4/7] Removed clang pdb and updated the name --- .azurepipelines/Matrix-Build-Job-Clang.yml | 82 ------------------- .../{MuDevOpsSync.yml => MuDevOpsWrapper.yml} | 10 ++- .azurepipelines/Ubuntu-CLANGPDB.yml | 38 --------- .azurepipelines/Ubuntu-GCC5.yml | 2 +- .azurepipelines/Windows-CLANGPDB.yml | 39 --------- .azurepipelines/Windows-VS.yml | 2 +- 6 files changed, 8 insertions(+), 165 deletions(-) delete mode 100644 .azurepipelines/Matrix-Build-Job-Clang.yml rename .azurepipelines/{MuDevOpsSync.yml => MuDevOpsWrapper.yml} (86%) delete mode 100644 .azurepipelines/Ubuntu-CLANGPDB.yml delete mode 100644 .azurepipelines/Windows-CLANGPDB.yml diff --git a/.azurepipelines/Matrix-Build-Job-Clang.yml b/.azurepipelines/Matrix-Build-Job-Clang.yml deleted file mode 100644 index f04dc11390..0000000000 --- a/.azurepipelines/Matrix-Build-Job-Clang.yml +++ /dev/null @@ -1,82 +0,0 @@ -## @file -# Template file for generating a CLANGPDB build job matrix for the packages currently supported for -# build in Mu Basecore. -# -# Copyright (c) Microsoft Corporation. -# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -parameters: -- name: arch_list - displayName: Architectures (e.g. IA32, X64) - type: string - default: '' -- name: extra_build_args - displayName: Extra Build Command Arguments - type: string - default: '' -- name: extra_install_step - displayName: Extra Install Steps - type: stepList - default: - - script: echo No extra steps provided -- name: tool_chain_tag - displayName: Tool Chain (e.g. VS2022) - type: string - default: '' -- name: vm_image - displayName: Virtual Machine Image (e.g. windows-latest) - type: string - default: 'windows-latest' - -jobs: - -- job: Build - timeoutInMinutes: 120 - # Use matrix to speed up the build process - strategy: - matrix: - TARGET_MDE_CPU: - Build.Pkgs: 'MdePkg,UefiCpuPkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_MDEMODULE_DEBUG: - Build.Pkgs: 'MdeModulePkg' - Build.Targets: 'DEBUG,NOOPT' - TARGET_MDEMODULE_RELEASE: - Build.Pkgs: 'MdeModulePkg' - Build.Targets: 'RELEASE,NO-TARGET' - TARGET_NETWORK: - Build.Pkgs: 'NetworkPkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_OTHER: - Build.Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg,BaseTools' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_TEST_POLICY: - Build.Pkgs: 'UnitTestFrameworkPkg,PolicyServicePkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - TARGET_CRYPTO: - Build.Pkgs: 'CryptoPkg' - Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT' - - workspace: - clean: all - - pool: - vmImage: ${{ parameters.vm_image }} - - steps: - - template: Steps/PrGate.yml@mu_devops - parameters: - artifacts_identifier: '$(Build.Pkgs) $(Build.Targets)' - build_archs: ${{ parameters.arch_list }} - build_pkgs: $(Build.Pkgs) - build_targets: $(Build.Targets) - do_ci_build: true - do_ci_setup: false - do_non_ci_build: false - do_non_ci_setup: true - do_pr_eval: true - extra_build_args: ${{ parameters.extra_build_args }} - extra_install_step: ${{ parameters.extra_install_step }} - tool_chain_tag: ${{ parameters.tool_chain_tag }} diff --git a/.azurepipelines/MuDevOpsSync.yml b/.azurepipelines/MuDevOpsWrapper.yml similarity index 86% rename from .azurepipelines/MuDevOpsSync.yml rename to .azurepipelines/MuDevOpsWrapper.yml index 1a76491f7b..d911ba70d4 100644 --- a/.azurepipelines/MuDevOpsSync.yml +++ b/.azurepipelines/MuDevOpsWrapper.yml @@ -1,5 +1,5 @@ ## @file -# Azure Pipeline build file for a build using Windows and Visual Studio. +# Azure Pipeline build file for a build using mu_devops. # # NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there # instead of the file in this repo. @@ -11,13 +11,15 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent ## +{% import '../../../Version.njk' as sync_version -%} + resources: repositories: - repository: mu_devops type: github endpoint: microsoft - name: kuqin12/mu_devops - ref: test_arm64 + name: microsoft/mu_devops + ref: refs/tags/{{ sync_version.mu_devops }} parameters: - name: do_ci_build @@ -83,6 +85,6 @@ jobs: tool_chain_tag: $(tool_chain_tag) vm_image: $(vm_image) container_build: ${{ parameters.container_build }} - linux_container_image: ghcr.io/tianocore/containers/fedora-37-build:3b3eb8f + linux_container_image: {{ sync_version.linux_build_container }} - ${{ parameters.extra_jobs }} diff --git a/.azurepipelines/Ubuntu-CLANGPDB.yml b/.azurepipelines/Ubuntu-CLANGPDB.yml deleted file mode 100644 index 732d767e09..0000000000 --- a/.azurepipelines/Ubuntu-CLANGPDB.yml +++ /dev/null @@ -1,38 +0,0 @@ -## @file -# Azure Pipeline build file for a build using Ubuntu and CLANGPDB. -# -# IMPORTANT: This file requires the local repo to contain a .azurepipelines/Matrix-Build-Job-Clang.yml file that -# performs the actual build steps for the configurations and packages supported by the repo. -# -# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there -# instead of the file in this repo. -# -# - Mu DevOps Repo: https://github.com/microsoft/mu_devops -# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml -# -# Copyright (c) Microsoft Corporation. -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -resources: - repositories: - - repository: mu_devops - type: github - endpoint: microsoft - name: microsoft/mu_devops - ref: refs/tags/v2.5.1 - -variables: -- group: architectures-x86-64 -- group: tool-chain-clangpdb -- group: tool-chain-clangpdb-ubuntu-vm-image - -jobs: -- template: Matrix-Build-Job-Clang.yml - parameters: - arch_list: $(arch_list) - extra_steps: - - script: sudo apt-get install mingw-w64 - displayName: Install Windows Resource Compiler for Linux - tool_chain_tag: $(tool_chain_tag) - vm_image: $(vm_image) diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml index dc9299d05a..ddceb8ae0d 100644 --- a/.azurepipelines/Ubuntu-GCC5.yml +++ b/.azurepipelines/Ubuntu-GCC5.yml @@ -19,7 +19,7 @@ variables: - group: tool-chain-ubuntu-gcc extends: - template: MuDevOpsSync.yml + template: MuDevOpsWrapper.yml parameters: do_ci_build: true do_ci_setup: false diff --git a/.azurepipelines/Windows-CLANGPDB.yml b/.azurepipelines/Windows-CLANGPDB.yml deleted file mode 100644 index db1e6b801c..0000000000 --- a/.azurepipelines/Windows-CLANGPDB.yml +++ /dev/null @@ -1,39 +0,0 @@ -## @file -# Azure Pipeline build file for a build using Windows and CLANGPDB. -# -# IMPORTANT: This file requires the local repo to contain a .azurepipelines/Matrix-Build-Job-Clang.yml file that -# performs the actual build steps for the configurations and packages supported by the repo. -# -# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there -# instead of the file in this repo. -# -# - Mu DevOps Repo: https://github.com/microsoft/mu_devops -# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml -# -# Copyright (c) Microsoft Corporation. -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -resources: - repositories: - - repository: mu_devops - type: github - endpoint: microsoft - name: microsoft/mu_devops - ref: refs/tags/v2.5.1 - -variables: -- group: architectures-x86-64 -- group: tool-chain-clangpdb -- group: tool-chain-clangpdb-windows-vm-image - -jobs: -- template: Matrix-Build-Job-Clang.yml - parameters: - arch_list: $(arch_list) - extra_install_step: - - powershell: choco install llvm - displayName: Install LLVM and CLANG - condition: and(gt(variables.pkg_count, 0), succeeded()) - tool_chain_tag: $(tool_chain_tag) - vm_image: $(vm_image) diff --git a/.azurepipelines/Windows-VS.yml b/.azurepipelines/Windows-VS.yml index e316bdff34..07d0ceab19 100644 --- a/.azurepipelines/Windows-VS.yml +++ b/.azurepipelines/Windows-VS.yml @@ -19,7 +19,7 @@ variables: - group: tool-chain-windows-visual-studio-latest extends: - template: MuDevOpsSync.yml + template: MuDevOpsWrapper.yml parameters: do_ci_build: true do_ci_setup: false From 6dbefd413423a97084612c5b4031d0a02c07e2ee Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Wed, 31 May 2023 11:34:14 -0700 Subject: [PATCH 5/7] Updated to reflect the latest state from devops --- .azurepipelines/MuDevOpsWrapper.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.azurepipelines/MuDevOpsWrapper.yml b/.azurepipelines/MuDevOpsWrapper.yml index d911ba70d4..ce4198d8fa 100644 --- a/.azurepipelines/MuDevOpsWrapper.yml +++ b/.azurepipelines/MuDevOpsWrapper.yml @@ -11,15 +11,13 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent ## -{% import '../../../Version.njk' as sync_version -%} - resources: repositories: - repository: mu_devops type: github endpoint: microsoft - name: microsoft/mu_devops - ref: refs/tags/{{ sync_version.mu_devops }} + name: kuqin12/mu_devops + ref: test_arm64 parameters: - name: do_ci_build @@ -85,6 +83,6 @@ jobs: tool_chain_tag: $(tool_chain_tag) vm_image: $(vm_image) container_build: ${{ parameters.container_build }} - linux_container_image: {{ sync_version.linux_build_container }} + linux_container_image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:4a1f8d3 - ${{ parameters.extra_jobs }} From 249ef63049882e2b87b807fa75418c06c8e66246 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Wed, 31 May 2023 15:15:13 -0700 Subject: [PATCH 6/7] Switching to official release --- .azurepipelines/MuDevOpsWrapper.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azurepipelines/MuDevOpsWrapper.yml b/.azurepipelines/MuDevOpsWrapper.yml index ce4198d8fa..e056aa25fb 100644 --- a/.azurepipelines/MuDevOpsWrapper.yml +++ b/.azurepipelines/MuDevOpsWrapper.yml @@ -16,8 +16,8 @@ resources: - repository: mu_devops type: github endpoint: microsoft - name: kuqin12/mu_devops - ref: test_arm64 + name: microsoft/mu_devops + ref: refs/tags/v4.0.0 parameters: - name: do_ci_build From 369a3c6190198d0171bb5cddd7c42f8536d25f91 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Thu, 1 Jun 2023 13:53:38 -0700 Subject: [PATCH 7/7] Try to remove the md version so that we are using the same version now --- UnitTestFrameworkPkg/ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md index afa67c5cd1..5fdd362cb7 100644 --- a/UnitTestFrameworkPkg/ReadMe.md +++ b/UnitTestFrameworkPkg/ReadMe.md @@ -610,7 +610,7 @@ uses the same test fixture and makes use of its `RtServicesMock`, `Status`, and `SecureBootMode` variables. ```cpp -TEST_F(SetSecureBootModeTest, PropagateModeToSetVar) { +TEST_F(SetSecureBootModeTest, PropogateModeToSetVar) { EXPECT_CALL(RtServicesMock, gRT_SetVariable( Char16StrEq(EFI_CUSTOM_MODE_NAME),