Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | build-asan) | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_CXX_FLAGS=-DARENA_DEBUG" | "-DCMAKE_CXX_FLAGS=-DARENA_DEBUG" | ||||
"-DCMAKE_BUILD_TYPE=Debug" | "-DCMAKE_BUILD_TYPE=Debug" | ||||
# ASAN does not support assembly code: https://github.com/google/sanitizers/issues/192 | # ASAN does not support assembly code: https://github.com/google/sanitizers/issues/192 | ||||
# This will trigger a segfault if the SSE4 implementation is selected for SHA256. | # This will trigger a segfault if the SSE4 implementation is selected for SHA256. | ||||
# Disabling the assembly works around the issue. | # Disabling the assembly works around the issue. | ||||
"-DCRYPTO_USE_ASM=OFF" | "-DCRYPTO_USE_ASM=OFF" | ||||
"-DENABLE_SANITIZERS=address" | "-DENABLE_SANITIZERS=address" | ||||
"-DCMAKE_C_COMPILER=clang" | |||||
"-DCMAKE_CXX_COMPILER=clang++" | |||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror --clang | ||||
run_test_bitcoin "with address sanitizer" | run_test_bitcoin "with address sanitizer" | ||||
# Libs and utils tests | # Libs and utils tests | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
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. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_BUILD_TYPE=Debug" | "-DCMAKE_BUILD_TYPE=Debug" | ||||
"-DENABLE_SANITIZERS=undefined" | "-DENABLE_SANITIZERS=undefined" | ||||
"-DCMAKE_C_COMPILER=clang" | |||||
"-DCMAKE_CXX_COMPILER=clang++" | |||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror --clang | ||||
run_test_bitcoin "with undefined sanitizer" | run_test_bitcoin "with undefined sanitizer" | ||||
# Libs and utils tests | # Libs and utils tests | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
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. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DENABLE_SANITIZERS=thread" | "-DENABLE_SANITIZERS=thread" | ||||
"-DCMAKE_C_COMPILER=clang" | |||||
"-DCMAKE_CXX_COMPILER=clang++" | |||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror --clang | ||||
run_test_bitcoin "with thread sanitizer" | run_test_bitcoin "with thread sanitizer" | ||||
# Libs and utils tests | # Libs and utils tests | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
▲ Show 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | build-make-generator) | ||||
cd ${BUILD_DIR} | cd ${BUILD_DIR} | ||||
git clean -xffd | git clean -xffd | ||||
cmake -G "Unix Makefiles" .. | cmake -G "Unix Makefiles" .. | ||||
make -j "${THREADS}" all check | make -j "${THREADS}" all check | ||||
;; | ;; | ||||
build-coverage) | build-coverage) | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_C_COMPILER=gcc" | |||||
"-DCMAKE_CXX_COMPILER=g++" | |||||
"-DENABLE_COVERAGE=ON" | "-DENABLE_COVERAGE=ON" | ||||
"-DENABLE_BRANCH_COVERAGE=ON" | "-DENABLE_BRANCH_COVERAGE=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh coverage-check-extended | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh coverage-check-extended --gcc | ||||
# Publish the coverage report in a format that Teamcity understands | # Publish the coverage report in a format that Teamcity understands | ||||
pushd check-extended.coverage | pushd check-extended.coverage | ||||
# Run from the coverage directory to prevent tar from creating a top level | # Run from the coverage directory to prevent tar from creating a top level | ||||
# folder in the generated archive. | # folder in the generated archive. | ||||
tar -czf ../coverage.tar.gz -- * | tar -czf ../coverage.tar.gz -- * | ||||
popd | popd | ||||
;; | ;; | ||||
build-clang-tidy) | build-clang-tidy) | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_C_COMPILER=clang" | |||||
"-DCMAKE_CXX_COMPILER=clang++" | |||||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" | "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --clang | ||||
# Set the default for debian but allow the user to override, as the name is | # Set the default for debian but allow the user to override, as the name is | ||||
# not standard across distributions (and it's not always in the PATH). | # not standard across distributions (and it's not always in the PATH). | ||||
: "${CLANG_TIDY_DIFF_SCRIPT:=clang-tidy-diff-8.py}" | : "${CLANG_TIDY_DIFF_SCRIPT:=clang-tidy-diff-8.py}" | ||||
CLANG_TIDY_WARNING_FILE="${BUILD_DIR}/clang-tidy-warnings.txt" | CLANG_TIDY_WARNING_FILE="${BUILD_DIR}/clang-tidy-warnings.txt" | ||||
pushd "${TOPLEVEL}" | pushd "${TOPLEVEL}" | ||||
git diff -U0 HEAD^ | "${CLANG_TIDY_DIFF_SCRIPT}" \ | git diff -U0 HEAD^ | "${CLANG_TIDY_DIFF_SCRIPT}" \ | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |