Repository navigation
CI: Add VS2019 build jobs - #757
Conversation
| # The test suite currently requires that the compiler specified by the "CC" | ||
| # env variable is on a path without spaces. Provide that by creating a | ||
| # junction from ~/opt/llvm to the Visual Studio path. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
I think that'll be tricky unfortunately -- there seem to be loads of implicit assumptions in the test/suites/*.bash tests that all tools are in paths without spaces. Ccache itself seems to cope okay, with the exception of environment variables like CCACHE_COMPILERCHECK where you can't reference tools with spaces
| # Determine VS2019 install path | ||
| $vsInstallPath = (Get-VSSetupInstance | ` | ||
| Select-VSSetupInstance -Product '*' -Latest -Version '[16.0,17.0)' ` | ||
| ).InstallationPath | ||
|
|
||
| $vcvarsall = "${vsInstallPath}\VC\Auxiliary\Build\vcvarsall.bat" | ||
| if (-not (Test-Path -Path $vcvarsall)) { | ||
| Out-Error "Could not find Visual Studio setup script" | ||
| exit 1 | ||
| } |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| cmd /c "`"${vcvarsall}`" ${{ matrix.config.msvc_arch }} & set" | foreach { | ||
| if ($_ -match '^\w+=') { | ||
| $k, $v = $_.split('=', 2) | ||
| Set-Item -Force -Path "env:\${k}" -Value $v | ||
| } | ||
| } |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| [System.IO.File]::AppendAllLines( | ||
| $env:GITHUB_ENV, | ||
| [string[]]$msvcEnv, | ||
| $Utf8NoBomEncoding) |
There was a problem hiding this comment.
Another stupid idea: does it make sense to use e.g. https://github.com/marketplace/actions/enable-developer-command-prompt or https://github.com/marketplace/actions/setup-vs-dev-environment? Sounds like it could simplify setup a lot.
There was a problem hiding this comment.
I'll have a look at the action and see how much of this can be replaced by it. Only disadvantage I can see is that it doesn't let you pick with Visual Studio major version to use, but it looks like the current GitHub runner only has 2019 installed so that's not really an issue.
There was a problem hiding this comment.
Looks a lot simpler now. I love the action marketplace 👍
caffbc4 to
cc9e970
Compare
Add VS2019 build jobs that use clang for the test suite. There are many test failures on Windows, but these are ignored for now. Tweak CMake build scripts: - Fix CI build type handling for MSVC (recognise `/NDEBUG` and not just `-DNDEBUG`) - Fix incorrect warnings-as-errors flag for MSVC - Suppress an additional conversion warning on MSVC
cc9e970 to
e7754a4
Compare
|
Thanks. |
Add VS2019 build jobs that use clang for the test suite. There are many test failures on Windows, but these are ignored for now.
Tweak CMake build scripts:
/NDEBUGand not just-DNDEBUG)