Skip to content

Commit

Permalink
Update CI to VS2022
Browse files Browse the repository at this point in the history
This PR updates the CI pipelines to use VS2022 instead of VS2019
as that is the latest supported VS toolchain on edk2.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <[email protected]>
  • Loading branch information
os-d committed Dec 9, 2024
1 parent d70667d commit 1d5dd2f
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .azurepipelines/Windows-VS2019.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## @file
# Azure Pipeline build file for a build using Windows and VS2019
# Azure Pipeline build file for a build using Windows and VS2022
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
Expand All @@ -18,8 +18,8 @@ variables:
jobs:
- template: templates/pr-gate-build-job.yml
parameters:
tool_chain_tag: 'VS2019'
vm_image: 'windows-2019'
tool_chain_tag: 'VS2022'
vm_image: 'windows-2022'
arch_list: "IA32,X64"
usePythonVersion: ${{ variables.default_python_version }}
extra_install_step:
Expand Down
2 changes: 1 addition & 1 deletion .azurepipelines/templates/pr-gate-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
clean: all

pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'

steps:
- checkout: self
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: windows-2019
runs-on: windows-2022
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Setup
if: steps.get_ci_file_operations.outputs.setup_supported == 'true'
run: stuart_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019
run: stuart_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2022

- name: Upload Setup Log As An Artifact
uses: actions/upload-artifact@v4
Expand All @@ -163,7 +163,7 @@ jobs:

- name: CI Setup
if: steps.get_ci_file_operations.outputs.ci_setup_supported == 'true'
run: stuart_ci_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019
run: stuart_ci_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2022

- name: Upload CI Setup Log As An Artifact
uses: actions/upload-artifact@v4
Expand All @@ -176,7 +176,7 @@ jobs:
if-no-files-found: ignore

- name: Update
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2022

- name: Upload Update Log As An Artifact
uses: actions/upload-artifact@v4
Expand All @@ -189,7 +189,7 @@ jobs:
if-no-files-found: ignore

- name: Build Tools From Source
run: python BaseTools/Edk2ToolsBuild.py -t VS2019
run: python BaseTools/Edk2ToolsBuild.py -t VS2022

- name: Find CodeQL Plugin Directory
id: find_dir
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:

- name: Download CodeQL CLI
if: steps.codeqlcli_cache.outputs.cache-hit != 'true'
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019 --codeql
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2022 --codeql

- name: Remove CI Plugins Irrelevant to CodeQL
shell: python
Expand All @@ -269,7 +269,7 @@ jobs:
- name: CI Build
env:
STUART_CODEQL_PATH: ${{ steps.cache_key_gen.outputs.codeql_cli_ext_dep_dir }}
run: stuart_ci_build -c .pytool/CISettings.py -t DEBUG -p ${{ matrix.Package }} -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019 --codeql
run: stuart_ci_build -c .pytool/CISettings.py -t DEBUG -p ${{ matrix.Package }} -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2022 --codeql

- name: Build Cleanup
id: build_cleanup
Expand Down
4 changes: 2 additions & 2 deletions .pytool/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on the TianoCore wiki.

## Basic Status

