Skip to content

Commit d9acd86

Browse files
author
MarcoFalke
committed
Merge #14241: appveyor: script improvement
59a50c2 appveyor: trivial build cache modifications (Chun Kuan Lee) Pull request description: - Reduce cache size from 1.55GB to 170MB by disabling whole program optimization. - The `*.iobj` `*.ipdb` cache is no longer required because of above change. - Clearing cache hit stats instead of deleting clcache stats.txt file - Enable access time on Windows so clcache would work correctly - Reduce max cache size from 2GB to 512MB (Uncompressed) - Remove unnecessary `boost-interprocess` vcpkg package - Split some command into multiple lines to make it easier to know what commands do. Tree-SHA512: 070b3ee05cd4323cef6fdab5ca0f223a5aa178f09b64d41fa39d0495f9bf3a387eadd10f5b72a2cd5b6f91579f19f595450fcf0afc05d7c5f6059a79fefaadc0
2 parents 02a0242 + 59a50c2 commit d9acd86

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.appveyor.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ platform: x64
66
environment:
77
APPVEYOR_SAVE_CACHE_ON_ERROR: true
88
CLCACHE_SERVER: 1
9-
PACKAGES: boost-filesystem boost-signals2 boost-interprocess boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb
9+
PACKAGES: boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb
1010
PYTHONIOENCODING: utf-8
1111
cache:
1212
- C:\tools\vcpkg\installed
1313
- C:\Users\appveyor\clcache
14-
- build_msvc\cache
1514
init:
1615
- cmd: set PATH=C:\Python36-x64;C:\Python36-x64\Scripts;%PATH%
1716
install:
@@ -23,32 +22,39 @@ install:
2322
$env:ALL_PACKAGES += $packages[$i] + ":" + $env:PLATFORM + "-windows-static "
2423
}
2524
- 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
25+
- cmd: C:\Tools\vcpkg\bootstrap-vcpkg.bat
26+
- cmd: vcpkg remove --recurse --outdated
2627
- cmd: vcpkg install %ALL_PACKAGES%
27-
- cmd: vcpkg upgrade --no-dry-run
2828
- cmd: del /s /q C:\Tools\vcpkg\installed\%PLATFORM%-windows-static\debug # Remove unused debug library
2929
before_build:
30-
- cmd: if not exist build_msvc\cache\ (del build_msvc\cache & mkdir build_msvc\cache)
31-
- cmd: if not exist build_msvc\%PLATFORM%\%CONFIGURATION%\ (mkdir build_msvc\%PLATFORM%\%CONFIGURATION%)
32-
- cmd: if exist build_msvc\cache\*.iobj (move build_msvc\cache\* build_msvc\%PLATFORM%\%CONFIGURATION%\)
33-
- cmd: clcache -M 2147483648
30+
- ps: clcache -M 536870912
3431
- cmd: python build_msvc\msvc-autogen.py
3532
- ps: $files = (Get-ChildItem -Recurse | where {$_.extension -eq ".vcxproj"}).FullName
36-
- ps: for ($i = 0; $i -lt $files.length; $i++) {
37-
(Get-Content $files[$i]).Replace("</RuntimeLibrary>", "</RuntimeLibrary><DebugInformationFormat>None</DebugInformationFormat>").Replace("NDEBUG;", "") | Set-Content $files[$i]
33+
- ps: for (${i} = 0; ${i} -lt ${files}.length; ${i}++) {
34+
${content} = (Get-Content ${files}[${i}]);
35+
${content} = ${content}.Replace("</RuntimeLibrary>", "</RuntimeLibrary><DebugInformationFormat>None</DebugInformationFormat>");
36+
${content} = ${content}.Replace("<WholeProgramOptimization>true", "<WholeProgramOptimization>false");
37+
${content} = ${content}.Replace("NDEBUG;", "");
38+
Set-Content ${files}[${i}] ${content};
3839
}
3940
- ps: Start-Process clcache-server
41+
- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
4042
build_script:
4143
- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
4244
after_build:
43-
- cmd: move build_msvc\%PLATFORM%\%CONFIGURATION%\*.iobj build_msvc\cache\
44-
- cmd: move build_msvc\%PLATFORM%\%CONFIGURATION%\*.ipdb build_msvc\cache\
45-
- cmd: del C:\Users\appveyor\clcache\stats.txt
45+
- ps: fsutil behavior set disablelastaccess 0 # Disable Access time feature on Windows (better performance)
46+
- ps: clcache -z
4647
before_test:
4748
- ps: ${conf_ini} = (Get-Content([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini.in")))
48-
- ps: ${conf_ini} = $conf_ini.Replace("@abs_top_srcdir@", ${env:APPVEYOR_BUILD_FOLDER}).Replace("@abs_top_builddir@", ${env:APPVEYOR_BUILD_FOLDER}).Replace("@EXEEXT@", ".exe")
49-
- ps: ${conf_ini} = $conf_ini.Replace("@ENABLE_WALLET_TRUE@", "").Replace("@BUILD_BITCOIN_CLI_TRUE@", "").Replace("@BUILD_BITCOIND_TRUE@", "").Replace("@ENABLE_ZMQ_TRUE@", "")
49+
- ps: ${conf_ini} = ${conf_ini}.Replace("@abs_top_srcdir@", ${env:APPVEYOR_BUILD_FOLDER})
50+
- ps: ${conf_ini} = ${conf_ini}.Replace("@abs_top_builddir@", ${env:APPVEYOR_BUILD_FOLDER})
51+
- ps: ${conf_ini} = ${conf_ini}.Replace("@EXEEXT@", ".exe")
52+
- ps: ${conf_ini} = ${conf_ini}.Replace("@ENABLE_WALLET_TRUE@", "")
53+
- ps: ${conf_ini} = ${conf_ini}.Replace("@BUILD_BITCOIN_CLI_TRUE@", "")
54+
- ps: ${conf_ini} = ${conf_ini}.Replace("@BUILD_BITCOIND_TRUE@", "")
55+
- ps: ${conf_ini} = ${conf_ini}.Replace("@ENABLE_ZMQ_TRUE@", "")
5056
- ps: ${utf8} = New-Object System.Text.UTF8Encoding ${false}
51-
- ps: '[IO.File]::WriteAllLines([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini"), $conf_ini, ${utf8})'
57+
- ps: '[IO.File]::WriteAllLines([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini"), ${conf_ini}, ${utf8})'
5258
- ps: move "build_msvc\${env:PLATFORM}\${env:CONFIGURATION}\*.exe" src
5359
test_script:
5460
- cmd: src\test_bitcoin.exe

0 commit comments

Comments
 (0)