mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07:00
Merge #9858 from justinmk/ci-win
This commit is contained in:
commit
9da348beda
10
appveyor.yml
10
appveyor.yml
@ -1,6 +1,8 @@
|
|||||||
version: '{build}'
|
version: '{build}'
|
||||||
environment:
|
environment:
|
||||||
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
|
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
|
||||||
|
DEPS_BUILD_DIR: "C:/projects/nvim-deps"
|
||||||
|
DEPS_PREFIX: "C:/projects/nvim-deps/usr"
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2017
|
||||||
configuration:
|
configuration:
|
||||||
- MSVC_64
|
- MSVC_64
|
||||||
@ -15,6 +17,8 @@ init:
|
|||||||
$env:APPVEYOR_CACHE_SKIP_SAVE = "true"
|
$env:APPVEYOR_CACHE_SKIP_SAVE = "true"
|
||||||
Exit-AppVeyorBuild
|
Exit-AppVeyorBuild
|
||||||
}
|
}
|
||||||
|
# RDP
|
||||||
|
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- configuration: MINGW_64-gcov
|
- configuration: MINGW_64-gcov
|
||||||
@ -24,11 +28,7 @@ before_build:
|
|||||||
build_script:
|
build_script:
|
||||||
- powershell ci\build.ps1
|
- powershell ci\build.ps1
|
||||||
cache:
|
cache:
|
||||||
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
|
- C:\projects\nvim-deps -> third-party\**
|
||||||
- deps-MINGW -> ci\build.ps1
|
|
||||||
- deps-MSVC -> ci\build.ps1
|
|
||||||
- deps-MINGW -> third-party\**
|
|
||||||
- deps-MSVC -> third-party\**
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: build/Neovim.zip
|
- path: build/Neovim.zip
|
||||||
- path: build/bin/nvim.exe
|
- path: build/bin/nvim.exe
|
||||||
|
22
ci/build.ps1
22
ci/build.ps1
@ -6,15 +6,15 @@ $compiler = $Matches.compiler
|
|||||||
$compileOption = $Matches.option
|
$compileOption = $Matches.option
|
||||||
$bits = $Matches.bits
|
$bits = $Matches.bits
|
||||||
$cmakeBuildType = 'RelWithDebInfo'
|
$cmakeBuildType = 'RelWithDebInfo'
|
||||||
$depsDir = [System.IO.Path]::GetFullPath("deps-$($compiler)")
|
$buildDir = [System.IO.Path]::GetFullPath("$(pwd)")
|
||||||
$depsCmakeVars = @{
|
$depsCmakeVars = @{
|
||||||
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
||||||
}
|
}
|
||||||
$nvimCmakeVars = @{
|
$nvimCmakeVars = @{
|
||||||
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
||||||
BUSTED_OUTPUT_TYPE = 'nvim';
|
BUSTED_OUTPUT_TYPE = 'nvim';
|
||||||
DEPS_BUILD_DIR=$depsDir;
|
DEPS_BUILD_DIR=$(if ($env:DEPS_BUILD_DIR -ne $null) {$env:DEPS_BUILD_DIR} else {".deps"});
|
||||||
DEPS_PREFIX="$($depsDir)/usr";
|
DEPS_PREFIX=$(if ($env:DEPS_PREFIX -ne $null) {$env:DEPS_PREFIX} else {".deps/usr"});
|
||||||
}
|
}
|
||||||
$uploadToCodeCov = $false
|
$uploadToCodeCov = $false
|
||||||
|
|
||||||
@ -25,6 +25,13 @@ function exitIfFailed() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (-Not (Test-Path -PathType container $nvimCmakeVars["DEPS_BUILD_DIR"])) {
|
||||||
|
write-host "cache dir not found: $($nvimCmakeVars['DEPS_BUILD_DIR'])"
|
||||||
|
mkdir $nvimCmakeVars["DEPS_BUILD_DIR"]
|
||||||
|
} else {
|
||||||
|
write-host "cache dir ($nvimCmakeVars['DEPS_BUILD_DIR']) size: $(Get-ChildItem $nvimCmakeVars['DEPS_BUILD_DIR'] -recurse | Measure-Object -property length -sum | Select -expand sum)"
|
||||||
|
}
|
||||||
|
|
||||||
if ($compiler -eq 'MINGW') {
|
if ($compiler -eq 'MINGW') {
|
||||||
if ($bits -eq 32) {
|
if ($bits -eq 32) {
|
||||||
$arch = 'i686'
|
$arch = 'i686'
|
||||||
@ -87,13 +94,10 @@ function convertToCmakeArgs($vars) {
|
|||||||
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
|
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-Not (Test-Path -PathType container $depsDir)) {
|
cd $nvimCmakeVars["DEPS_BUILD_DIR"]
|
||||||
mkdir "$depsDir"
|
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed
|
||||||
}
|
|
||||||
cd "$depsDir"
|
|
||||||
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) ..\third-party\ ; exitIfFailed
|
|
||||||
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
|
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
|
||||||
cd ..
|
cd $buildDir
|
||||||
|
|
||||||
# Build Neovim
|
# Build Neovim
|
||||||
mkdir build
|
mkdir build
|
||||||
|
Loading…
Reference in New Issue
Block a user