Skip to content

Commit e7c6ed6

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#21551: ci: Move Windows MSVC build from AppVeyor to Cirrus
97292b1 ci: Drop AppVeyor CI integration (Hennadii Stepanov) 1fb7079 ci: Add Windows task to Cirrus CI (Hennadii Stepanov) Pull request description: This PR: - gets rid off unreliable AppVeyor CI - places all CI configs in one place - allows to enable functional tests in the future (using a persistent worker) | no populated `vcpkg` cache | populated `vcpkg` cache | |---|---| | ![Screenshot from 2021-09-02 15-47-04](https://user-images.githubusercontent.com/32963518/131846156-9367bffc-9093-40ca-98c3-15db74e24113.png) | ![Screenshot from 2021-09-02 14-06-26](https://user-images.githubusercontent.com/32963518/131833053-a501454d-eecf-463c-a3a4-b89d2a494058.png) | Currently, AppVeyor builds take about 44..48 minutes. ACKs for top commit: sipsorcery: re-ACK 97292b1. Tree-SHA512: 3af50d9fd68eb12f39724810dacf948e4068573b5dfd0dbaeb05d19d4bd6f10bd9a432656dcc32b742684b438d31305eace85c602296d7a1bf84b2f1fcc06f02
2 parents 9393666 + 97292b1 commit e7c6ed6

File tree

5 files changed

+75
-95
lines changed

5 files changed

+75
-95
lines changed

.appveyor.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.cirrus.yml

Lines changed: 72 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
1818
persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/
1919

2020
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
21-
base_template: &BASE_TEMPLATE
21+
filter_template: &FILTER_TEMPLATE
2222
skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
23+
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
24+
25+
base_template: &BASE_TEMPLATE
26+
<< : *FILTER_TEMPLATE
2327
merge_base_script:
2428
# Unconditionally install git (used in fingerprint_script) and set the
2529
# default git author name (used in verify-commits.py)
@@ -29,7 +33,6 @@ base_template: &BASE_TEMPLATE
2933
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
3034
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
3135
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
32-
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
3336

3437
main_template: &MAIN_TEMPLATE
3538
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
@@ -59,22 +62,6 @@ compute_credits_template: &CREDITS_TEMPLATE
5962
# Only use credits for pull requests to the main repo
6063
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
6164

62-
#task:
63-
# name: "Windows"
64-
# windows_container:
65-
# image: cirrusci/windowsservercore:2019
66-
# env:
67-
# CIRRUS_SHELL: powershell
68-
# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%'
69-
# PYTHONUTF8: 1
70-
# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
71-
# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
72-
# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
73-
# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
74-
# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
75-
# install_script:
76-
# - choco install python --version=3.7.7 -y
77-
7865
task:
7966
name: 'lint [bionic]'
8067
<< : *BASE_TEMPLATE
@@ -89,6 +76,73 @@ task:
8976
env:
9077
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
9178

79+
task:
80+
name: "Win64 native [unit tests, no functional tests] [msvc]"
81+
<< : *FILTER_TEMPLATE
82+
windows_container:
83+
cpu: 4
84+
memory: 16G
85+
image: cirrusci/windowsservercore:visualstudio2019
86+
timeout_in: 120m
87+
env:
88+
CIRRUS_SHELL: powershell
89+
PATH: 'C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
90+
PYTHONUTF8: 1
91+
VCPKG_TAG: '75522bb1f2e7d863078bcd06322348f053a9e33f'
92+
VCPKG_FEATURE_FLAGS: 'manifests'
93+
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt51211x64_static_vs2019_160900/Qt5.12.11_x64_static_vs2019_160900.zip'
94+
QT_DOWNLOAD_HASH: 'b24436bbc49ac69d992efc148e640f02e8dec426bed5f8497abf735e7d7d59d0'
95+
QT_LOCAL_PATH: 'C:\Qt5.12.11_x64_static_vs2019_160900'
96+
IgnoreWarnIntDirInTempDetected: 'true'
97+
merge_script:
98+
- git config --global user.email "[email protected]"
99+
- git config --global user.name "ci"
100+
- git config core.filemode false
101+
- git reset --hard
102+
- if ($env:CIRRUS_PR -eq $null) { exit 0; }
103+
- git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH
104+
- git merge FETCH_HEAD
105+
vcpkg_cache:
106+
folder: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
107+
install_python_script:
108+
- choco install --yes --no-progress python3 --version=3.9.6
109+
- Write-Host ""
110+
- python -VV
111+
install_vcpkg_script:
112+
- cd ..
113+
- git clone --quiet https://github.com/microsoft/vcpkg.git
114+
- cd vcpkg
115+
- git -c advice.detachedHead=false checkout $env:VCPKG_TAG
116+
- .\bootstrap-vcpkg -disableMetrics
117+
- Add-Content "triplets\x64-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
118+
- .\vcpkg integrate install
119+
- Write-Host ""
120+
- .\vcpkg version
121+
download_qt_binaries_script: |
122+
Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
123+
Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
124+
if ((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
125+
Write-Host "Downloaded Qt binaries archive matched the expected hash.";
126+
Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
127+
}
128+
else {
129+
Write-Host "ERROR: Downloaded Qt binaries archive did not match the expected hash.";
130+
exit 1;
131+
}
132+
build_environment_script:
133+
- choco list --localonly
134+
- Write-Host ""
135+
- msbuild -version
136+
build_script:
137+
- cd $env:CIRRUS_WORKING_DIR
138+
- python build_msvc\msvc-autogen.py
139+
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
140+
unit_tests_script:
141+
- src\test_bitcoin.exe
142+
- src\bench_bitcoin.exe > $null
143+
- python test\util\test_runner.py
144+
- python test\util\rpcauth-test.py
145+
92146
task:
93147
name: 'ARM [unit tests, no functional tests] [buster]'
94148
<< : *GLOBAL_TASK_TEMPLATE

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trim_trailing_whitespace = true
1313
[*.{h,cpp,py,sh}]
1414
indent_size = 4
1515

16-
# .cirrus.yml, .appveyor.yml, .fuzzbuzz.yml, etc.
16+
# .cirrus.yml, .fuzzbuzz.yml, etc.
1717
[*.yml]
1818
indent_size = 2
1919

build_msvc/README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ In order to build Bitcoin Core a static build of Qt is required. The runtime lib
3939

4040
Some prebuilt x64 versions of Qt can be downloaded from [here](https://github.com/sipsorcery/qt_win_binary/releases). Please be aware these downloads are NOT officially sanctioned by Bitcoin Core and are provided for developer convenience only. They should NOT be used for builds that will be used in a production environment or with real funds.
4141

42-
To determine which Qt prebuilt version to download open the `.appveyor.yml` file and note the `QT_DOWNLOAD_URL`. When extracting the zip file the destination path must be set to `C:\`. This is due to the way that Qt includes, libraries and tools use internal paths.
42+
To determine which Qt prebuilt version to download open the `.cirrus.yml` file and note the `QT_DOWNLOAD_URL`. When extracting the zip file the destination path must be set to `C:\`. This is due to the way that Qt includes, libraries and tools use internal paths.
4343

4444
To build Bitcoin Core without Qt unload or disable the `bitcoin-qt`, `libbitcoin_qt` and `test_bitcoin-qt` projects.
4545

@@ -65,17 +65,6 @@ msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
6565

6666
- Alternatively, open the `build_msvc/bitcoin.sln` file in Visual Studio 2019.
6767

68-
AppVeyor
69-
---------------------
70-
The .appveyor.yml in the root directory is suitable to perform builds on [AppVeyor](https://www.appveyor.com/) Continuous Integration servers. The simplest way to perform an AppVeyor build is to fork Bitcoin Core and then configure a new AppVeyor Project pointing to the forked repository.
71-
72-
For safety reasons the Bitcoin Core .appveyor.yml file has the artifact options disabled. The build will be performed but no executable files will be available. To enable artifacts on a forked repository uncomment the lines shown below:
73-
74-
```
75-
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
76-
#- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip
77-
```
78-
7968
Security
8069
---------------------
8170
[Base address randomization](https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=msvc-160) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.

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.12.11_x64_static_vs2019_16101</QtBaseDir>
5+
<QtBaseDir>C:\Qt5.12.11_x64_static_vs2019_160900</QtBaseDir>
66
<QtPluginsLibraryDir>$(QtBaseDir)\plugins</QtPluginsLibraryDir>
77
<QtLibraryDir>$(QtBaseDir)\lib</QtLibraryDir>
88
<QtIncludeDir>$(QtBaseDir)\include</QtIncludeDir>

0 commit comments

Comments
 (0)