Skip to content

Commit

Permalink
github action #8
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Oct 19, 2024
1 parent 0dc42b0 commit 8fa288c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Visual Studio Build Tools and MSVC (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install visualstudio2019buildtools -y
choco install visualstudio2022buildtools -y
choco install ninja -y
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
Expand All @@ -54,25 +54,20 @@ jobs:
-property installationPath
if (-not $vs_path) {
Write-Error "Visual Studio Build Tools not found!"
exit 1
Write-Host "Visual Studio Build Tools not found!" && exit 1
}
$vs_vars_cmd = "$vs_path\VC\Auxiliary\Build\vcvars64.bat"
if (-not (Test-Path $vs_vars_cmd)) {
Write-Error "Error: vcvars64.bat not found!"
exit 1
}
Write-Host "Found vcvars64.bat at: $vs_vars_cmd"
echo "VS_VARS_CMD=$vs_vars_cmd" >> $GITHUB_ENV
Write-Host "Visual Studio environment set up successfully."
shell: powershell

# Initialize MSVC environment for Windows
- name: Initialize MSVC environment
if: matrix.os == 'windows-latest'
run: |
echo "Using vcvars64.bat from: %VS_VARS_CMD%"
if not exist "%VS_VARS_CMD%" (
echo "Error: vcvars64.bat not found!" && exit 1
)
Expand Down

0 comments on commit 8fa288c

Please sign in to comment.