From 96fc3b3ca5d6b0523701f286e69f93d6e2204aad Mon Sep 17 00:00:00 2001 From: Nickolay Olshevsky Date: Wed, 4 Sep 2024 12:33:11 +0300 Subject: [PATCH] Fix 10 --- .github/workflows/windows-native.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows-native.yml b/.github/workflows/windows-native.yml index ba8e14804..44fc92a57 100644 --- a/.github/workflows/windows-native.yml +++ b/.github/workflows/windows-native.yml @@ -185,15 +185,11 @@ jobs: export PATH=${{ env.VCPKG_DIR_U }}/installed/${{ matrix.arch.triplet }}/bin:$PATH cmake --build build --parallel ${{ env.CORES }} --config Release - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - - - name: Check vswhere + - name: Find visual studio root via vswhere shell: cmd run: | - C:\ProgramData\Chocolatey\bin\vswhere.exe /? || echo "1 failed" - C:\ProgramData\Chocolatey\bin\vswhere.exe -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x64.x64 -property installationPath || echo "2 failed" - C:\ProgramData\Chocolatey\bin\vswhere.exe -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath || echo "3 failed" + FOR /F %%i in ('C:\ProgramData\Chocolatey\bin\vswhere.exe -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath') DO SET VS_PATH=%%i + echo "Detected Visual Studio path: %VS_PATH%" - name: Test shell: bash @@ -202,7 +198,13 @@ jobs: # ctest --parallel ${{ env.CORES }} --test-dir build -R rnp_tests -C Debug --output-on-failure # ctest --parallel ${{ env.CORES }} --test-dir build -C Release --output-on-failure run: | - echo "$PATH" + echo "VS_PATH: ${VS_PATH}" + #echo "$PATH" + vsp=$(cygpath -u "${VS_PATH}") + TOOLSET_VER=$(<"$vsp/VC/Auxiliary/Build/Microsoft.VCToolsVersion.${{matrix.toolset}}.default.txt") + echo "TOOLSET_VER: ${TOOLSET_VER}" + LIB_DIR="${vsp}/VC/Tools/MSVC/${TOOLSET_VER}/bin/Hostx64/x64" + echo "LIB_DIR: ${LIB_DIR}" # env ls -la "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise" || true ls -la "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC" || true