From 8dd978cfc3ff34eda5c55bf94e73999f74d0a76d Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Mon, 2 Dec 2024 11:52:49 +0100 Subject: [PATCH] ci: enable multiprocess for non-depends jobs It's left disabled for the test each commit job. The bitcoin-node binary is built on all platforms which have multiprocess enabled, but for functional tests it's only used in the macOS native job. TODO: * ASAN --- .github/workflows/ci.yml | 4 ++-- ci/test/00_setup_env_mac_native.sh | 8 +++++++- ci/test/00_setup_env_native_asan.sh | 7 ++++++- ci/test/00_setup_env_native_fuzz_with_valgrind.sh | 1 + ci/test/00_setup_env_native_tidy.sh | 8 +++++++- ci/test/00_setup_env_native_valgrind.sh | 6 +++++- 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4adebac7134ee..734fff63442740 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ env: jobs: test-each-commit: - name: 'test each commit' + name: 'test each commit (no multiprocess)' runs-on: ubuntu-24.04 if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1 timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below. @@ -72,7 +72,7 @@ jobs: run: | # Run tests on commits after the last merge commit and before the PR head commit # Use clang++, because it is a bit faster and uses less memory than g++ - git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }} + git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_MULTIPROCESS=OFF -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }} macos-native-arm64: name: ${{ matrix.job-name }} diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh index e01a56895bfb63..198c3c2ef11c06 100755 --- a/ci/test/00_setup_env_mac_native.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -11,7 +11,13 @@ export LC_ALL=C.UTF-8 export PIP_PACKAGES="--break-system-packages zmq" export GOAL="install" export CMAKE_GENERATOR="Ninja" -export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON" +export BITCOIN_CONFIG="\ +-DWITH_MULTIPROCESS=ON \ +-DBUILD_GUI=ON \ +-DWITH_ZMQ=ON \ +-DREDUCE_EXPORTS=ON \ +" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" +export BITCOIND=bitcoin-node # Used in functional tests diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index e78c593701978d..904d54e241c51c 100755 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -24,7 +24,12 @@ export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libcla export NO_DEPENDS=1 export GOAL="install" export BITCOIN_CONFIG="\ - -DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \ + -DWITH_MULTIPROCESS=OFF \ + -DWITH_USDT=ON \ + -DWITH_ZMQ=ON \ + -DWITH_BDB=ON \ + -DWARN_INCOMPATIBLE_BDB=OFF \ + -DBUILD_GUI=ON \ -DSANITIZERS=address,float-divide-by-zero,integer,undefined \ -DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \ -DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \ diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh index f453054b7f0a83..ed3f2cc645bda4 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -16,6 +16,7 @@ export RUN_FUZZ_TESTS=true export FUZZ_TESTS_CONFIG="--valgrind" export GOAL="install" export BITCOIN_CONFIG="\ + -DWITH_MULTIPROCESS=ON \ -DBUILD_FOR_FUZZING=ON \ -DSANITIZERS=fuzzer \ -DCMAKE_C_COMPILER=clang-16 \ diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh index 4f79ff807fe69d..98e6fe2b1c52fd 100755 --- a/ci/test/00_setup_env_native_tidy.sh +++ b/ci/test/00_setup_env_native_tidy.sh @@ -19,7 +19,13 @@ export RUN_CHECK_DEPS=true export RUN_TIDY=true export GOAL="install" export BITCOIN_CONFIG="\ - -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \ + -DWITH_MULTIPROCESS=ON \ + -DWITH_ZMQ=ON \ + -DBUILD_GUI=ON \ + -DBUILD_BENCH=ON \ + -DWITH_USDT=ON \ + -DWITH_BDB=ON \ + -DWARN_INCOMPATIBLE_BDB=OFF \ -DENABLE_HARDENING=OFF \ -DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \ -DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \ diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index abf5fadc3ee232..5104388e25e7ff 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -15,7 +15,11 @@ export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # export GOAL="install" # TODO enable GUI export BITCOIN_CONFIG="\ - -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \ + -DWITH_MULTIPROCESS=ON \ + -DWITH_ZMQ=ON + -DWITH_BDB=ON + -DWARN_INCOMPATIBLE_BDB=OFF + -DBUILD_GUI=OFF \ -DCMAKE_C_COMPILER=clang-16 \ -DCMAKE_CXX_COMPILER=clang++-16 \ "