diff --git a/.github/workflows/Build ThunderOnWindows.yml b/.github/workflows/Build ThunderOnWindows.yml index 78e5e16..7228d32 100644 --- a/.github/workflows/Build ThunderOnWindows.yml +++ b/.github/workflows/Build ThunderOnWindows.yml @@ -8,7 +8,6 @@ on: branches: ["master"] env: - devEnv: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com solution: Thunder.sln jobs: @@ -24,43 +23,43 @@ jobs: name: Build type - ${{matrix.type}}${{matrix.version}} steps: - name: Checkout ThunderOnWindows - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows repository: WebPlatformForEmbedded/ThunderOnWindows - name: Checkout Thunder - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows/Thunder repository: rdkcentral/Thunder - name: Checkout ThunderTools - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows/ThunderTools repository: rdkcentral/ThunderTools - name: Checkout ThunderClientLibraries - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows/ThunderClientLibraries repository: rdkcentral/ThunderClientLibraries - name: Checkout ThunderInterfaces - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows/ThunderInterfaces repository: rdkcentral/ThunderInterfaces - name: Checkout ThunderNanoServices - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows/ThunderNanoServices repository: rdkcentral/ThunderNanoServices - name: Checkout ThunderNanoServicesRDK - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ThunderOnWindows/ThunderNanoServicesRDK repository: WebPlatformForEmbedded/ThunderNanoServicesRDK @@ -72,8 +71,13 @@ jobs: - name: Build ThunderOnWindows shell: cmd run: | + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.CoreEditor -property productPath`) do set "VS_PATH=%%i" + if not defined VS_PATH (echo ERROR: Visual Studio not found && exit /b 1) + + set "devEnv=%VS_PATH:.exe=.com%" cd ThunderOnWindows - "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" "%solution%" + "%devEnv%" "%solution%" /Build "${{matrix.type}}|x${{matrix.version}}" + if errorlevel 1 exit /b 1 # ----- Upload artifacts ----- - name: Tar files