diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-08 00:14:01 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-08 01:00:47 +0200 |
commit | 02aa57afa543b295777335e0f462b814fe33b69a (patch) | |
tree | dc0a5d3c18730c50d148a3334435d78447ef959f /ci | |
parent | c5e8924f4e72f46679cff52ac075e3eb023883d5 (diff) | |
download | rneovim-02aa57afa543b295777335e0f462b814fe33b69a.tar.gz rneovim-02aa57afa543b295777335e0f462b814fe33b69a.tar.bz2 rneovim-02aa57afa543b295777335e0f462b814fe33b69a.zip |
CI/AppVeyor: build deps out-of-tree
appveyor.yml: set cache to an absolute path.
Desperate attempt to get AppVeyor cache to work.
My assumption in a7a56293aad9 #9852 that that different jobs were
overwriting each other's cache is probably wrong: AppVeyor
docs/discussions hint that the cache is per-config (though I haven't
found a clear, unambiguous statement as such).
Diffstat (limited to 'ci')
-rw-r--r-- | ci/build.ps1 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/ci/build.ps1 b/ci/build.ps1 index cd470439f0..ea1acfac00 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,11 @@ function exitIfFailed() { } } +if (-Not (Test-Path -PathType container $nvimCmakeVars["DEPS_BUILD_DIR"])) { + write-host "cache not restored (deps dir not found): $($nvimCmakeVars['DEPS_BUILD_DIR'])" + mkdir $nvimCmakeVars["DEPS_BUILD_DIR"] +} + if ($compiler -eq 'MINGW') { if ($bits -eq 32) { $arch = 'i686' @@ -87,13 +92,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 |