Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
CI_SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | CI_SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||||
setup | setup | ||||
case "$ABC_BUILD_NAME" in | case "$ABC_BUILD_NAME" in | ||||
build-asan) | build-asan) | ||||
# Build with the address sanitizer, then run unit tests and functional tests. | # Build with the address sanitizer, then run unit tests and functional tests. | ||||
CONFIGURE_FLAGS="--enable-debug --with-sanitizers=address --disable-ccache" "${CI_SCRIPTS_DIR}"/build.sh | CONFIGURE_FLAGS="--enable-debug --with-sanitizers=address --disable-ccache" "${CI_SCRIPTS_DIR}"/build_autotools.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
# FIXME Remove when wallet_multiwallet works with asan after backporting at least the following PRs from Core and their dependencies: 13161, 12493, 14320, 14552, 14760, 11911. | # FIXME Remove when wallet_multiwallet works with asan after backporting at least the following PRs from Core and their dependencies: 13161, 12493, 14320, 14552, 14760, 11911. | ||||
TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --exclude=wallet_multiwallet" | TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --exclude=wallet_multiwallet" | ||||
./test/functional/test_runner.py -J=junit_results_asan.xml ${TEST_RUNNER_FLAGS} | ./test/functional/test_runner.py -J=junit_results_asan.xml ${TEST_RUNNER_FLAGS} | ||||
;; | ;; | ||||
build-ubsan) | build-ubsan) | ||||
# Build with the undefined sanitizer, then run unit tests and functional tests. | # Build with the undefined sanitizer, then run unit tests and functional tests. | ||||
CONFIGURE_FLAGS="--enable-debug --with-sanitizers=undefined --disable-ccache CC=clang CXX=clang++" "${CI_SCRIPTS_DIR}"/build.sh | CONFIGURE_FLAGS="--enable-debug --with-sanitizers=undefined --disable-ccache CC=clang CXX=clang++" "${CI_SCRIPTS_DIR}"/build_autotools.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
# FIXME Remove when abc-p2p-compactblocks works with ubsan. | # FIXME Remove when abc-p2p-compactblocks works with ubsan. | ||||
TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --exclude=abc-p2p-compactblocks" | TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --exclude=abc-p2p-compactblocks" | ||||
./test/functional/test_runner.py -J=junit_results_ubsan.xml ${TEST_RUNNER_FLAGS} | ./test/functional/test_runner.py -J=junit_results_ubsan.xml ${TEST_RUNNER_FLAGS} | ||||
;; | ;; | ||||
build-tsan) | build-tsan) | ||||
# Build with the thread sanitizer, then run unit tests and functional tests. | # Build with the thread sanitizer, then run unit tests and functional tests. | ||||
CONFIGURE_FLAGS="--enable-debug --with-sanitizers=thread --disable-ccache CC=clang CXX=clang++" "${CI_SCRIPTS_DIR}"/build.sh | CONFIGURE_FLAGS="--enable-debug --with-sanitizers=thread --disable-ccache CC=clang CXX=clang++" "${CI_SCRIPTS_DIR}"/build_autotools.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
# FIXME Remove when wallet_multiwallet works with tsan after backporting at least the following PRs from Core and their dependencies: 13161, 12493, 14320, 14552, 14760, 11911. | # FIXME Remove when wallet_multiwallet works with tsan after backporting at least the following PRs from Core and their dependencies: 13161, 12493, 14320, 14552, 14760, 11911. | ||||
TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --exclude=wallet_multiwallet" | TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --exclude=wallet_multiwallet" | ||||
./test/functional/test_runner.py -J=junit_results_tsan.xml ${TEST_RUNNER_FLAGS} | ./test/functional/test_runner.py -J=junit_results_tsan.xml ${TEST_RUNNER_FLAGS} | ||||
;; | ;; | ||||
build-default) | build-default) | ||||
# Build, run unit tests and functional tests (all extended tests if this is the master branch). | # Build, run unit tests and functional tests (all extended tests if this is the master branch). | ||||
"${CI_SCRIPTS_DIR}"/build.sh | "${CI_SCRIPTS_DIR}"/build_autotools.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||||
if [[ "${BRANCH}" == "master" ]]; then | if [[ "${BRANCH}" == "master" ]]; then | ||||
TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --extended" | TEST_RUNNER_FLAGS="${TEST_RUNNER_FLAGS} --extended" | ||||
fi | fi | ||||
./test/functional/test_runner.py -J=junit_results_default.xml ${TEST_RUNNER_FLAGS} | ./test/functional/test_runner.py -J=junit_results_default.xml ${TEST_RUNNER_FLAGS} | ||||
./test/functional/test_runner.py -J=junit_results_next_upgrade.xml --with-gravitonactivation ${TEST_RUNNER_FLAGS} | ./test/functional/test_runner.py -J=junit_results_next_upgrade.xml --with-gravitonactivation ${TEST_RUNNER_FLAGS} | ||||
# Build secp256k1 and run the java tests. | # Build secp256k1 and run the java tests. | ||||
export TOPLEVEL="${TOPLEVEL}"/src/secp256k1 | export TOPLEVEL="${TOPLEVEL}"/src/secp256k1 | ||||
export BUILD_DIR="${TOPLEVEL}"/build | export BUILD_DIR="${TOPLEVEL}"/build | ||||
setup | setup | ||||
CONFIGURE_FLAGS="--enable-jni --enable-experimental --enable-module-ecdh" "${CI_SCRIPTS_DIR}"/build.sh | CONFIGURE_FLAGS="--enable-jni --enable-experimental --enable-module-ecdh" "${CI_SCRIPTS_DIR}"/build_autotools.sh | ||||
make -j "${THREADS}" check-java | make -j "${THREADS}" check-java | ||||
;; | ;; | ||||
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_autotools.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
;; | ;; | ||||
build-ibd) | build-ibd) | ||||
"${CI_SCRIPTS_DIR}"/build.sh | "${CI_SCRIPTS_DIR}"/build_autotools.sh | ||||
"${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | "${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | ||||
;; | ;; | ||||
build-ibd-no-assumevalid-checkpoint) | build-ibd-no-assumevalid-checkpoint) | ||||
"${CI_SCRIPTS_DIR}"/build.sh | "${CI_SCRIPTS_DIR}"/build_autotools.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 | ||||
;; | ;; | ||||
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_autotools.sh | ||||
;; | ;; | ||||
*) | *) | ||||
echo "Error: Invalid build name '${ABC_BUILD_NAME}'" | echo "Error: Invalid build name '${ABC_BUILD_NAME}'" | ||||
exit 2 | exit 2 | ||||
;; | ;; | ||||
esac | esac |