Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show All 36 Lines | setup() { | ||||
mkdir -p "${SAN_LOG_DIR}" | mkdir -p "${SAN_LOG_DIR}" | ||||
rm -rf "${SAN_LOG_DIR:?}"/* | rm -rf "${SAN_LOG_DIR:?}"/* | ||||
# Sanitizers options, not used if sanitizers are not enabled | # Sanitizers options, not used if sanitizers are not enabled | ||||
export ASAN_OPTIONS="malloc_context_size=0:log_path=${SAN_LOG_DIR}/asan.log" | export ASAN_OPTIONS="malloc_context_size=0:log_path=${SAN_LOG_DIR}/asan.log" | ||||
export LSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/lsan:log_path=${SAN_LOG_DIR}/lsan.log" | export LSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/lsan:log_path=${SAN_LOG_DIR}/lsan.log" | ||||
export TSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/tsan:log_path=${SAN_LOG_DIR}/tsan.log" | export TSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/tsan:log_path=${SAN_LOG_DIR}/tsan.log" | ||||
export UBSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/ubsan:print_stacktrace=1:halt_on_error=1:log_path=${SAN_LOG_DIR}/ubsan.log" | export UBSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/ubsan:print_stacktrace=1:halt_on_error=1:log_path=${SAN_LOG_DIR}/ubsan.log" | ||||
# Allow to specify additional bitcoind arguments when running IBD | |||||
: "${IBD_BITCOIND_EXTRA_ARGS:=}" | |||||
} | } | ||||
# Facility to print out sanitizer log outputs to the build log console | # Facility to print out sanitizer log outputs to the build log console | ||||
print_sanitizers_log() { | print_sanitizers_log() { | ||||
for log in "${SAN_LOG_DIR}"/*.log.* | for log in "${SAN_LOG_DIR}"/*.log.* | ||||
do | do | ||||
echo "*** Output of ${log} ***" | echo "*** Output of ${log} ***" | ||||
cat "${log}" | cat "${log}" | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | case "$ABC_BUILD_NAME" in | ||||
build-without-wallet) | build-without-wallet) | ||||
# Build without wallet and run the unit tests. | # Build without wallet and run the unit tests. | ||||
CONFIGURE_FLAGS="--disable-wallet" "${CI_SCRIPTS_DIR}"/build.sh | CONFIGURE_FLAGS="--disable-wallet" "${CI_SCRIPTS_DIR}"/build.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
;; | ;; | ||||
build-ibd) | build-ibd) | ||||
"${CI_SCRIPTS_DIR}"/build.sh | "${CI_SCRIPTS_DIR}"/build.sh | ||||
"${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | "${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net ${IBD_BITCOIND_EXTRA_ARGS} | ||||
;; | ;; | ||||
build-ibd-no-assumevalid-checkpoint) | build-ibd-no-assumevalid-checkpoint) | ||||
"${CI_SCRIPTS_DIR}"/build.sh | "${CI_SCRIPTS_DIR}"/build.sh | ||||
"${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -assumevalid=0 -checkpoints=0 -debug=net | "${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -assumevalid=0 -checkpoints=0 -debug=net ${IBD_BITCOIND_EXTRA_ARGS} | ||||
;; | ;; | ||||
build-werror) | build-werror) | ||||
# Build with variable-length-array and thread-safety-analysis treated as errors | # Build with variable-length-array and thread-safety-analysis treated as errors | ||||
CONFIGURE_FLAGS="--enable-debug --enable-werror CC=clang CXX=clang++" "${CI_SCRIPTS_DIR}"/build.sh | CONFIGURE_FLAGS="--enable-debug --enable-werror CC=clang CXX=clang++" "${CI_SCRIPTS_DIR}"/build.sh | ||||
;; | ;; | ||||
*) | *) | ||||
echo "Error: Invalid build name '${ABC_BUILD_NAME}'" | echo "Error: Invalid build name '${ABC_BUILD_NAME}'" | ||||
exit 2 | exit 2 | ||||
;; | ;; | ||||
esac | esac |