Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Visual Stido 2019 to Windows runners #1204

Open
UebelAndre opened this issue Aug 12, 2021 · 1 comment
Open

Add Visual Stido 2019 to Windows runners #1204

UebelAndre opened this issue Aug 12, 2021 · 1 comment

Comments

@UebelAndre
Copy link
Contributor

UebelAndre commented Aug 12, 2021

Windows builds for rules_foreign_cc seem to be having issues on windows. A recent PR (bazel-contrib/rules_foreign_cc#757) runs into issues in this build:

CMake Error at CMakeLists.txt:3 (project):
  Generator
 
    Visual Studio 15 2017
 
  could not find any instance of Visual Studio.

And by trying to update to a newer version Visual Studio (bazel-contrib/rules_foreign_cc#758) CI shows:

CMake Error at CMakeLists.txt:6 (project):
  Generator
 
    Visual Studio 16 2019
 
  could not find any instance of Visual Studio.

It'd be nice if a recent version of visual studio was installed. But I'll settle for whatever fixes CI 😄

@philwo
Copy link
Member

philwo commented Aug 12, 2021

Hi @UebelAndre!

Sorry for the issues here. Both versions of Visual Studio should be installed in the image:

## Install Visual C++ 2017 Build Tools.
Write-Host "Installing Visual C++ 2017 Build Tools..."
& choco install visualstudio2017buildtools
& choco install visualstudio2017-workload-vctools --params "--add Microsoft.VisualStudio.Component.VC.Tools.ARM --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
[Environment]::SetEnvironmentVariable("BAZEL_VC", "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC", "Machine")
$env:BAZEL_VC = [Environment]::GetEnvironmentVariable("BAZEL_VC", "Machine")
## Install Visual C++ 2019 Build Tools.
Write-Host "Installing Visual C++ 2019 Build Tools..."
& choco install visualstudio2019buildtools
& choco install visualstudio2019-workload-vctools --params "--add Microsoft.VisualStudio.Component.VC.Tools.ARM --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"

I'm not sure why it's no longer working in our latest image.. :/ I'll investigate, but won't have time before Monday (taking tomorrow off and then it's the weekend).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants