diff --git a/.cirrus.yml b/.cirrus.yml index 2f2474302fb24..a8b1c3c46d1e3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,8 +10,12 @@ env: CCACHE_DIR: "/tmp/ccache_dir" # https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks -base_template: &BASE_TEMPLATE +filter_template: &FILTER_TEMPLATE 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 + stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks + +base_template: &BASE_TEMPLATE + << : *FILTER_TEMPLATE merge_base_script: # Unconditionally install git (used in fingerprint_script) and set the # default git author name (used in verify-commits.py) @@ -21,7 +25,6 @@ base_template: &BASE_TEMPLATE - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH - git merge FETCH_HEAD # Merge base to detect silent merge conflicts - stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks global_task_template: &GLOBAL_TASK_TEMPLATE << : *BASE_TEMPLATE @@ -47,7 +50,6 @@ compute_credits_template: &CREDITS_TEMPLATE # Only use credits for pull requests to the main repo use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'dashpay/dash' && $CIRRUS_PR != "" - task: name: 'lint [bookworm]' << : *BASE_TEMPLATE @@ -63,6 +65,73 @@ task: lint_script: - ./ci/lint_run_all.sh +task: + name: "Win64 native [unit tests, no functional tests] [msvc]" + << : *FILTER_TEMPLATE + windows_container: + cpu: 4 + memory: 16G + image: cirrusci/windowsservercore:visualstudio2019 + timeout_in: 120m + env: + CIRRUS_SHELL: powershell + PATH: 'C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%' + PYTHONUTF8: 1 + VCPKG_TAG: '75522bb1f2e7d863078bcd06322348f053a9e33f' + VCPKG_FEATURE_FLAGS: 'manifests' + QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt51211x64_static_vs2019_160900/Qt5.12.11_x64_static_vs2019_160900.zip' + QT_DOWNLOAD_HASH: 'b24436bbc49ac69d992efc148e640f02e8dec426bed5f8497abf735e7d7d59d0' + QT_LOCAL_PATH: 'C:\Qt5.12.11_x64_static_vs2019_160900' + IgnoreWarnIntDirInTempDetected: 'true' + merge_script: + - git config --global user.email "ci@ci.ci" + - git config --global user.name "ci" + - git config core.filemode false + - git reset --hard + - if ($env:CIRRUS_PR -eq $null) { exit 0; } + - git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH + - git merge FETCH_HEAD + vcpkg_cache: + folder: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives' + install_python_script: + - choco install --yes --no-progress python3 --version=3.9.6 + - Write-Host "" + - python -VV + install_vcpkg_script: + - cd .. + - git clone --quiet https://github.com/microsoft/vcpkg.git + - cd vcpkg + - git -c advice.detachedHead=false checkout $env:VCPKG_TAG + - .\bootstrap-vcpkg -disableMetrics + - Add-Content "triplets\x64-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" + - .\vcpkg integrate install + - Write-Host "" + - .\vcpkg version + download_qt_binaries_script: | + Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip; + Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH..."; + if ((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) { + Write-Host "Downloaded Qt binaries archive matched the expected hash."; + Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH; + } + else { + Write-Host "ERROR: Downloaded Qt binaries archive did not match the expected hash."; + exit 1; + } + build_environment_script: + - choco list --localonly + - Write-Host "" + - msbuild -version + build_script: + - cd $env:CIRRUS_WORKING_DIR + - python build_msvc\msvc-autogen.py + - msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo + unit_tests_script: + - src\test_bitcoin.exe + - src\bench_bitcoin.exe > $null + - python test\util\test_runner.py + - python test\util\rpcauth-test.py + task: name: 'ARM [unit tests, no functional tests] [buster]' << : *GLOBAL_TASK_TEMPLATE diff --git a/.editorconfig b/.editorconfig index 4967e675f642f..ae7e92d1c8a82 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,7 +13,7 @@ trim_trailing_whitespace = true [*.{h,cpp,py,sh}] indent_size = 4 -# .cirrus.yml, .appveyor.yml, .fuzzbuzz.yml, etc. +# .cirrus.yml, .fuzzbuzz.yml, etc. [*.yml] indent_size = 2