From 02aa57afa543b295777335e0f462b814fe33b69a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 8 Apr 2019 00:14:01 +0200 Subject: 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). --- ci/build.ps1 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'ci') 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 -- cgit From 7872739d3c1d02e68982ac2e6767f6233e515637 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 8 Apr 2019 01:19:38 +0200 Subject: CI/AppVeyor: print info about restored cache --- ci/build.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/build.ps1 b/ci/build.ps1 index ea1acfac00..4f2b748284 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -26,8 +26,10 @@ 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'])" + 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') { -- cgit