Merge #14665: appveyor: Script improvement part II

99d33a6bec appveyor: Script improvement part II (Chun Kuan Lee)

Pull request description:

  - decrease clone depth to 5
  - Upgrade to python 3.7 that we can use `PYTHONUTF8` from PEP540.
  - Set clcache version to `v4.2.0`
  - Do not fetch the latest vcpkg package (The issue does not exist anymore)
  - Set test_bitcoin report sink and log sink to stdout and redirect stderr to NUL to drop confusing error messages that introduced by #14146
  - discard vcpkg, bench_bitcoin output
  - Set functional test `--failfast` flag
  - Make the log be as clear as possible. (Only ~100 lines)

Tree-SHA512: e7e1f5c2698e8a5d15394edfb4b574508081e99ef4a353995f55657cb51e642567a128d6432a899ecae6f742494c143ac16e2e64df6c26e1e575421ee4a1df50
This commit is contained in:
MarcoFalke 2018-11-07 11:00:40 -05:00
commit 4e6dc7a0ef
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

@ -3,28 +3,21 @@ skip_tags: true
image: Visual Studio 2017 image: Visual Studio 2017
configuration: Release configuration: Release
platform: x64 platform: x64
clone_depth: 5
environment: environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true APPVEYOR_SAVE_CACHE_ON_ERROR: true
CLCACHE_SERVER: 1 CLCACHE_SERVER: 1
PACKAGES: boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb PACKAGES: boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb
PYTHONIOENCODING: utf-8 PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
PYTHONUTF8: 1
cache: cache:
- C:\tools\vcpkg\installed - C:\tools\vcpkg\installed
- C:\Users\appveyor\clcache - C:\Users\appveyor\clcache
init:
- cmd: set PATH=C:\Python36-x64;C:\Python36-x64\Scripts;%PATH%
install: install:
- cmd: pip install git+https://github.com/frerich/clcache.git - cmd: pip install --quiet git+https://github.com/frerich/clcache.git@v4.2.0
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes. # Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
# - cmd: pip install zmq # - cmd: pip install zmq
- ps: $packages = $env:PACKAGES -Split ' ' - cmd: vcpkg install --triplet %PLATFORM%-windows-static %PACKAGES% > NUL
- 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: C:\Tools\vcpkg\bootstrap-vcpkg.bat
- cmd: vcpkg remove --recurse --outdated
- cmd: vcpkg install %ALL_PACKAGES%
- cmd: del /s /q C:\Tools\vcpkg\installed\%PLATFORM%-windows-static\debug # Remove unused debug library - cmd: del /s /q C:\Tools\vcpkg\installed\%PLATFORM%-windows-static\debug # Remove unused debug library
before_build: before_build:
- ps: clcache -M 536870912 - ps: clcache -M 536870912
@ -42,7 +35,7 @@ before_build:
build_script: build_script:
- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo - cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
after_build: after_build:
- ps: fsutil behavior set disablelastaccess 0 # Disable Access time feature on Windows (better performance) - ps: fsutil behavior set disablelastaccess 1 # Disable Access time feature on Windows (better performance)
- ps: clcache -z - ps: clcache -z
before_test: before_test:
- ps: ${conf_ini} = (Get-Content([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini.in"))) - ps: ${conf_ini} = (Get-Content([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini.in")))
@ -57,9 +50,9 @@ before_test:
- ps: '[IO.File]::WriteAllLines([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini"), ${conf_ini}, ${utf8})' - ps: '[IO.File]::WriteAllLines([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini"), ${conf_ini}, ${utf8})'
- ps: move "build_msvc\${env:PLATFORM}\${env:CONFIGURATION}\*.exe" src - ps: move "build_msvc\${env:PLATFORM}\${env:CONFIGURATION}\*.exe" src
test_script: test_script:
- cmd: src\test_bitcoin.exe - cmd: src\test_bitcoin.exe -k stdout -e stdout 2> NUL
- ps: src\bench_bitcoin.exe -evals=1 -scaling=0 - cmd: src\bench_bitcoin.exe -evals=1 -scaling=0 > NUL
- ps: python test\util\bitcoin-util-test.py - ps: python test\util\bitcoin-util-test.py
- cmd: python test\util\rpcauth-test.py - cmd: python test\util\rpcauth-test.py
- cmd: python test\functional\test_runner.py --ci --force --quiet --combinedlogslen=4000 - cmd: python test\functional\test_runner.py --ci --force --quiet --combinedlogslen=4000 --failfast
deploy: off deploy: off