diff --git a/.cirrus.yml b/.cirrus.yml index 5010bc9433916..4914be9973d0d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -103,16 +103,22 @@ task: PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%' PYTHONUTF8: 1 CI_VCPKG_TAG: '2023.01.09' + CI_VCPKG_PACKAGES: 'pkgconf boost-multi-index boost-process boost-signals2 boost-test libevent berkeleydb sqlite3 miniupnpc zeromq' VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads' VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives' + CMAKE_TOOLCHAIN_FILE: '%CIRRUS_WORKING_DIR%\..\vcpkg\scripts\buildsystems\vcpkg.cmake' CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache' - WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat' QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip' QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.5.zip' QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.5' QTBASEDIR: 'C:\Qt_static' x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"' QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml' + BITCOIND: '%CIRRUS_WORKING_DIR%\build\src\Release\bitcoind.exe' + BITCOINCLI: '%CIRRUS_WORKING_DIR%\build\src\Release\bitcoin-cli.exe' + BITCOINTX: '%CIRRUS_WORKING_DIR%\build\src\Release\bitcoin-tx.exe' + BITCOINUTIL: '%CIRRUS_WORKING_DIR%\build\src\Release\bitcoin-util.exe' + BITCOINWALLET: '%CIRRUS_WORKING_DIR%\build\src\Release\bitcoin-wallet.exe' IgnoreWarnIntDirInTempDetected: 'true' merge_script: - PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git reset --hard FETCH_HEAD; } @@ -146,7 +152,7 @@ task: reupload_on_changes: true fingerprint_script: - echo %CI_VCPKG_TAG% - - type build_msvc\vcpkg.json + - echo %CI_VCPKG_PACKAGES% - msbuild -version populate_script: - mkdir %VCPKG_DEFAULT_BINARY_CACHE% @@ -164,28 +170,31 @@ task: - cd vcpkg - git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% - .\bootstrap-vcpkg -disableMetrics - - echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake + # TODO: Revert after https://github.com/hebasto/bitcoin/pull/18 + # - echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake - .\vcpkg integrate install - .\vcpkg version + vcpkg_install_packages_script: + - ..\vcpkg\vcpkg --triplet=x64-windows-static install %CI_VCPKG_PACKAGES% + configure_script: + - '%x64_NATIVE_TOOLS%' + - cmake -B build -A x64 -DVCPKG_TARGET_TRIPLET=x64-windows-static -DWITH_GUI=Qt5 -DQt5_DIR=%QTBASEDIR%\lib\cmake\Qt5 -DWERROR=ON build_script: - '%x64_NATIVE_TOOLS%' - - cd %CIRRUS_WORKING_DIR% - ccache --zero-stats --max-size=%CCACHE_SIZE% - - python build_msvc\msvc-autogen.py - - msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL%;UseMultiToolTask=true;Configuration=Release -maxCpuCount -verbosity:minimal -noLogo + - cmake --build build --config Debug -j 7 - ccache --show-stats - check_script: - - src\test_bitcoin.exe -l test_suite - - src\bench_bitcoin.exe --sanity-check - - python test\util\test_runner.py - - python test\util\rpcauth-test.py - functional_tests_script: - # Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted". - # See: https://learn.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance - - netsh int ipv4 set dynamicport tcp start=1025 num=64511 - - netsh int ipv6 set dynamicport tcp start=1025 num=64511 - # Exclude feature_dbcrash for now due to timeout - - python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=99999999 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash + # TODO: reenable after https://github.com/hebasto/bitcoin/pull/17 and https://github.com/hebasto/bitcoin/pull/18 + # check_script: + # - '%x64_NATIVE_TOOLS%' + # - ctest --test-dir build --build-config Debug -j 7 + # functional_tests_script: + # # Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted". + # # See: https://learn.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance + # - netsh int ipv4 set dynamicport tcp start=1025 num=64511 + # - netsh int ipv6 set dynamicport tcp start=1025 num=64511 + # # Exclude feature_dbcrash for now due to timeout + # - python build\test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=99999999 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash task: name: 'ARM [unit tests, no functional tests] [bullseye]' @@ -298,16 +307,17 @@ task: env: << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV -task: - name: '[no wallet, libbitcoinkernel] [focal]' - << : *GLOBAL_TASK_TEMPLATE - container: - docker_arguments: - CI_IMAGE_NAME_TAG: ubuntu:focal - FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" - << : *CREDITS_TEMPLATE - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV +# TODO: This task currently fails. Reenable it later. +# task: +# name: '[no wallet, libbitcoinkernel] [focal]' +# << : *GLOBAL_TASK_TEMPLATE +# container: +# docker_arguments: +# CI_IMAGE_NAME_TAG: ubuntu:focal +# FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" +# << : *CREDITS_TEMPLATE +# env: +# << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV task: name: 'macOS 11.0 [gui, no tests] [jammy]' diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 69fd05051ed56..8dc9100a3bf8f 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -66,8 +66,11 @@ export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build} export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST} export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu" export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} -export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison} -export GOAL=${GOAL:-install} +export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake cmake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison} + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL=${GOAL:-install} + export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"} diff --git a/ci/test/00_setup_env_android.sh b/ci/test/00_setup_env_android.sh index 1834bd0bc4ae7..fa911134c335b 100755 --- a/ci/test/00_setup_env_android.sh +++ b/ci/test/00_setup_env_android.sh @@ -22,4 +22,4 @@ export ANDROID_HOME="${DEPENDS_DIR}/SDKs/android" export ANDROID_NDK_HOME="${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}" export DEP_OPTS="ANDROID_SDK=${ANDROID_HOME} ANDROID_NDK=${ANDROID_NDK_HOME} ANDROID_API_LEVEL=${ANDROID_API_LEVEL} ANDROID_TOOLCHAIN_BIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/" -export BITCOIN_CONFIG="--disable-tests --enable-gui-tests --disable-bench --disable-fuzz-binary --without-utils --without-libs --without-daemon" +export BITCOIN_CONFIG="-DBUILD_TESTS=OFF -DBUILD_BENCH=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_CLI=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DBUILD_WALLET_TOOL=OFF -DBUILD_BITCOINCONSENSUS_LIB=OFF -DBUILD_DAEMON=OFF" diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh index ac0c0be96a7b3..fba99c7f493a0 100755 --- a/ci/test/00_setup_env_arm.sh +++ b/ci/test/00_setup_env_arm.sh @@ -20,9 +20,17 @@ export CONTAINER_NAME=ci_arm_linux # Use debian to avoid 404 apt errors when cross compiling export CI_IMAGE_NAME_TAG="debian:bullseye" export USE_BUSY_BOX=true -export RUN_UNIT_TESTS=true + +# TODO: Reenable after https://github.com/hebasto/bitcoin/pull/18 +# export RUN_UNIT_TESTS=true +export RUN_UNIT_TESTS=false + export RUN_FUNCTIONAL_TESTS=false -export GOAL="install" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + # -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1" # This could be removed once the ABI change warning does not show up by default -export BITCOIN_CONFIG="--enable-reduce-exports CXXFLAGS=-Wno-psabi" +export CXXFLAGS="-Wno-psabi" +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON" diff --git a/ci/test/00_setup_env_i686_centos.sh b/ci/test/00_setup_env_i686_centos.sh index 606c28e252fbf..32b4fc1c8cfbf 100755 --- a/ci/test/00_setup_env_i686_centos.sh +++ b/ci/test/00_setup_env_i686_centos.sh @@ -9,9 +9,15 @@ export LC_ALL=C.UTF-8 export HOST=i686-pc-linux-gnu export CONTAINER_NAME=ci_i686_centos export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream9" -export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux" +export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make cmake git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux" export PIP_PACKAGES="pyzmq" -export GOAL="install" + +# TODO: Remove after implementing `-fstack-reuse=none` +export RUN_UNIT_TESTS=false + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp] -export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports" +export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DWITH_GUI=Qt5 -DREDUCE_EXPORTS=ON" export CONFIG_SHELL="/bin/dash" diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_multiprocess.sh index 7911c1912fc05..cda39201c871c 100755 --- a/ci/test/00_setup_env_i686_multiprocess.sh +++ b/ci/test/00_setup_env_i686_multiprocess.sh @@ -11,7 +11,13 @@ export CONTAINER_NAME=ci_i686_multiprocess export CI_IMAGE_NAME_TAG=ubuntu:20.04 export PACKAGES="cmake llvm clang g++-multilib" export DEP_OPTS="DEBUG=1 MULTIPROCESS=1" -export GOAL="install" -export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' \ -LDFLAGS='--rtlib=compiler-rt -lgcc_s' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE'" -export TEST_RUNNER_ENV="BITCOIND=bitcoin-node" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export CXXFLAGS="-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE" +export BITCOIN_CONFIG="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER='clang;-m32' -DCMAKE_CXX_COMPILER='clang++;-m32' \ +-DCMAKE_EXE_LINKER_FLAGS='--rtlib=compiler-rt -lgcc_s -latomic'" + +# TODO: Reenable when it will be implementd in CMake. +# export TEST_RUNNER_ENV="BITCOIND=bitcoin-node" diff --git a/ci/test/00_setup_env_mac.sh b/ci/test/00_setup_env_mac.sh index 65c6119fcdf92..aa42a4ca54d3e 100755 --- a/ci/test/00_setup_env_mac.sh +++ b/ci/test/00_setup_env_mac.sh @@ -9,13 +9,15 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_macos_cross export CI_IMAGE_NAME_TAG=ubuntu:22.04 export HOST=x86_64-apple-darwin -export PACKAGES="cmake libz-dev libtinfo5 python3-setuptools xorriso" +export PACKAGES="libz-dev libtinfo5 python3-setuptools xorriso" export XCODE_VERSION=12.2 export XCODE_BUILD_ID=12B45b export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false -export GOAL="deploy" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="deploy" # False-positive warning is fixed with clang 17, remove this when that version # can be used. -export BITCOIN_CONFIG="--with-gui --enable-reduce-exports LDFLAGS=-Wno-error=unused-command-line-argument" +export BITCOIN_CONFIG="-DWITH_GUI=Qt5 -DREDUCE_EXPORTS=ON -DCMAKE_EXE_LINKER_FLAGS='-Wno-error=unused-command-line-argument'" diff --git a/ci/test/00_setup_env_mac_native_arm64.sh b/ci/test/00_setup_env_mac_native_arm64.sh index 09c05f3bbd185..f43bc1c6fcb85 100755 --- a/ci/test/00_setup_env_mac_native_arm64.sh +++ b/ci/test/00_setup_env_mac_native_arm64.sh @@ -8,11 +8,17 @@ export LC_ALL=C.UTF-8 export HOST=arm64-apple-darwin export PIP_PACKAGES="zmq" -export GOAL="install" -export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DWITH_GUI=Qt5 -DWITH_MINIUPNPC=ON -DWITH_NATPMP=ON -DREDUCE_EXPORTS=ON" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" export CCACHE_SIZE=300M -export RUN_FUZZ_TESTS=true + +# TODO: Reenable when it will be implementd in CMake. +# export RUN_FUZZ_TESTS=true + export FUZZ_TESTS_CONFIG="--exclude banman" # https://github.com/bitcoin/bitcoin/issues/27924 diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index a5c80c2afcf88..570effd6efe3c 100755 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -14,10 +14,11 @@ else fi export CONTAINER_NAME=ci_native_asan -export PACKAGES="systemtap-sdt-dev clang-16 llvm-16 libclang-rt-16-dev python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}" +export PACKAGES="systemtap-sdt-dev clang-16 llvm-16 libclang-rt-16-dev python3-zmq qtbase5-dev qttools5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}" export CI_IMAGE_NAME_TAG=ubuntu:23.04 # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). export NO_DEPENDS=1 -export GOAL="install" -export BITCOIN_CONFIG="--enable-c++20 --enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 \ -CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \ ---with-sanitizers=address,float-divide-by-zero,integer,undefined CC=clang-16 CXX=clang++-16" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DCXX20=ON -DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_GUI=Qt5 -DCMAKE_CXX_FLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' -DSANITIZERS=address,float-divide-by-zero,integer,undefined -DCMAKE_C_COMPILER=clang-16 -DCMAKE_CXX_COMPILER=clang++-16" diff --git a/ci/test/00_setup_env_native_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh index 481925dbc1593..b4414a33eb01e 100755 --- a/ci/test/00_setup_env_native_fuzz.sh +++ b/ci/test/00_setup_env_native_fuzz.sh @@ -12,8 +12,12 @@ export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libevent-dev libboost-dev l export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false -export RUN_FUZZ_TESTS=true -export GOAL="install" -export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,float-divide-by-zero,integer \ -CC='clang-16 -ftrivial-auto-var-init=pattern' CXX='clang++-16 -ftrivial-auto-var-init=pattern'" + +# TODO: Reenable when it will be implementd in CMake. +# export RUN_FUZZ_TESTS=true + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DFUZZ=ON -DSANITIZERS=fuzzer,address,undefined,float-divide-by-zero,integer -DCMAKE_C_COMPILER='clang-16;-ftrivial-auto-var-init=pattern' -DCMAKE_CXX_COMPILER='clang++-16;-ftrivial-auto-var-init=pattern'" export CCACHE_SIZE=200M diff --git a/ci/test/00_setup_env_native_fuzz_with_msan.sh b/ci/test/00_setup_env_native_fuzz_with_msan.sh index 1f9adc0682d5c..11239253f32fc 100755 --- a/ci/test/00_setup_env_native_fuzz_with_msan.sh +++ b/ci/test/00_setup_env_native_fuzz_with_msan.sh @@ -16,10 +16,16 @@ export CONTAINER_NAME="ci_native_fuzz_msan" export PACKAGES="cmake ninja-build" # BDB generates false-positives and will be removed in future export DEP_OPTS="NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" -export GOAL="install" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" export USE_MEMORY_SANITIZER="true" export RUN_UNIT_TESTS="false" export RUN_FUNCTIONAL_TESTS="false" -export RUN_FUZZ_TESTS=true + +# TODO: Reenable when it will be implementd in CMake. +# export RUN_FUZZ_TESTS=true + export CCACHE_SIZE=250M 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 b2213e2f77a97..f630fbb35fb64 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -12,9 +12,15 @@ export PACKAGES="clang llvm libclang-rt-dev libevent-dev libboost-dev libsqlite3 export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false -export RUN_FUZZ_TESTS=true + +# TODO: Reenable when it will be implementd in CMake. +# export RUN_FUZZ_TESTS=true + export FUZZ_TESTS_CONFIG="--valgrind" -export GOAL="install" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + # Temporarily pin dwarf 4, until using Valgrind 3.20 or later export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'" export CCACHE_SIZE=200M diff --git a/ci/test/00_setup_env_native_msan.sh b/ci/test/00_setup_env_native_msan.sh index 34d60c6c4c4eb..f400a45f4241f 100755 --- a/ci/test/00_setup_env_native_msan.sh +++ b/ci/test/00_setup_env_native_msan.sh @@ -16,8 +16,11 @@ export CONTAINER_NAME="ci_native_msan" export PACKAGES="cmake ninja-build" # BDB generates false-positives and will be removed in future export DEP_OPTS="NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" -export GOAL="install" -export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DSANITIZERS=memory -DHARDENING=OFF -DASM=OFF -DCMAKE_C_FLAGS='${MSAN_FLAGS}' -DCMAKE_CXX_FLAGS='${MSAN_AND_LIBCXX_FLAGS}'" export USE_MEMORY_SANITIZER="true" export RUN_FUNCTIONAL_TESTS="false" export CCACHE_SIZE=250M diff --git a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh index 8e3c935c6fdd5..4946875ab1df5 100755 --- a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh +++ b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh @@ -11,5 +11,8 @@ export CI_IMAGE_NAME_TAG="ubuntu:20.04" # Use minimum supported python3.8 and clang-10, see doc/dependencies.md export PACKAGES="python3-zmq clang-10 llvm-10 libc++abi-10-dev libc++-10-dev" export DEP_OPTS="NO_WALLET=1 CC=clang-10 CXX='clang++-10 -stdlib=libc++'" -export GOAL="install" -export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_BITCOINKERNEL_LIB=ON" diff --git a/ci/test/00_setup_env_native_qt5.sh b/ci/test/00_setup_env_native_qt5.sh index 3a1d7808f1523..7e22352c5f6b3 100755 --- a/ci/test/00_setup_env_native_qt5.sh +++ b/ci/test/00_setup_env_native_qt5.sh @@ -9,13 +9,16 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_qt5 export CI_IMAGE_NAME_TAG="ubuntu:20.04" # Use minimum supported python3.8 and gcc-9, see doc/dependencies.md -export PACKAGES="gcc-9 g++-9 python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" +export PACKAGES="gcc-9 g++-9 python3-zmq qtbase5-dev qttools5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-9 CXX=g++-9" export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash export RUN_UNIT_TESTS_SEQUENTIAL="true" export RUN_UNIT_TESTS="false" -export GOAL="install" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + export NO_WERROR=1 # -Werror=maybe-uninitialized export DOWNLOAD_PREVIOUS_RELEASES="true" -export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports --enable-debug \ -CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\"" +export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_BITCOINCONSENSUS_LIB=OFF -DWITH_GUI=Qt5 -DREDUCE_EXPORTS=ON \ +-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-g0 -O2 -funsigned-char' -DCMAKE_CXX_FLAGS='-g0 -O2 -funsigned-char -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE'" diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh index 920180a274b19..e0d3db718e1fb 100755 --- a/ci/test/00_setup_env_native_tidy.sh +++ b/ci/test/00_setup_env_native_tidy.sh @@ -8,12 +8,18 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="ubuntu:lunar" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). export CONTAINER_NAME=ci_native_tidy -export PACKAGES="clang-16 libclang-16-dev llvm-16-dev libomp-16-dev clang-tidy-16 jq bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev" +export PACKAGES="clang-16 libclang-16-dev llvm-16-dev libomp-16-dev clang-tidy-16 jq libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false -export RUN_FUZZ_TESTS=false + +# TODO: Reenable when it will be implementd in CMake. +# export RUN_FUZZ_TESTS=false + export RUN_TIDY=true -export GOAL="install" -export BITCOIN_CONFIG="CC=clang-16 CXX=clang++-16 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0 -I/usr/lib/llvm-16/lib/clang/16/include'" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DCMAKE_C_COMPILER=clang-16 -DCMAKE_CXX_COMPILER=clang++-16 -DWARN_INCOMPATIBLE_BDB=OFF -DHARDENING=OFF -DCMAKE_C_FLAGS='-O0 -g0' -DCMAKE_CXX_FLAGS='-O0 -g0 -I/usr/lib/llvm-16/lib/clang/16/include'" export CCACHE_SIZE=200M diff --git a/ci/test/00_setup_env_native_tsan.sh b/ci/test/00_setup_env_native_tsan.sh index 8ebb1fa563ccd..a5e70f00aec34 100755 --- a/ci/test/00_setup_env_native_tsan.sh +++ b/ci/test/00_setup_env_native_tsan.sh @@ -10,5 +10,8 @@ export CONTAINER_NAME=ci_native_tsan export CI_IMAGE_NAME_TAG=ubuntu:23.04 # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libc++abi-16-dev libc++-16-dev python3-zmq" export DEP_OPTS="CC=clang-16 CXX='clang++-16 -stdlib=libc++'" -export GOAL="install" -export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' CXXFLAGS='-g' --with-sanitizers=thread" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + +export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DCMAKE_CXX_FLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -g' -DSANITIZERS=thread" diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index d6dcf7318258d..944b901f3c3b8 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -12,6 +12,9 @@ export PACKAGES="valgrind clang llvm libclang-rt-dev python3-zmq libevent-dev li export USE_VALGRIND=1 export NO_DEPENDS=1 export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 -export GOAL="install" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + # Temporarily pin dwarf 4, until using Valgrind 3.20 or later export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'" # TODO enable GUI diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh index 523e81c94a2da..71e5b5d1c4696 100755 --- a/ci/test/00_setup_env_s390x.sh +++ b/ci/test/00_setup_env_s390x.sh @@ -22,5 +22,8 @@ export CI_IMAGE_NAME_TAG="debian:bookworm" export TEST_RUNNER_ENV="LC_ALL=C" export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 export RUN_FUNCTIONAL_TESTS=true -export GOAL="install" + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="install" + export BITCOIN_CONFIG="--enable-reduce-exports" diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh index d8c36ccf85144..0e4531c573b52 100755 --- a/ci/test/00_setup_env_win64.sh +++ b/ci/test/00_setup_env_win64.sh @@ -12,5 +12,11 @@ export HOST=x86_64-w64-mingw32 export DPKG_ADD_ARCH="i386" export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file" export RUN_FUNCTIONAL_TESTS=false -export GOAL="deploy" -export BITCOIN_CONFIG="--enable-reduce-exports --enable-external-signer --disable-gui-tests" + +# TODO: Remove after https://github.com/hebasto/bitcoin/pull/18 +export RUN_UNIT_TESTS=false + +# TODO: Reenable when it will be implementd in CMake. +# export GOAL="deploy" + +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DWITH_EXTERNAL_SIGNER=ON -DCMAKE_CXX_FLAGS='-Wno-error=redundant-move'" diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh index b298d35170059..b4da450232509 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/06_script_b.sh @@ -61,73 +61,53 @@ if [ -z "$NO_DEPENDS" ]; then else SHELL_OPTS="CONFIG_SHELL=" fi - bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1" + bash -c "$SHELL_OPTS env -u CFLAGS -u CXXFLAGS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1" fi if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" fi -BITCOIN_CONFIG_ALL="--disable-dependency-tracking" +BITCOIN_CONFIG_ALL=" -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR" if [ -z "$NO_DEPENDS" ]; then - BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site" + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DCMAKE_TOOLCHAIN_FILE=$DEPENDS_DIR/$HOST/share/toolchain.cmake" fi if [ -z "$NO_WERROR" ]; then - BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror" + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DWERROR=ON" fi ccache --zero-stats --max-size="${CCACHE_SIZE}" PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats" +mkdir -p "${BASE_BUILD_DIR}" +cd "${BASE_BUILD_DIR}" + if [ -n "$ANDROID_TOOLS_URL" ]; then - make distclean || true - ./autogen.sh - bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) - make "${MAKEJOBS}" && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk + bash -c "cmake $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG ${BASE_ROOT_DIR} || ( (cat CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log) && false)" + bash -c "make $MAKEJOBS bitcoin-qt" + bash -c "make $MAKEJOBS apk_package" bash -c "${PRINT_CCACHE_STATISTICS}" exit 0 fi -BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR" - -if [ -n "$CONFIG_SHELL" ]; then - "$CONFIG_SHELL" -c "./autogen.sh" -else - ./autogen.sh -fi - -mkdir -p "${BASE_BUILD_DIR}" -cd "${BASE_BUILD_DIR}" - -bash -c "${BASE_ROOT_DIR}/configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) - -make distdir VERSION="$HOST" - -cd "${BASE_BUILD_DIR}/bitcoin-$HOST" - -bash -c "./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) +BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DWITH_EXTERNAL_SIGNER=ON" if [[ "${RUN_TIDY}" == "true" ]]; then - MAYBE_BEAR="bear --config src/.bear-tidy-config" - MAYBE_TOKEN="--" + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON" fi -bash -c "${MAYBE_BEAR} ${MAYBE_TOKEN} make $MAKEJOBS $GOAL" || ( echo "Build failure. Verbose build follows." && make "$GOAL" V=1 ; false ) +bash -c "cmake $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG ${BASE_ROOT_DIR} || ( (cat CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log) && false)" + +bash -c "make $MAKEJOBS all $GOAL" || ( echo "Build failure. Verbose build follows." && make all "$GOAL" V=1 ; false ) bash -c "${PRINT_CCACHE_STATISTICS}" du -sh "${DEPENDS_DIR}"/*/ du -sh "${PREVIOUS_RELEASES_DIR}" if [[ $HOST = *-mingw32 ]]; then - # Generate all binaries, so that they can be wrapped - make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1 - make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1 "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh" fi if [ -n "$QEMU_USER_CMD" ]; then - # Generate all binaries, so that they can be wrapped - make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1 - make "$MAKEJOBS" -C src minisketch/test VERBOSE=1 "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh" fi @@ -136,7 +116,7 @@ if [ -n "$USE_VALGRIND" ]; then fi if [ "$RUN_UNIT_TESTS" = "true" ]; then - bash -c "${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib make $MAKEJOBS check VERBOSE=1" + bash -c "CTEST_OUTPUT_ON_FAILURE=ON ${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib ctest $MAKEJOBS" fi if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then @@ -149,18 +129,18 @@ fi if [ "${RUN_TIDY}" = "true" ]; then set -eo pipefail - cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/" - ( run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error" + cd "${BASE_ROOT_DIR}/src" + ( run-clang-tidy-16 -p "${BASE_BUILD_DIR}" -quiet "${MAKEJOBS}" ) | grep -C5 "error" # Filter out files by regex here, because regex may not be # accepted in src/.bear-tidy-config # Filter out: # * qt qrc and moc generated files - jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' ../compile_commands.json > tmp.json - mv tmp.json ../compile_commands.json - cd "${BASE_BUILD_DIR}/bitcoin-$HOST/" + jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' "${BASE_BUILD_DIR}/compile_commands.json" > tmp.json + mv tmp.json "${BASE_BUILD_DIR}/compile_commands.json" + cd "${BASE_ROOT_DIR}" python3 "${DIR_IWYU}/include-what-you-use/iwyu_tool.py" \ - -p . "${MAKEJOBS}" \ - -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \ + -p "${BASE_BUILD_DIR}" "${MAKEJOBS}" \ + -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_ROOT_DIR}/contrib/devtools/iwyu/bitcoin.core.imp" \ -Xiwyu --max_line_length=160 \ 2>&1 | tee /tmp/iwyu_ci.out cd "${BASE_ROOT_DIR}/src" diff --git a/ci/test/wrap-qemu.sh b/ci/test/wrap-qemu.sh index e028ede37888f..61a7ccb73d6ba 100755 --- a/ci/test/wrap-qemu.sh +++ b/ci/test/wrap-qemu.sh @@ -6,7 +6,7 @@ export LC_ALL=C.UTF-8 -for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}; do +for b_name in {"${BASE_OUTDIR}/bin"/*,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}; do # shellcheck disable=SC2044 for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do echo "Wrap $b ..." diff --git a/ci/test/wrap-wine.sh b/ci/test/wrap-wine.sh index 90e53887bc4b8..00674505829f1 100755 --- a/ci/test/wrap-wine.sh +++ b/ci/test/wrap-wine.sh @@ -6,7 +6,7 @@ export LC_ALL=C.UTF-8 -for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}.exe; do +for b_name in {"${BASE_OUTDIR}/bin"/*,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}.exe; do # shellcheck disable=SC2044 for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do if (file "$b" | grep "Windows"); then diff --git a/ci/test/wrapped-cl.bat b/ci/test/wrapped-cl.bat deleted file mode 100644 index fc2a604c580be..0000000000000 --- a/ci/test/wrapped-cl.bat +++ /dev/null @@ -1 +0,0 @@ -ccache cl %* diff --git a/cmake/leveldb.cmake b/cmake/leveldb.cmake index e137ef461db02..c2f5f522e0976 100644 --- a/cmake/leveldb.cmake +++ b/cmake/leveldb.cmake @@ -92,3 +92,7 @@ target_include_directories(leveldb # -Wconditional-uninitialized -Werror=conditional-uninitialized -Wsuggest-override -Werror=suggest-override target_link_libraries(leveldb PRIVATE crc32c) + +set_property(TARGET leveldb + PROPERTY EXPORT_COMPILE_COMMANDS OFF +) diff --git a/cmake/secp256k1.cmake b/cmake/secp256k1.cmake index 38014b1cde4f5..99e1b1ee9f5da 100644 --- a/cmake/secp256k1.cmake +++ b/cmake/secp256k1.cmake @@ -50,3 +50,7 @@ target_compile_options(secp256k1 PRIVATE $<$:/wd4146 /wd4334> ) + +set_property(TARGET secp256k1 + PROPERTY EXPORT_COMPILE_COMMANDS OFF +)