Skip to content

Commit 3c84dee

Browse files
committed
Updated appveyor config:
- Update build image from Visual Studio 2017 to Visual Studio 2019. - Updated Qt static library from Qt5.9.7 to Qt5.9.8. - Added commands to update vcpkg port files (this does not update already installed packages). - Updated vcpkg package list as per #17309. - Removed commands setting common project file options. Now done via common.init.vcxproj include. - Changed msbuild verbosity from normal to quiet. Normal rights a LOT of logs and impacts appveyor job duration. Updated msvc project configs: - Updated platform toolset from v141 to v142. - Updated Qt static library from Qt5.9.7 to Qt5.9.8. - Added ignore for linker warning building bitcoin-qt program. - Added missing util/str.cpp class file to test_bitcoin project file.
1 parent 7967104 commit 3c84dee

File tree

5 files changed

+43
-21
lines changed

5 files changed

+43
-21
lines changed

.appveyor.yml

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,56 @@
11
version: '{branch}.{build}'
22
skip_tags: true
3-
image: Visual Studio 2017
3+
image: Visual Studio 2019
44
configuration: Release
55
platform: x64
66
clone_depth: 5
77
environment:
88
APPVEYOR_SAVE_CACHE_ON_ERROR: true
99
CLCACHE_SERVER: 1
10-
PACKAGES: berkeleydb boost-filesystem boost-signals2 boost-test libevent openssl rapidcheck zeromq double-conversion
10+
PACKAGES: berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl rapidcheck zeromq double-conversion
1111
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
1212
PYTHONUTF8: 1
13-
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.0/Qt5.9.7_ssl_x64_static_vs2017.zip'
14-
QT_DOWNLOAD_HASH: 'D4D35B8112302B67E5610A03421BB3E43FE13F14D9A5F637C22AE60DCEC0E0F5'
15-
QT_LOCAL_PATH: 'C:\Qt5.9.7_ssl_x64_static_vs2017'
13+
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.4/Qt5.9.8_x64_static_vs2019.zip'
14+
QT_DOWNLOAD_HASH: 'f285cbb02bec3b3f3cc2621e3fa7d5edf0d6a66fa30c57859e583acda954ea80'
15+
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
16+
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
1617
cache:
1718
- C:\tools\vcpkg\installed
1819
- C:\Users\appveyor\clcache -> .appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in
19-
- C:\Qt5.9.7_ssl_x64_static_vs2017
20+
- C:\Qt5.9.8_x64_static_vs2019
2021
install:
2122
- cmd: pip install --quiet git+https://github.com/frerich/[email protected]
2223
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
2324
# - cmd: pip install zmq
24-
- cmd: echo set(VCPKG_BUILD_TYPE release) >> C:\tools\vcpkg\triplets\%PLATFORM%-windows-static.cmake
25-
- cmd: vcpkg remove --outdated --recurse
26-
- cmd: vcpkg install --triplet %PLATFORM%-windows-static %PACKAGES% > NUL
25+
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
26+
# 1. If the vcpkg install directory exists assume dependencies are installed and do nothing. To
27+
# force a fresh install of the packages delete the job's appveyor cache.
28+
# 2. Otherwise:
29+
# a. Update the vcpkg source (including port files) and build the vcpkg binary,
30+
# b. Install the required packages.
31+
- ps: |
32+
cd c:\tools\vcpkg
33+
if(!(Test-Path -Path ($env:VCPKG_INSTALL_PATH))) {
34+
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
35+
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
36+
git pull origin master
37+
.\bootstrap-vcpkg.bat
38+
.\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
39+
}
40+
else {
41+
Write-Host "vcpkg packages already installed (to reinstall purge appveyor job's cache)."
42+
}
43+
.\vcpkg integrate install
44+
cd "$env:APPVEYOR_BUILD_FOLDER"
2745
before_build:
2846
- ps: clcache -M 536870912
47+
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:
48+
# 1. If the Qt destination directory exists assume it is correct and do nothing. To
49+
# force a fresh install of the packages delete the job's appveyor cache.
50+
# 2. Otherwise:
51+
# a. Download the zip file with the prebuilt Qt static libraries.
52+
# b. Check that the downloaded file matches the expected hash.
53+
# c. Extract the zip file to the specific destination path expected by the msbuild projects.
2954
- ps: |
3055
if(!(Test-Path -Path ($env:QT_LOCAL_PATH))) {
3156
Write-Host "Downloading Qt binaries.";
@@ -44,17 +69,10 @@ before_build:
4469
Write-Host "Qt binaries already present.";
4570
}
4671
- cmd: python build_msvc\msvc-autogen.py
47-
- ps: $files = (Get-ChildItem -Recurse | where {$_.extension -eq ".vcxproj"}).FullName
48-
- ps: for (${i} = 0; ${i} -lt ${files}.length; ${i}++) {
49-
${content} = (Get-Content ${files}[${i}]);
50-
${content} = ${content}.Replace("</RuntimeLibrary>", "</RuntimeLibrary><DebugInformationFormat>None</DebugInformationFormat>");
51-
${content} = ${content}.Replace("<WholeProgramOptimization>true", "<WholeProgramOptimization>false");
52-
Set-Content ${files}[${i}] ${content};
53-
}
5472
- ps: Start-Process clcache-server
5573
- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
5674
build_script:
57-
- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:n /nologo
75+
- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nologo
5876
after_build:
5977
- ps: fsutil behavior set disablelastaccess 1 # Disable Access time feature on Windows (better performance)
6078
- ps: clcache -z
@@ -64,7 +82,8 @@ test_script:
6482
- cmd: src\bench_bitcoin.exe -evals=1 -scaling=0 > NUL
6583
- ps: python test\util\bitcoin-util-test.py
6684
- cmd: python test\util\rpcauth-test.py
67-
- cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast
85+
# Fee estimation test failing on appveyor with: WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted.
86+
- cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation
6887
artifacts:
6988
#- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip
7089
deploy: off

