From c0e608a68d70a880257490b7c248b5defce84538 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 8 Jun 2024 11:42:33 +0100 Subject: [PATCH 1/6] ci: Delete no longer needed workaround in native Windows job See https://github.com/actions/runner-images/issues/9701. --- .github/workflows/ci.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2005c22b50..efcd0b6f99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,37 +105,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Fix Visual Studio installation - # See: https://github.com/actions/runner-images/issues/7832#issuecomment-1617585694. - run: | - Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" - $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" - $componentsToRemove= @( - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM64.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.x86.x64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.x86.x64.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM64.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM64.Spectre" - ) - [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_} - $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') - # should be run twice - $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden - $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden - - name: Configure Developer Command Prompt for Microsoft Visual C++ # Using microsoft/setup-msbuild is not enough. uses: ilammy/msvc-dev-cmd@v1 From 5cbb35b529482831ee0eeb21ab5f131620ea42c3 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 8 Jun 2024 11:29:13 +0100 Subject: [PATCH 2/6] build, msvc: Update vcpkg baseline --- build_msvc/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_msvc/vcpkg.json b/build_msvc/vcpkg.json index 3557269be0..95e2167251 100644 --- a/build_msvc/vcpkg.json +++ b/build_msvc/vcpkg.json @@ -14,7 +14,7 @@ }, "zeromq" ], - "builtin-baseline": "f14984af3738e69f197bf0e647a8dca12de92996", + "builtin-baseline": "9edb1b8e590cc086563301d735cae4b6e732d2d2", "overrides": [ { "name": "libevent", From 91a2b37407379917d4cec7f9a95e2f452910213f Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 29 Nov 2023 12:08:37 +0000 Subject: [PATCH 3/6] build: disable external-signer for Windows It's come to light that Boost ASIO (a Boost Process sub dep) has in some instances, been queitly initialising our network stack on Windows (see PR #28486 and discussion in #28940). This has been shielding a bug in our own code, but the larger issue is that Boost Process/ASIO is running code before main, and doing things like setting up networking. This undermines our own assumptions about how our binary works, happens before we get to run any sanity checks, and also runs before we call our own code to setup networking. It's also not clear why a feature like external signer would have a dependency that would be doing anything network/socket related, given it only exists to spawn a local process. --- build_msvc/bitcoin_config.h.in | 3 --- build_msvc/bitcoind/bitcoind.vcxproj | 2 +- build_msvc/vcpkg.json | 2 +- configure.ac | 16 +++++++++++++--- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/build_msvc/bitcoin_config.h.in b/build_msvc/bitcoin_config.h.in index 1716647486..ec69307f50 100644 --- a/build_msvc/bitcoin_config.h.in +++ b/build_msvc/bitcoin_config.h.in @@ -41,9 +41,6 @@ /* Define this symbol to enable ZMQ functions */ #define ENABLE_ZMQ 1 -/* define if external signer support is enabled (requires Boost::Process) */ -#define ENABLE_EXTERNAL_SIGNER /**/ - /* Define to 1 if you have the declaration of `be16toh', and to 0 if you don't. */ #define HAVE_DECL_BE16TOH 0 diff --git a/build_msvc/bitcoind/bitcoind.vcxproj b/build_msvc/bitcoind/bitcoind.vcxproj index bb61865e14..8d9b645070 100644 --- a/build_msvc/bitcoind/bitcoind.vcxproj +++ b/build_msvc/bitcoind/bitcoind.vcxproj @@ -82,7 +82,7 @@ + Replace="@ENABLE_EXTERNAL_SIGNER_TRUE@" By="#"> diff --git a/build_msvc/vcpkg.json b/build_msvc/vcpkg.json index 95e2167251..c640c59ebd 100644 --- a/build_msvc/vcpkg.json +++ b/build_msvc/vcpkg.json @@ -3,8 +3,8 @@ "version-string": "1", "dependencies": [ "berkeleydb", + "boost-date-time", "boost-multi-index", - "boost-process", "boost-signals2", "boost-test", "sqlite3", diff --git a/configure.ac b/configure.ac index a7902abbea..cd3a218e36 100644 --- a/configure.ac +++ b/configure.ac @@ -1520,9 +1520,19 @@ if test "$use_external_signer" != "no"; then CXXFLAGS="$TEMP_CXXFLAGS" AC_MSG_RESULT([$have_boost_process]) if test "$have_boost_process" = "yes"; then - use_external_signer="yes" - AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled]) - AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem]) + case $host in + dnl Boost Process for Windows uses Boost ASIO. Boost ASIO performs + dnl pre-main init of Windows networking libraries, which we do not + dnl want. + *mingw*) + use_external_signer="no" + ;; + *) + use_external_signer="yes" + AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled]) + AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem]) + ;; + esac else if test "$use_external_signer" = "yes"; then AC_MSG_ERROR([External signing is not supported for this Boost version]) From 6a4f0273dccc2787705b1498e220603abdaf22b5 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 8 Jun 2024 15:40:05 +0100 Subject: [PATCH 4/6] ci: Disable benchmarks for "Win64 native" job Can be reverted back after syncing the QML repository with the main one. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efcd0b6f99..3cdf6b5bbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -235,9 +235,6 @@ jobs: - name: Run unit tests run: src\test_bitcoin.exe -l test_suite - - name: Run benchmarks - run: src\bench_bitcoin.exe -sanity-check - - name: Run util tests run: py -3 test\util\test_runner.py From 568dbbe1f25ef6be5c32b9f96b05e5ca6b4106db Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 8 Jun 2024 09:31:46 +0100 Subject: [PATCH 5/6] ci: Disable fuzz tests for "macOS 13 native" job Fuzz tests cause timeout for reasons unrelated to the QML GUI development. Can be reverted back after syncing the QML repository with the main one. --- ci/test/00_setup_env_mac_native.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh index c9f65bf397..b1cae5392f 100755 --- a/ci/test/00_setup_env_mac_native.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -14,5 +14,3 @@ export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" export CCACHE_MAXSIZE=400M -export RUN_FUZZ_TESTS=true -export FUZZ_TESTS_CONFIG="--exclude banman" # https://github.com/bitcoin/bitcoin/issues/27924 From d04cfc9e72c6955b76e62ae28995207ef0dc6033 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 8 Jun 2024 11:38:23 +0100 Subject: [PATCH 6/6] ci: Set `IN_GETOPT_BIN` environment variable for native macOS job --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cdf6b5bbd..0c369553a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,8 +62,10 @@ jobs: - name: Install Homebrew packages run: brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt - - name: Set Ccache directory - run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" + - name: Set environment variables + run: | + echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" + echo "IN_GETOPT_BIN=$(brew --prefix gnu-getopt)/bin/getopt" >> "$GITHUB_ENV" - name: Restore Ccache cache uses: actions/cache/restore@v4