@@ -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
3437main_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-
7865task :
7966 name : ' lint [bionic]'
8067 << : *BASE_TEMPLATE
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 "ci@ci.ci"
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 <# Merge base to detect silent merge conflicts # >
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+
92146task :
93147 name : ' ARM [unit tests, no functional tests] [buster]'
94148 << : *GLOBAL_TASK_TEMPLATE
0 commit comments