build_msvc/bitcoin-qt/bitcoin-qt.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
</ClCompile>
5757
<Link>
5858
<AdditionalDependencies>$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
59+
<AdditionalOptions>/ignore:4206</AdditionalOptions>
5960
</Link>
6061
<ResourceCompile>
6162
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
@@ -69,6 +70,7 @@
6970
</ClCompile>
7071
<Link>
7172
<AdditionalDependencies>$(QtDebugLibraries);%(AdditionalDependencies)</AdditionalDependencies>
73+
<AdditionalOptions>/ignore:4206</AdditionalOptions>
7274
</Link>
7375
<ResourceCompile>
7476
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>

build_msvc/common.init.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<LinkIncremental>true</LinkIncremental>
4040
<WholeProgramOptimization>false</WholeProgramOptimization>
4141
<UseDebugLibraries>true</UseDebugLibraries>
42-
<PlatformToolset>v141</PlatformToolset>
42+
<PlatformToolset>v142</PlatformToolset>
4343
<CharacterSet>Unicode</CharacterSet>
4444
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
4545
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
@@ -48,7 +48,7 @@
4848
<LinkIncremental>false</LinkIncremental>
4949
<WholeProgramOptimization>true</WholeProgramOptimization>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v141</PlatformToolset>
51+
<PlatformToolset>v142</PlatformToolset>
5252
<CharacterSet>Unicode</CharacterSet>
5353
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
5454
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>

build_msvc/common.qt.init.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44
<PropertyGroup Label="QtGlobals">
5-
<QtBaseDir>C:\Qt5.9.7_ssl_x64_static_vs2017</QtBaseDir>
5+
<QtBaseDir>C:\Qt5.9.8_x64_static_vs2019</QtBaseDir>
66
<QtPluginsLibraryDir>$(QtBaseDir)\plugins</QtPluginsLibraryDir>
77
<QtLibraryDir>$(QtBaseDir)\lib</QtLibraryDir>
88
<QtIncludeDir>$(QtBaseDir)\include</QtIncludeDir>

build_msvc/test_bitcoin/test_bitcoin.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<ClCompile Include="..\..\src\test\setup_common.cpp" />
1818
<ClCompile Include="..\..\src\test\main.cpp" />
1919
<ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" />
20+
<ClCompile Include="..\..\src\test\util\*.cpp" />
2021
</ItemGroup>
2122
<ItemGroup>
2223
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">

0 commit comments

Comments
 (0)