diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-08 02:32:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-08 02:32:33 +0200 |
commit | 9da348beda1b3b738f6a20f1face69f0ebc83cab (patch) | |
tree | 4f06a0cb547760ff26064b81f899e756b76fd895 | |
parent | c5e8924f4e72f46679cff52ac075e3eb023883d5 (diff) | |
parent | 8a8213f6d47527c060e5f0039689f41c98f265bb (diff) | |
download | rneovim-9da348beda1b3b738f6a20f1face69f0ebc83cab.tar.gz rneovim-9da348beda1b3b738f6a20f1face69f0ebc83cab.tar.bz2 rneovim-9da348beda1b3b738f6a20f1face69f0ebc83cab.zip |
Merge #9858 from justinmk/ci-win
-rw-r--r-- | appveyor.yml | 10 | ||||
-rw-r--r-- | ci/build.ps1 | 22 |
2 files changed, 18 insertions, 14 deletions
diff --git a/appveyor.yml b/appveyor.yml index 23d3a2649a..e27b8e1b88 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,8 @@ version: '{build}' environment: 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 configuration: - MSVC_64 @@ -15,6 +17,8 @@ init: $env:APPVEYOR_CACHE_SKIP_SAVE = "true" Exit-AppVeyorBuild } +# RDP +#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) matrix: allow_failures: - configuration: MINGW_64-gcov @@ -24,11 +28,7 @@ before_build: build_script: - powershell ci\build.ps1 cache: -- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1 -- deps-MINGW -> ci\build.ps1 -- deps-MSVC -> ci\build.ps1 -- deps-MINGW -> third-party\** -- deps-MSVC -> third-party\** +- C:\projects\nvim-deps -> third-party\** artifacts: - path: build/Neovim.zip - path: build/bin/nvim.exe diff --git a/ci/build.ps1 b/ci/build.ps1 index cd470439f0..4f2b748284 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -6,15 +6,15 @@ $compiler = $Matches.compiler $compileOption = $Matches.option $bits = $Matches.bits $cmakeBuildType = 'RelWithDebInfo' -$depsDir = [System.IO.Path]::GetFullPath("deps-$($compiler)") +$buildDir = [System.IO.Path]::GetFullPath("$(pwd)") $depsCmakeVars = @{ CMAKE_BUILD_TYPE = $cmakeBuildType; } $nvimCmakeVars = @{ CMAKE_BUILD_TYPE = $cmakeBuildType; BUSTED_OUTPUT_TYPE = 'nvim'; - DEPS_BUILD_DIR=$depsDir; - DEPS_PREFIX="$($depsDir)/usr"; + DEPS_BUILD_DIR=$(if ($env:DEPS_BUILD_DIR -ne $null) {$env:DEPS_BUILD_DIR} else {".deps"}); + DEPS_PREFIX=$(if ($env:DEPS_PREFIX -ne $null) {$env:DEPS_PREFIX} else {".deps/usr"}); } $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 ($bits -eq 32) { $arch = 'i686' @@ -87,13 +94,10 @@ function convertToCmakeArgs($vars) { return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" } } -if (-Not (Test-Path -PathType container $depsDir)) { - mkdir "$depsDir" -} -cd "$depsDir" -cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) ..\third-party\ ; exitIfFailed +cd $nvimCmakeVars["DEPS_BUILD_DIR"] +cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed -cd .. +cd $buildDir # Build Neovim mkdir build |