diff --git a/contrib/devtools/build_depends.sh b/contrib/devtools/build_depends.sh new file mode 100755 --- /dev/null +++ b/contrib/devtools/build_depends.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +export LC_ALL=C + +set -euxo pipefail + +: "${TOPLEVEL:=$(git rev-parse --show-toplevel)}" +: "${DEPENDS_DIR:=${TOPLEVEL}/depends}" +: "${SDK_PATH:=${DEPENDS_DIR}/SDKs}" + +pushd "${DEPENDS_DIR}" + +# Get the OSX SDK +mkdir -p "${SDK_PATH}" +pushd "${SDK_PATH}" + +find . -maxdepth 1 -type d -name "MacOSX*" -exec rm -rf {} \; + +OSX_SDK="MacOSX10.14.sdk.tar.gz" +OSX_SDK_SHA256="2322086a96349db832abbcadea493b79db843553a2e604163238d99fa058a286" + +if ! echo "${OSX_SDK_SHA256} ${OSX_SDK}" | sha256sum -c; then + rm -f "${OSX_SDK}" + wget https://storage.googleapis.com/27cd7b2a42a430926cc621acdc3bda72a8ed2b0efc080e3/"${OSX_SDK}" + echo "${OSX_SDK_SHA256} ${OSX_SDK}" | sha256sum -c +fi + +tar -xzf "${OSX_SDK}" + +popd + +RAPIDCHECK=1 make build-all + +popd diff --git a/contrib/teamcity/build-configurations.sh b/contrib/teamcity/build-configurations.sh --- a/contrib/teamcity/build-configurations.sh +++ b/contrib/teamcity/build-configurations.sh @@ -27,6 +27,8 @@ THREADS=$(nproc || sysctl -n hw.ncpu) export THREADS + CMAKE_PLATFORMS_DIR="${TOPLEVEL}/cmake/platforms" + # Base directories for sanitizer related files SAN_SUPP_DIR="${TOPLEVEL}/test/sanitizer_suppressions" SAN_LOG_DIR="/tmp/sanitizer_logs" @@ -283,6 +285,22 @@ make -j "${THREADS}" all check ;; + build-win64) + "${DEVTOOLS_DIR}"/build_depends.sh + CMAKE_FLAGS=( + "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/Win64.cmake" + "-DBUILD_BITCOIN_SEEDER=OFF" + ) + CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh + + # Build all the targets that are not built as part of the default target + ninja test_bitcoin test_bitcoin-qt + + # Run the tests. Not all will run with wine, so exclude them + find src -name "libbitcoinconsensus*.dll" -exec cp {} src/test/ \; + wine ./src/test/test_bitcoin.exe --run_test=\!radix_tests,rcu_tests + ;; + check-seeds) "${DEVTOOLS_DIR}"/build_cmake.sh # Run on different ports to avoid a race where the rpc port used in the diff --git a/contrib/teamcity/setup-debian-buster.sh b/contrib/teamcity/setup-debian-buster.sh --- a/contrib/teamcity/setup-debian-buster.sh +++ b/contrib/teamcity/setup-debian-buster.sh @@ -56,6 +56,7 @@ qttools5-dev-tools software-properties-common wget + wine ) function join_by() { @@ -83,3 +84,7 @@ add-apt-repository "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" apt-get update apt-get install -y --force-yes clang-format-8 clang-tidy-8 clang-tools-8 + +# Use the mingw posix variant +update-alternatives --set x86_64-w64-mingw32-g++ $(command -v x86_64-w64-mingw32-g++-posix) +update-alternatives --set x86_64-w64-mingw32-gcc $(command -v x86_64-w64-mingw32-gcc-posix) \ No newline at end of file