Skip to content

Commit

Permalink
Merge #6491: ci: merge bitcoin#27314, bitcoin#28954, fix multiprocess…
Browse files Browse the repository at this point in the history
… builds

27d9763 fix: add `linux64_multiprocess` `BUILD_TARGET` to matrix, mend C(XX) (Kittywhiskers Van Gogh)
26cc5a1 ci: use underscore to separate variant name from target triple (Kittywhiskers Van Gogh)
d0131a5 trivial: sort `BUILD_TARGET` on GitHub and in `matrix.sh` alphabetically (Kittywhiskers Van Gogh)
4f1b5c1 merge bitcoin#28954: Reduce use of bash -c (Kittywhiskers Van Gogh)
a49162f merge bitcoin#27314: Fix handling of `CXX=clang++` when building `qt` package (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * [bitcoin#27314](bitcoin#27314) has been backported in this PR as [bitcoin#25838](bitcoin#25838) (backported in [dash#6384](#6384)) broke Clang depends builds.

  * [bitcoin#28954](bitcoin#28954) has been backported to fix a problem associated with multiprocess runs ([build](https://gitlab.com/dashpay/dash/-/jobs/8396677312#L2921)).

  * Support for multiprocess builds were enabled _proper_ in [dash#6143](#6143) but unfortunately, the configuration params for multiprocess builds were not processed by CI as the build variant was not added to `matrix.sh` ([source](https://github.com/dashpay/dash/blob/6a51ab271dd5b1b839d754337abbf58a99cbdd21/ci/dash/matrix.sh)). This is evident by comparing two variants with Boost::Process enablement (`--with-boost-process`), `linux64_fuzz` ([source](https://github.com/dashpay/dash/blob/6a51ab271dd5b1b839d754337abbf58a99cbdd21/ci/test/00_setup_env_native_fuzz.sh#L19)) and `linux64_multiprocess` ([source](https://github.com/dashpay/dash/blob/6a51ab271dd5b1b839d754337abbf58a99cbdd21/ci/test/00_setup_env_native_multiprocess.sh#L13)).

    Looking at a `develop` (6a51ab2) build, the fuzz build has it enabled ([source](https://gitlab.com/dashpay/dash/-/jobs/8394892905#L737)) while the multiprocess build doesn't ([source](https://gitlab.com/dashpay/dash/-/jobs/8394892909#L1524)) despite both scripts having the enablement argument.

  ## Breaking Changes

  None expected.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK 27d9763
  UdjinM6:
    utACK 27d9763

Tree-SHA512: 3e2fb72d4211875a162d3aecb994c5bd43b2f6d9fea0804d7e00a38a034672730f9351ceb9256ace38e32f7ef81527c8a034a870e5099a277dfd06f9fa54b480
  • Loading branch information
PastaPastaPasta committed Dec 17, 2024
2 parents 0968a00 + 27d9763 commit a9cfd39
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 40 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
28 changes: 14 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,27 +193,27 @@ 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
variables:
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
variables:
HOST: x86_64-pc-linux-gnu
DEP_OPTS: "MULTIPROCESS=1"
DEP_OPTS: "DEBUG=1 MULTIPROCESS=1"

x86_64-apple-darwin:
extends:
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
22 changes: 12 additions & 10 deletions ci/dash/matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,30 @@ 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_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
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
2 changes: 1 addition & 1 deletion ci/dash/test_integrationtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ci/dash/test_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion ci/test/00_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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}

Expand Down
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_native_multiprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 TEST_RUNNER_ENV="BITCOIND=dash-node"
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
1 change: 0 additions & 1 deletion ci/test/00_setup_env_s390x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 9 additions & 3 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9cfd39

Please sign in to comment.