mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-07-26 15:54:12 +00:00
CI: locate Visual Studio via vswhere instead of hardcoded Enterprise path (#1413)
The 'Install Glib' step in the Windows Simulator demo jobs (corePKCS11, core libraries, FreeRTOS+TCP) hardcoded the VS 2022 *Enterprise* path to Launch-VsDevShell.ps1. The GitHub windows-latest runner image no longer provides Visual Studio under that edition path, so the step fails with 'Launch-VsDevShell.ps1 ... is not recognized' and all three WinSim demo jobs error out. Use vswhere.exe (which lives at a fixed, edition-independent location) to discover the VS installation path at runtime, then invoke the located Launch-VsDevShell.ps1.
This commit is contained in:
committed by
GitHub
parent
f60e36e45d
commit
8102d351eb
9
.github/workflows/freertos_plus_demos.yml
vendored
9
.github/workflows/freertos_plus_demos.yml
vendored
@@ -321,7 +321,8 @@ jobs:
|
||||
echo "::group::${{ env.stepName }}"
|
||||
Push-Location
|
||||
Get-Location
|
||||
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
|
||||
& "$vsPath\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
Get-Location
|
||||
Pop-Location
|
||||
|
||||
@@ -425,7 +426,8 @@ jobs:
|
||||
echo "::group::${{ env.stepName }}"
|
||||
Push-Location
|
||||
Get-Location
|
||||
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
|
||||
& "$vsPath\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
Get-Location
|
||||
Pop-Location
|
||||
|
||||
@@ -1221,7 +1223,8 @@ jobs:
|
||||
echo "::group::${{ env.stepName }}"
|
||||
Push-Location
|
||||
Get-Location
|
||||
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
|
||||
& "$vsPath\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
Get-Location
|
||||
Pop-Location
|
||||
|
||||
|
||||
Reference in New Issue
Block a user