lbrycrd/appveyor.yml
2018-09-03 23:55:00 +08:00

45 lines
2.2 KiB
YAML

version: '{branch}.{build}'
skip_tags: true
image: Visual Studio 2017
configuration: Release
platform: x64
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
CLCACHE_SERVER: 1
PACKAGES: boost-filesystem boost-signals2 boost-interprocess boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb
cache:
- C:\tools\vcpkg\installed
- C:\Users\appveyor\clcache
- build_msvc\cache
init:
- cmd: set PATH=C:\Python36-x64;C:\Python36-x64\Scripts;%PATH%
install:
- cmd: pip install git+https://github.com/frerich/clcache.git
- ps: $packages = $env:PACKAGES -Split ' '
- ps: for ($i=0; $i -lt $packages.length; $i++) {
$env:ALL_PACKAGES += $packages[$i] + ":" + $env:PLATFORM + "-windows-static "
}
- cmd: git -C C:\Tools\vcpkg pull # This is a temporary fix, can be removed after appveyor update its image to include Microsoft/vcpkg#4046
- cmd: vcpkg install %ALL_PACKAGES%
- cmd: vcpkg upgrade --no-dry-run
- cmd: del /s /q C:\Tools\vcpkg\installed\%PLATFORM%-windows-static\debug # Remove unused debug library
before_build:
- cmd: if not exist build_msvc\cache\ (del build_msvc\cache & mkdir build_msvc\cache)
- cmd: if not exist build_msvc\%PLATFORM%\%CONFIGURATION%\ (mkdir build_msvc\%PLATFORM%\%CONFIGURATION%)
- cmd: if exist build_msvc\cache\*.iobj (move build_msvc\cache\* build_msvc\%PLATFORM%\%CONFIGURATION%\)
- cmd: clcache -M 2147483648
- cmd: python build_msvc\msvc-autogen.py
- ps: $files = (Get-ChildItem -Recurse | where {$_.extension -eq ".vcxproj"}).FullName
- ps: for ($i = 0; $i -lt $files.length; $i++) {
(Get-Content $files[$i]).Replace("</RuntimeLibrary>", "</RuntimeLibrary><DebugInformationFormat>None</DebugInformationFormat>").Replace("NDEBUG;", "") | Set-Content $files[$i]
}
- ps: Start-Process clcache-server
build_script:
- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
after_build:
- cmd: move build_msvc\%PLATFORM%\%CONFIGURATION%\*.iobj build_msvc\cache\
- cmd: move build_msvc\%PLATFORM%\%CONFIGURATION%\*.ipdb build_msvc\cache\
- cmd: del C:\Users\appveyor\clcache\stats.txt
test_script:
- cmd: build_msvc\%PLATFORM%\%CONFIGURATION%\test_bitcoin.exe
deploy: off