Skip to content

Commit fe5911e

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25460: ci: Update Windows task image up to visualstudio2022
05b2d9f build: Bump default `PlatformToolset` for Visual Studio 2022 (Hennadii Stepanov) 460c6c7 doc: Make Windows build docs match the CI task (Hennadii Stepanov) 849cf96 ci: Increase CPU number for "Win64 native" task (Hennadii Stepanov) a18c4c1 ci: Bump vcpkg to the latest version (Hennadii Stepanov) b9a5a9b ci: Limit ccache cache size properly on "Win64 native" task (Hennadii Stepanov) 156bc89 ci: Update Windows task image up to visualstudio2022 (Hennadii Stepanov) Pull request description: Besides upgrading Visual Studio, which seems [inevitable](bitcoin/bitcoin#24531 (comment)), this PR also: - bumps vcpkg to the latest version (previous one was in bitcoin/bitcoin#24847) - fixes cache size limit for `ccache` ACKs for top commit: sipsorcery: reACK 05b2d9f. hebasto: > ACK [05b2d9f](bitcoin/bitcoin@05b2d9f) jarolrod: ACK 05b2d9f Tree-SHA512: 6338e74a3f1907f09ca29540e9e2cf7ac3be3b9e28271e8a20e71b67a9c3d5ebb8d34528b9677bcd1d9bc0ad723d68fd2ba7db368443ed1854cca3a3961f294b
2 parents 0dd3477 + 05b2d9f commit fe5911e

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

.cirrus.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,17 @@ task:
9494
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
9595

9696
task:
97-
name: "Win64 native [msvc]"
97+
name: "Win64 native [vs2022]"
9898
<< : *FILTER_TEMPLATE
9999
windows_container:
100-
cpu: 4
100+
cpu: 6
101101
memory: 8G
102-
image: cirrusci/windowsservercore:visualstudio2019
102+
image: cirrusci/windowsservercore:visualstudio2022
103103
timeout_in: 120m
104104
env:
105-
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
105+
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
106106
PYTHONUTF8: 1
107-
CI_VCPKG_TAG: '2022.04.12'
107+
CI_VCPKG_TAG: '2022.06.16.1'
108108
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
109109
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
110110
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
@@ -113,7 +113,7 @@ task:
113113
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
114114
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3'
115115
QTBASEDIR: 'C:\Qt_static'
116-
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
116+
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
117117
QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
118118
IgnoreWarnIntDirInTempDetected: 'true'
119119
merge_script:
@@ -179,7 +179,7 @@ task:
179179
build_script:
180180
- '%x64_NATIVE_TOOLS%'
181181
- cd %CIRRUS_WORKING_DIR%
182-
- ccache --zero-stats
182+
- ccache --zero-stats --max-size=%CCACHE_SIZE%
183183
- python build_msvc\msvc-autogen.py
184184
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
185185
- ccache --show-stats

build_msvc/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Building Bitcoin Core with Visual Studio
33

44
Introduction
55
---------------------
6-
Solution and project files to build Bitcoin Core with `msbuild` or Visual Studio can be found in the `build_msvc` directory. The build has been tested with Visual Studio 2019 (building with earlier versions of Visual Studio should not be expected to work).
6+
Solution and project files to build Bitcoin Core with `msbuild` or Visual Studio can be found in the `build_msvc` directory. The build has been tested with Visual Studio 2022 and Visual Studio 2019 (building with earlier versions of Visual Studio should not be expected to work).
77

88
To build Bitcoin Core from the command-line, it is sufficient to only install the Visual Studio Build Tools component.
99

@@ -30,7 +30,7 @@ To build Bitcoin Core with the GUI, a static build of Qt is required.
3030

3131
1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.3.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
3232

33-
2. Open "x64 Native Tools Command Prompt for VS 2019", and input the following commands:
33+
2. Open "x64 Native Tools Command Prompt for VS 2022", and input the following commands:
3434
```cmd
3535
cd C:\dev\qt-source
3636
mkdir build
@@ -47,21 +47,21 @@ To build Bitcoin Core without Qt, unload or disable the `bitcoin-qt`, `libbitcoi
4747

4848
Building
4949
---------------------
50-
1. Use Python to generate `*.vcxproj` from Makefile:
50+
1. Use Python to generate `*.vcxproj` for the Visual Studio 2022 toolchain from Makefile:
5151

52-
```
53-
PS >py -3 msvc-autogen.py
52+
```cmd
53+
python build_msvc\msvc-autogen.py
5454
```
5555

5656
2. An optional step is to adjust the settings in the `build_msvc` directory and the `common.init.vcxproj` file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. To specify a non-default path to a static Qt package directory, use the `QTBASEDIR` environment variable.
5757

58-
3. To build from the command-line with the Visual Studio 2019 toolchain use:
58+
3. To build from the command-line with the Visual Studio toolchain use:
5959

6060
```cmd
61-
msbuild -property:Configuration=Release -maxCpuCount -verbosity:minimal bitcoin.sln
61+
msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal
6262
```
6363

64-
Alternatively, open the `build_msvc/bitcoin.sln` file in Visual Studio 2019.
64+
Alternatively, open the `build_msvc/bitcoin.sln` file in Visual Studio.
6565

6666
Security
6767
---------------------

build_msvc/msvc-autogen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from shutil import copyfile
1010

1111
SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
12-
DEFAULT_PLATFORM_TOOLSET = R'v142'
12+
DEFAULT_PLATFORM_TOOLSET = R'v143'
1313

1414
libs = [
1515
'libbitcoin_cli',
@@ -93,7 +93,7 @@ def set_properties(vcxproj_filename, placeholder, content):
9393
def main():
9494
parser = argparse.ArgumentParser(description='Bitcoin-core msbuild configuration initialiser.')
9595
parser.add_argument('-toolset', nargs='?', default=DEFAULT_PLATFORM_TOOLSET,
96-
help='Optionally sets the msbuild platform toolset, e.g. v142 for Visual Studio 2019.'
96+
help='Optionally sets the msbuild platform toolset, e.g. v142 for Visual Studio 2019, or v143 for Visual Studio 2022.'
9797
' default is %s.'%DEFAULT_PLATFORM_TOOLSET)
9898
args = parser.parse_args()
9999
set_properties(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), '@TOOLSET@', args.toolset)

0 commit comments

Comments
 (0)