File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,26 @@ jobs:
9898 id : gtest
9999 uses : ./.github/actions/get-gtest
100100
101+ - name : ' Check toolchain installed'
102+ id : toolchain-check
103+ run : |
104+ set +e
105+ '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
106+ if [ $? -eq 0 ]; then
107+ echo "Toolchain is already installed"
108+ echo "toolchain-installed=true" >> $GITHUB_OUTPUT
109+ else
110+ echo "Toolchain is not yet installed"
111+ echo "toolchain-installed=false" >> $GITHUB_OUTPUT
112+ fi
113+
101114 - name : ' Install toolchain and dependencies'
102115 run : |
103116 # Run Visual Studio Installer
104117 '/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
105118 modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
106119 --add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
120+ if : steps.toolchain-check.outputs.toolchain-installed != 'true'
107121
108122 - name : ' Configure'
109123 run : >
You can’t perform that action at this time.
0 commit comments