|
22 | 22 | env:
|
23 | 23 | TEST_WIN_SDK_VERSION: "10.0.22000.0"
|
24 | 24 | TEST_MSVC_VERSION: "14.40"
|
| 25 | + TEST_BUILD_TOOLS_EXPECTED_VERSION: "14.40.33807" |
25 | 26 |
|
26 | 27 | jobs:
|
27 | 28 | test-setup-build-windows-vs-dev-env:
|
@@ -77,11 +78,20 @@ jobs:
|
77 | 78 | Write-Output "✅ No unexpected Windows SDK versions greater than `"${env:TEST_WIN_SDK_VERSION}`" found."
|
78 | 79 | }
|
79 | 80 |
|
| 81 | + # Check the action output. |
| 82 | + $BuildToolsVersion = ${{ steps.setup-build.outputs.windows-build-tools-version }} |
| 83 | + if ($BuildToolsVersion -ne $env:TEST_BUILD_TOOLS_EXPECTED_VERSION) { |
| 84 | + Write-Output "::error::Expected build tools version `${env:TEST_BUILD_TOOLS_EXPECTED_VERSION}`, but got `${BuildToolsVersion}`." |
| 85 | + $HasError = $true |
| 86 | + } else { |
| 87 | + Write-Output "✅ Build tools version `${BuildToolsVersion}` matches expected version." |
| 88 | + } |
| 89 | +
|
80 | 90 | # Check if the correct MSVC version is installed.
|
81 | 91 | $InstallerLocation = Join-Path "${env:ProgramFiles(x86)}" "Microsoft Visual Studio" "Installer"
|
82 | 92 | $VSWhere = Join-Path "${InstallerLocation}" "vswhere.exe"
|
83 | 93 | $InstallPath = (& "$VSWhere" -latest -products * -format json | ConvertFrom-Json).installationPath
|
84 |
| - $MSVCDir = Join-Path $InstallPath "VC" "Tools" "MSVC" "${{ steps.setup-build.outputs.windows-build-tools-version }}" |
| 94 | + $MSVCDir = Join-Path $InstallPath "VC" "Tools" "MSVC" $BuildToolsVersion |
85 | 95 | if (Test-Path -Path $MSVCDir) {
|
86 | 96 | Write-Output "✅ MSVC version `${env:TEST_MSVC_VERSION}`" is installed."
|
87 | 97 | } else {
|
@@ -174,11 +184,20 @@ jobs:
|
174 | 184 | Write-Output "✅ No unexpected Windows SDK versions greater than `"${env:TEST_WIN_SDK_VERSION}`" found."
|
175 | 185 | }
|
176 | 186 |
|
| 187 | + # Check the action output. |
| 188 | + $BuildToolsVersion = "${{ steps.setup-build.outputs.windows-build-tools-version }}" |
| 189 | + if ($BuildToolsVersion -ne $env:TEST_BUILD_TOOLS_EXPECTED_VERSION) { |
| 190 | + Write-Output "::error::Expected build tools version `"${env:TEST_BUILD_TOOLS_EXPECTED_VERSION}`", but got `"${BuildToolsVersion}`"." |
| 191 | + $HasError = $true |
| 192 | + } else { |
| 193 | + Write-Output "✅ Build tools version `${BuildToolsVersion}` matches expected version." |
| 194 | + } |
| 195 | +
|
177 | 196 | # Check if the correct MSVC version is installed.
|
178 | 197 | $InstallerLocation = Join-Path "${env:ProgramFiles(x86)}" "Microsoft Visual Studio" "Installer"
|
179 | 198 | $VSWhere = Join-Path "${InstallerLocation}" "vswhere.exe"
|
180 | 199 | $InstallPath = (& "$VSWhere" -latest -products * -format json | ConvertFrom-Json).installationPath
|
181 |
| - $MSVCDir = Join-Path $InstallPath "VC" "Tools" "MSVC" "${{ steps.setup-build.outputs.windows-build-tools-version }}" |
| 200 | + $MSVCDir = Join-Path $InstallPath "VC" "Tools" "MSVC" $BuildToolsVersion |
182 | 201 | if (Test-Path -Path $MSVCDir) {
|
183 | 202 | Write-Output "✅ MSVC version `${env:TEST_MSVC_VERSION}`" is installed."
|
184 | 203 | } else {
|
|
0 commit comments