From a49162ffae5302b036c1e91dfd808c2ea8a9830a Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:52:43 +0000 Subject: [PATCH 1/5] merge bitcoin#27314: Fix handling of `CXX=clang++` when building `qt` package --- depends/packages/qt.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 2333cc883107b..6cb6e53ed74e5 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -159,9 +159,15 @@ $(package)_config_opts_linux += -dbus-runtime ifneq ($(LTO),) $(package)_config_opts_linux += -ltcg endif -$(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ -ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx))) -$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++ + +ifneq (,$(findstring clang,$($(package)_cxx))) + ifneq (,$(findstring -stdlib=libc++,$($(package)_cxx))) + $(package)_config_opts_linux += -platform linux-clang-libc++ -xplatform linux-clang-libc++ + else + $(package)_config_opts_linux += -platform linux-clang -xplatform linux-clang + endif +else + $(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ endif $(package)_config_opts_mingw32 = -no-opengl From 4f1b5c165ba8a632e069540b2a330ccf09a497f6 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:14:08 +0000 Subject: [PATCH 2/5] merge bitcoin#28954: Reduce use of bash -c --- ci/dash/test_integrationtests.sh | 2 +- ci/dash/test_unittests.sh | 4 ++-- ci/test/00_setup_env.sh | 1 - ci/test/00_setup_env_native_multiprocess.sh | 2 +- ci/test/00_setup_env_s390x.sh | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ci/dash/test_integrationtests.sh b/ci/dash/test_integrationtests.sh index 8a0013b1a94d8..86a00c8f1b0ce 100755 --- a/ci/dash/test_integrationtests.sh +++ b/ci/dash/test_integrationtests.sh @@ -42,7 +42,7 @@ echo "Using socketevents mode: $SOCKETEVENTS" EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS" set +e -LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ${TEST_RUNNER_ENV} ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS +LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS RESULT=$? set -e diff --git a/ci/dash/test_unittests.sh b/ci/dash/test_unittests.sh index b3212327107fd..37a0a4575e079 100755 --- a/ci/dash/test_unittests.sh +++ b/ci/dash/test_unittests.sh @@ -29,8 +29,8 @@ if [ "$DIRECT_WINE_EXEC_TESTS" = "true" ]; then wine ./src/test/test_dash.exe else if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then - ${TEST_RUNNER_ENV} ./src/test/test_dash --catch_system_errors=no -l test_suite + ./src/test/test_dash --catch_system_errors=no -l test_suite else - ${TEST_RUNNER_ENV} make $MAKEJOBS check VERBOSE=1 + make $MAKEJOBS check VERBOSE=1 fi fi diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 587dfc2bfefa6..2023705cf8163 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -44,7 +44,6 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false} # This is needed because some ci machines have slow CPU or disk, so sanitizers # might be slow or a reindex might be waiting on disk IO. export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4} -export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-} export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false} export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000} diff --git a/ci/test/00_setup_env_native_multiprocess.sh b/ci/test/00_setup_env_native_multiprocess.sh index 743e30e6c0a6f..7029ea539515e 100755 --- a/ci/test/00_setup_env_native_multiprocess.sh +++ b/ci/test/00_setup_env_native_multiprocess.sh @@ -12,4 +12,4 @@ export DEP_OPTS="DEBUG=1 MULTIPROCESS=1" export GOAL="install" export TEST_RUNNER_EXTRA="--v2transport" export BITCOIN_CONFIG="--with-boost-process --enable-debug CC=clang CXX=clang++" # Use clang to avoid OOM -export TEST_RUNNER_ENV="BITCOIND=dash-node" +export BITCOIND=dash-node # Used in functional tests diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh index c71a4891b9f19..a46bde95b5584 100755 --- a/ci/test/00_setup_env_s390x.sh +++ b/ci/test/00_setup_env_s390x.sh @@ -19,7 +19,6 @@ fi # Use debian to avoid 404 apt errors export CONTAINER_NAME=ci_s390x export RUN_UNIT_TESTS=true -export TEST_RUNNER_ENV="LC_ALL=C" export RUN_FUNCTIONAL_TESTS=true export GOAL="install" export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --with-boost-process" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730 From d0131a52598f465c3443dc863695f4362da86912 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:12:04 +0000 Subject: [PATCH 3/5] trivial: sort `BUILD_TARGET` on GitHub and in `matrix.sh` alphabetically --- .github/workflows/build.yml | 12 ++++++------ ci/dash/matrix.sh | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 75d319b09f9c0..514032ec92414 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,22 +114,22 @@ jobs: - build_target: linux64 host: x86_64-pc-linux-gnu depends_on: linux64 - - build_target: linux64_tsan - host: x86_64-pc-linux-gnu - depends_on: linux64 - - build_target: linux64_ubsan + - build_target: linux64_cxx20 host: x86_64-pc-linux-gnu depends_on: linux64 - build_target: linux64_fuzz host: x86_64-pc-linux-gnu depends_on: linux64 - - build_target: linux64_cxx20 + - build_target: linux64_nowallet host: x86_64-pc-linux-gnu depends_on: linux64 - build_target: linux64_sqlite host: x86_64-pc-linux-gnu depends_on: linux64 - - build_target: linux64_nowallet + - build_target: linux64_tsan + host: x86_64-pc-linux-gnu + depends_on: linux64 + - build_target: linux64_ubsan host: x86_64-pc-linux-gnu depends_on: linux64 container: diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index 82a9233df17b9..6eeb2a7565317 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -18,28 +18,28 @@ export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ if [ "$BUILD_TARGET" = "arm-linux" ]; then source ./ci/test/00_setup_env_arm.sh -elif [ "$BUILD_TARGET" = "win64" ]; then - source ./ci/test/00_setup_env_win64.sh elif [ "$BUILD_TARGET" = "linux64" ]; then source ./ci/test/00_setup_env_native_qt5.sh elif [ "$BUILD_TARGET" = "linux64_asan" ]; then source ./ci/test/00_setup_env_native_asan.sh -elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then - source ./ci/test/00_setup_env_native_tsan.sh -elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then - source ./ci/test/00_setup_env_native_ubsan.sh -elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then - source ./ci/test/00_setup_env_native_fuzz.sh elif [ "$BUILD_TARGET" = "linux64_cxx20" ]; then source ./ci/test/00_setup_env_native_cxx20.sh -elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then - source ./ci/test/00_setup_env_native_sqlite.sh +elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then + source ./ci/test/00_setup_env_native_fuzz.sh elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then source ./ci/test/00_setup_env_native_nowallet.sh +elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then + source ./ci/test/00_setup_env_native_sqlite.sh +elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then + source ./ci/test/00_setup_env_native_tsan.sh +elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then + source ./ci/test/00_setup_env_native_ubsan.sh elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then source ./ci/test/00_setup_env_native_valgrind.sh elif [ "$BUILD_TARGET" = "mac" ]; then source ./ci/test/00_setup_env_mac.sh elif [ "$BUILD_TARGET" = "s390x" ]; then source ./ci/test/00_setup_env_s390x.sh +elif [ "$BUILD_TARGET" = "win64" ]; then + source ./ci/test/00_setup_env_win64.sh fi From 26cc5a1c90e1bfc9fc2a6ac19a9646efce305cdf Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:30:38 +0000 Subject: [PATCH 4/5] ci: use underscore to separate variant name from target triple --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae521f655b56c..c612899f73f8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,13 +193,13 @@ x86_64-w64-mingw32: variables: HOST: x86_64-w64-mingw32 -x86_64-pc-linux-gnu-debug: +x86_64-pc-linux-gnu_debug: extends: .build-depends-template variables: HOST: x86_64-pc-linux-gnu DEP_OPTS: "DEBUG=1" -x86_64-pc-linux-gnu-nowallet: +x86_64-pc-linux-gnu_nowallet: extends: - .build-depends-template - .skip-in-fast-mode-template @@ -207,7 +207,7 @@ x86_64-pc-linux-gnu-nowallet: HOST: x86_64-pc-linux-gnu DEP_OPTS: "NO_WALLET=1" -x86_64-pc-linux-gnu-multiprocess: +x86_64-pc-linux-gnu_multiprocess: extends: - .build-depends-template - .skip-in-fast-mode-template @@ -243,7 +243,7 @@ win64-build: linux64-build: extends: .build-template needs: - - x86_64-pc-linux-gnu-debug + - x86_64-pc-linux-gnu_debug variables: BUILD_TARGET: linux64 @@ -252,7 +252,7 @@ linux64_cxx20-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-debug + - x86_64-pc-linux-gnu_debug variables: BUILD_TARGET: linux64_cxx20 @@ -261,7 +261,7 @@ linux64_sqlite-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-debug + - x86_64-pc-linux-gnu_debug variables: BUILD_TARGET: linux64_sqlite @@ -270,7 +270,7 @@ linux64_fuzz-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-debug + - x86_64-pc-linux-gnu_debug variables: BUILD_TARGET: linux64_fuzz @@ -279,7 +279,7 @@ linux64_fuzz-build: # - .build-template # - .skip-in-fast-mode-template # needs: -# - x86_64-pc-linux-gnu-debug +# - x86_64-pc-linux-gnu_debug # variables: # BUILD_TARGET: linux64_asan @@ -288,7 +288,7 @@ linux64_tsan-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-debug + - x86_64-pc-linux-gnu_debug variables: BUILD_TARGET: linux64_tsan @@ -297,7 +297,7 @@ linux64_ubsan-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-debug + - x86_64-pc-linux-gnu_debug variables: BUILD_TARGET: linux64_ubsan @@ -306,7 +306,7 @@ linux64_nowallet-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-nowallet + - x86_64-pc-linux-gnu_nowallet variables: BUILD_TARGET: linux64_nowallet @@ -315,7 +315,7 @@ linux64_multiprocess-build: - .build-template - .skip-in-fast-mode-template needs: - - x86_64-pc-linux-gnu-multiprocess + - x86_64-pc-linux-gnu_multiprocess variables: BUILD_TARGET: linux64_multiprocess @@ -324,7 +324,7 @@ linux64_multiprocess-build: # - .build-template # - .skip-in-fast-mode-template # needs: -# - x86_64-pc-linux-gnu-debug +# - x86_64-pc-linux-gnu_debug # variables: # BUILD_TARGET: linux64_valgrind From 27d9763b1b76d96d936628df72f9e5aef5b1718a Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:20:56 +0000 Subject: [PATCH 5/5] fix: add `linux64_multiprocess` `BUILD_TARGET` to matrix, mend C(XX) --- .gitlab-ci.yml | 2 +- ci/dash/matrix.sh | 2 ++ ci/test/00_setup_env_native_multiprocess.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c612899f73f8f..27fc871dd1982 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,7 +213,7 @@ x86_64-pc-linux-gnu_multiprocess: - .skip-in-fast-mode-template variables: HOST: x86_64-pc-linux-gnu - DEP_OPTS: "MULTIPROCESS=1" + DEP_OPTS: "DEBUG=1 MULTIPROCESS=1" x86_64-apple-darwin: extends: diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index 6eeb2a7565317..9822a727890b5 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -26,6 +26,8 @@ elif [ "$BUILD_TARGET" = "linux64_cxx20" ]; then source ./ci/test/00_setup_env_native_cxx20.sh elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then source ./ci/test/00_setup_env_native_fuzz.sh +elif [ "$BUILD_TARGET" = "linux64_multiprocess" ]; then + source ./ci/test/00_setup_env_native_multiprocess.sh elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then source ./ci/test/00_setup_env_native_nowallet.sh elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then diff --git a/ci/test/00_setup_env_native_multiprocess.sh b/ci/test/00_setup_env_native_multiprocess.sh index 7029ea539515e..d23fae22b51ff 100755 --- a/ci/test/00_setup_env_native_multiprocess.sh +++ b/ci/test/00_setup_env_native_multiprocess.sh @@ -11,5 +11,5 @@ export PACKAGES="cmake python3 llvm clang" export DEP_OPTS="DEBUG=1 MULTIPROCESS=1" export GOAL="install" export TEST_RUNNER_EXTRA="--v2transport" -export BITCOIN_CONFIG="--with-boost-process --enable-debug CC=clang CXX=clang++" # Use clang to avoid OOM +export BITCOIN_CONFIG="--with-boost-process --enable-debug CC=clang-16 CXX=clang++-16" # Use clang to avoid OOM export BITCOIND=dash-node # Used in functional tests