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 a7a56293aa
#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).
This commit is contained in:
parent
c5e8924f4e
commit
02aa57afa5
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
|
||||||
|
@ -25,10 +29,8 @@ build_script:
|
||||||
- powershell ci\build.ps1
|
- powershell ci\build.ps1
|
||||||
cache:
|
cache:
|
||||||
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
|
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
|
||||||
- deps-MINGW -> ci\build.ps1
|
- C:\projects\nvim-deps -> ci\build.ps1
|
||||||
- deps-MSVC -> ci\build.ps1
|
- C:\projects\nvim-deps -> third-party\**
|
||||||
- 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
|
||||||
|
|
20
ci/build.ps1
20
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,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 ($compiler -eq 'MINGW') {
|
||||||
if ($bits -eq 32) {
|
if ($bits -eq 32) {
|
||||||
$arch = 'i686'
|
$arch = 'i686'
|
||||||
|
@ -87,13 +92,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