| Package | Windows VS2019 (IA32/X64)| Ubuntu GCC (IA32/X64/ARM/AARCH64) | Known Issues |
| Package | Windows VS2022 (IA32/X64)| Ubuntu GCC (IA32/X64/ARM/AARCH64) | Known Issues |
| :---- | :----- | :---- | :--- |
| ArmPkg | | :heavy_check_mark: |
| ArmPlatformPkg | | :heavy_check_mark: |
Expand Down Expand Up @@ -48,7 +48,7 @@ located [here](https://github.com/tianocore/edk2-pytool-library) and
[here](https://github.com/tianocore/edk2-pytool-extensions)).

The primary execution flows can be found in the
`.azurepipelines/Windows-VS2019.yml` and `.azurepipelines/Ubuntu-GCC5.yml`
`.azurepipelines/Windows-VS2022.yml` and `.azurepipelines/Ubuntu-GCC5.yml`
files. These YAML files are consumed by the Azure Dev Ops Build Pipeline and
dictate what server resources should be used, how they should be configured, and
what processes should be run on them. An overview of this schema can be found
Expand Down
4 changes: 2 additions & 2 deletions BaseTools/Edk2ToolsBuild.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @file Edk2ToolsBuild.py
# Invocable class that builds the basetool c files.
#
# Supports VS2017, VS2019, and GCC5
# Supports VS2019, VS2022, and GCC5
##
# Copyright (c) Microsoft Corporation
#
Expand All @@ -24,7 +24,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
def ParseCommandLineOptions(self):
''' parse arguments '''
ParserObj = argparse.ArgumentParser()
ParserObj.add_argument("-t", "--tool_chain_tag", dest="tct", default="VS2017",
ParserObj.add_argument("-t", "--tool_chain_tag", dest="tct", default="VS2022",
help="Set the toolchain used to compile the build tools")
args = ParserObj.parse_args()
self.tool_chain_tag = args.tct
Expand Down
2 changes: 1 addition & 1 deletion BaseTools/toolsetup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ endlocal

:Usage
@echo.
echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2019] [VS2017] [VS2015]"
echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2022] [VS2019] [VS2017] [VS2015]"
@echo.
@echo base_tools_path BaseTools project path, BASE_TOOLS_PATH will be set to this path.
@echo edk_tools_path EDK_TOOLS_PATH will be set to this path.
Expand Down
6 changes: 3 additions & 3 deletions EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Platform: EMULATORPKG
# OS: Windows
# Toolchain: VS2019
# Toolchain: VS2022
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Intel Corporation. All rights reserved.
Expand All @@ -23,7 +23,7 @@ jobs:
- job: Platform_CI
variables:
package: 'EmulatorPkg'
vm_image: 'windows-2019'
vm_image: 'windows-2022'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE"

Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
steps:
- template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
parameters:
tool_chain_tag: VS2019
tool_chain_tag: VS2022
build_pkg: $(package)
build_target: $(Build.Target)
build_arch: $(Build.Arch)
Expand Down
6 changes: 3 additions & 3 deletions EmulatorPkg/PlatformCI/PlatformBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ def GetLoggingLevel(self, loggerType):
def SetPlatformEnv(self):
logging.debug("PlatformBuilder SetPlatformEnv")
self.env.SetValue("PRODUCT_NAME", "EmulatorPkg", "Platform Hardcoded")
self.env.SetValue("TOOL_CHAIN_TAG", "VS2019", "Default Toolchain")
self.env.SetValue("TOOL_CHAIN_TAG", "VS2022", "Default Toolchain")

# Add support for using the correct Platform Headers, tools, and Libs based on emulator architecture
# requested to be built when building VS2019 or VS2017
if self.env.GetValue("TOOL_CHAIN_TAG") == "VS2019" or self.env.GetValue("TOOL_CHAIN_TAG") == "VS2017":
# requested to be built when building VS2022 or VS2019
if self.env.GetValue("TOOL_CHAIN_TAG") == "VS2022" or self.env.GetValue("TOOL_CHAIN_TAG") == "VS2019":
key = self.env.GetValue("TOOL_CHAIN_TAG") + "_HOST"
if self.env.GetValue("TARGET_ARCH") == "IA32":
shell_environment.ShellEnvironment().set_shell_var(key, "x86")
Expand Down
2 changes: 1 addition & 1 deletion EmulatorPkg/PlatformCI/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to use the same Pytools based build infrastructure locally.
## Supported Configuration Details

This solution for building and running EmulatorPkg has only been validated with Windows 10
with VS2019 and Ubuntu 18.04 with GCC5 toolchain. Four different firmware builds are
with VS2022 and Ubuntu 18.04 with GCC5 toolchain. Four different firmware builds are
supported and are described below.

| Configuration name | Architectures | DSC File |Additional Flags |
Expand Down
8 changes: 4 additions & 4 deletions EmulatorPkg/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ https://github.com/tianocore/tianocore.github.io/wiki/EmulatorPkg
**You can use the following command to build.**
* 32bit emulator in Windows:

`build -p EmulatorPkg\EmulatorPkg.dsc -t VS2017 -a IA32`
`build -p EmulatorPkg\EmulatorPkg.dsc -t VS2022 -a IA32`

* 64bit emulator in Windows:

`build -p EmulatorPkg\EmulatorPkg.dsc -t VS2017 -a X64`
`build -p EmulatorPkg\EmulatorPkg.dsc -t VS2022 -a X64`

* 32bit emulator in Linux:

Expand All @@ -38,11 +38,11 @@ https://github.com/tianocore/tianocore.github.io/wiki/EmulatorPkg
**You can start/run the emulator using the following command:**
* 32bit emulator in Windows:

`cd Build\EmulatorIA32\DEBUG_VS2017\IA32\ && WinHost.exe`
`cd Build\EmulatorIA32\DEBUG_VS2022\IA32\ && WinHost.exe`

* 64bit emulator in Windows:

`cd Build\EmulatorX64\DEBUG_VS2017\X64\ && WinHost.exe`
`cd Build\EmulatorX64\DEBUG_VS2022\X64\ && WinHost.exe`

* 32bit emulator in Linux:

Expand Down
6 changes: 3 additions & 3 deletions OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Platform: OVMF
# OS: Windows
# Toolchain: VS2019
# Toolchain: VS2022
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
Expand All @@ -22,7 +22,7 @@ jobs:
- job: Platform_CI
variables:
package: 'OvmfPkg'
vm_image: 'windows-2019'
vm_image: 'windows-2022'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
steps:
- template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
parameters:
tool_chain_tag: VS2019
tool_chain_tag: VS2022
build_pkg: $(package)
build_target: $(Build.Target)
build_arch: $(Build.Arch)
Expand Down
2 changes: 1 addition & 1 deletion OvmfPkg/PlatformCI/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to use the same Pytools based build infrastructure locally.
## Supported Configuration Details

This solution for building and running OvmfPkg has only been validated with Windows 10
with VS2019 and Ubuntu 18.04 with GCC5 toolchain. Four different firmware builds are
with VS2022 and Ubuntu 18.04 with GCC5 toolchain. Four different firmware builds are
supported and are described below.

| Configuration name | Architectures | DSC File |Additional Flags |
Expand Down
4 changes: 2 additions & 2 deletions PrmPkg/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ the package being built.
Like a typical EDK II package, the PrmPkg binary build output can be found in the Build directory in the edk2
workspace. The organization in that directory follows the same layout as other EDK II packages.

For example, that path to PRM module sample binaries for a DEBUG VS2017 X64 build is: \
``edk2/Build/Prm/DEBUG_VS2017/X64/PrmPkg/Samples``
For example, that path to PRM module sample binaries for a DEBUG VS2022 X64 build is: \
``edk2/Build/Prm/DEBUG_VS2022/X64/PrmPkg/Samples``

## Overview

Expand Down
4 changes: 2 additions & 2 deletions PrmPkg/Samples/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ The sample modules are built as part of the normal `PrmPkg` build so you can fol
workspace build output directory. For example, if your build workspace is called "edk2" and you build
64-bit binaries on the Visual Studio 2017 tool chain, your sample module binaries will be in the following
location: \
``edk2/Build/Prm/DEBUG_VS2017/X64/PrmPkg/Samples``
``edk2/Build/Prm/DEBUG_VS2022/X64/PrmPkg/Samples``

### Build an Individual PRM Sample Module

Note that the build command does provide the option to build a specific module in a package which can result in
faster build time. If you would like to just build a single PRM module that can be done by specifying the path to
the module INF file with the "-m" argument to `build`. For example, this command builds 32-bit and 64-bit binaries
with Visual Studio 2019: \
``build -p PrmPkg/PrmPkg.dsc -m PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf -a IA32 -a X64 -t VS2019``
``build -p PrmPkg/PrmPkg.dsc -m PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf -a IA32 -a X64 -t VS2022``

## PRM Sample Module User's Guide

Expand Down
Loading

0 comments on commit 1d5dd2f

Please sign in to comment.