diff options
author | James McCoy <jamessan@jamessan.com> | 2021-10-23 21:38:58 -0400 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-02-20 10:18:45 +0100 |
commit | 921162a4b1d4c3e3948e1e4ffa960cbdb9e933b7 (patch) | |
tree | cb505f41ac5a2fb71bf3b8d927c2b072e6f28b93 /ci | |
parent | 8b3799e2c33282bf417ddee15ae71b5aba613c16 (diff) | |
download | rneovim-921162a4b1d4c3e3948e1e4ffa960cbdb9e933b7.tar.gz rneovim-921162a4b1d4c3e3948e1e4ffa960cbdb9e933b7.tar.bz2 rneovim-921162a4b1d4c3e3948e1e4ffa960cbdb9e933b7.zip |
ci: bump Windows image to windows-2019
The VS 2019 CMake generator no longer has different generator types for
different architectures. Now, the architecture is specified via CMake's
`-A` switch. However, this requires we also propagate
`${CMAKE_GENERATOR_PLATFORM}` to the bundled deps, so they build for the
same architecture as Nvim.
Diffstat (limited to 'ci')
-rw-r--r-- | ci/build.ps1 | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/ci/build.ps1 b/ci/build.ps1 index ef5ba3bf2d..ba80251013 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -77,12 +77,7 @@ if ($compiler -eq 'MINGW') { } elseif ($compiler -eq 'MSVC') { $cmakeGeneratorArgs = '/verbosity:normal' - if ($bits -eq 32) { - $cmakeGenerator = 'Visual Studio 15 2017' - } - elseif ($bits -eq 64) { - $cmakeGenerator = 'Visual Studio 15 2017 Win64' - } + $cmakeGenerator = 'Visual Studio 16 2019' } if (-not $NoTests) { @@ -101,7 +96,7 @@ if (-not $NoTests) { if ($compiler -eq 'MSVC') { # Required for LuaRocks (https://github.com/luarocks/luarocks/issues/1039#issuecomment-507296940). - $env:VCINSTALLDIR = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/" + $env:VCINSTALLDIR = "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/16.11.31729/" } function convertToCmakeArgs($vars) { @@ -109,14 +104,30 @@ function convertToCmakeArgs($vars) { } cd $env:DEPS_BUILD_DIR -cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed +if ($compiler -eq 'MSVC') { + if ($bits -eq 32) { + cmake -G $cmakeGenerator -A Win32 $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed + } else { + cmake -G $cmakeGenerator -A x64 $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed + } +} else { + cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed +} cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed cd $buildDir # Build Neovim mkdir build cd build -cmake -G $cmakeGenerator $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed +if ($compiler -eq 'MSVC') { + if ($bits -eq 32) { + cmake -G $cmakeGenerator -A Win32 $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed + } else { + cmake -G $cmakeGenerator -A x64 $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed + } +} else { + cmake -G $cmakeGenerator $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed +} cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed .\bin\nvim --version ; exitIfFailed |