Skip to content

Commit 39910c1

Browse files
Copilottrask
andcommitted
Update CI from retired Windows 2019 image to Windows 2022 (#4262)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: trask <[email protected]> Co-authored-by: Trask Stalnaker <[email protected]>
1 parent 0fcde84 commit 39910c1

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

.github/workflows/build-common.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
8181
assemble:
8282
# running (and uploading artifact) from windows since only that build includes etw
83-
runs-on: windows-2019
83+
runs-on: windows-2022
8484
steps:
8585
- name: Support long paths
8686
run: git config --system core.longpaths true
@@ -103,6 +103,17 @@ jobs:
103103
- name: Setup Gradle
104104
uses: gradle/actions/setup-gradle@v4
105105

106+
- name: Add MSBuild to PATH
107+
uses: microsoft/setup-msbuild@v2
108+
109+
- name: Setup Visual Studio and Windows SDK environment
110+
shell: cmd
111+
run: |
112+
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath > vs.txt
113+
set /p VSPATH=<vs.txt
114+
echo APPINSIGHTS_VS_PATH=%VSPATH%>>%GITHUB_ENV%
115+
echo APPINSIGHTS_WIN10_SDK_PATH=C:\Program Files (x86)\Windows Kits\10>>%GITHUB_ENV%
116+
106117
- name: Assemble
107118
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
108119
run: >
@@ -131,13 +142,13 @@ jobs:
131142
# TODO (trask) enable once profiler supports OpenJ9
132143
# - openj9
133144
os:
134-
- windows-2019
145+
- windows-2022
135146
- ubuntu-latest
136147
fail-fast: false
137148
steps:
138149
- name: Support long paths
139150
run: git config --system core.longpaths true
140-
if: matrix.os == 'windows-2019'
151+
if: matrix.os == 'windows-2022'
141152

142153
- uses: actions/checkout@v4
143154

.github/workflows/codeql-daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
permissions:
5050
actions: read
5151
security-events: write
52-
runs-on: windows-latest
52+
runs-on: windows-2022
5353

5454
steps:
5555
- uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# CHANGELOG
2+
23
## Version 3.7.3 GA (05/28/2025)
34

45
### Enhancements

etw/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The build should find the tools and Windows SDK, but if needed these environment
1818
* Default: `"%ProgramFiles(x86)%/Windows Kits/10"`
1919
* `APPINSIGHTS_VS_PATH`
2020
* Location of Visual Studio Build Tools
21-
* Default: `%ProgramFiles(x86)%/Microsoft Visual Studio 14.0`
21+
* Default: `%ProgramFiles(x86)%/Microsoft Visual Studio/2022/Enterprise`
2222
* `APPINSIGHTS_WIN_SDK_LIB_PATH`
2323
* Location of Windows 10 SDK library folder (for linker requirements)
2424
* Default: `%APPINSIGHTS_WIN10_SDK_PATH%/Lib/10.0.18362.0/um`

etw/native/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ if (System.env.APPINSIGHTS_WIN10_SDK_PATH) {
1313
winSdkDir = System.env.APPINSIGHTS_WIN10_SDK_PATH
1414
logger.info "Windows SDK path set with environment variable, APPINSIGHTS_WIN10_SDK_PATH"
1515
}
16-
def vsToolsDir = "$programFilesX86/Microsoft Visual Studio 14.0"
16+
// Visual Studio Build Tools path - use environment variable if available, fallback to standard path
17+
def vsToolsDir = System.env.APPINSIGHTS_VS_PATH ?: "$programFilesX86/Microsoft Visual Studio/2022/BuildTools"
1718
if (System.env.APPINSIGHTS_VS_PATH) {
18-
vsToolsDir = System.env.APPINSIGHTS_VS_PATH
19-
logger.info "Visual Studio Build Tools path set with environment variable, APPINSIGHTS_VS_PATH"
19+
logger.info "Visual Studio Build Tools path set with environment variable: $vsToolsDir"
20+
} else {
21+
logger.info "Using default Visual Studio Build Tools path: $vsToolsDir"
2022
}
2123

2224
logger.info "Windows SDK: $winSdkDir"

0 commit comments

Comments
 (0)