mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge pull request #4741 from kittywhiskers/ci2
backport: bitcoin#16597, #17176, #14794, #17205, #17240, #17367, #18862, #21405 (ci reworking: part 2)
This commit is contained in:
commit
ef8cf4bfea
@ -179,28 +179,20 @@ i686-pc-linux-gnu:
|
||||
variables:
|
||||
HOST: i686-pc-linux-gnu
|
||||
|
||||
x86_64-unknown-linux-gnu-debug:
|
||||
x86_64-pc-linux-gnu-debug:
|
||||
extends: .build-depends-template
|
||||
variables:
|
||||
HOST: x86_64-unknown-linux-gnu
|
||||
HOST: x86_64-pc-linux-gnu
|
||||
DEP_OPTS: "DEBUG=1"
|
||||
|
||||
x86_64-unknown-linux-gnu-nowallet:
|
||||
x86_64-pc-linux-gnu-nowallet:
|
||||
extends:
|
||||
- .build-depends-template
|
||||
- .skip-in-fast-mode-template
|
||||
variables:
|
||||
HOST: x86_64-unknown-linux-gnu
|
||||
HOST: x86_64-pc-linux-gnu
|
||||
DEP_OPTS: "NO_WALLET=1"
|
||||
|
||||
x86_64-unknown-linux-gnu-release:
|
||||
extends:
|
||||
- .build-depends-template
|
||||
- .skip-in-fast-mode-template
|
||||
variables:
|
||||
HOST: x86_64-unknown-linux-gnu
|
||||
DEP_OPTS: "NO_UPNP=1"
|
||||
|
||||
x86_64-apple-darwin19:
|
||||
extends:
|
||||
- .build-depends-template
|
||||
@ -247,21 +239,21 @@ linux32_ubsan-build:
|
||||
linux64-build:
|
||||
extends: .build-template
|
||||
needs:
|
||||
- x86_64-unknown-linux-gnu-debug
|
||||
- x86_64-pc-linux-gnu-debug
|
||||
variables:
|
||||
BUILD_TARGET: linux64
|
||||
|
||||
linux64_cxx20-build:
|
||||
extends: .build-template
|
||||
needs:
|
||||
- x86_64-unknown-linux-gnu-debug
|
||||
- x86_64-pc-linux-gnu-debug
|
||||
variables:
|
||||
BUILD_TARGET: linux64_cxx20
|
||||
|
||||
linux64_fuzz-build:
|
||||
extends: .build-template
|
||||
needs:
|
||||
- x86_64-unknown-linux-gnu-debug
|
||||
- x86_64-pc-linux-gnu-debug
|
||||
variables:
|
||||
BUILD_TARGET: linux64_fuzz
|
||||
|
||||
@ -270,7 +262,7 @@ linux64_tsan-build:
|
||||
- .build-template
|
||||
- .skip-in-fast-mode-template
|
||||
needs:
|
||||
- x86_64-unknown-linux-gnu-debug
|
||||
- x86_64-pc-linux-gnu-debug
|
||||
variables:
|
||||
BUILD_TARGET: linux64_tsan
|
||||
|
||||
@ -279,19 +271,10 @@ linux64_nowallet-build:
|
||||
- .build-template
|
||||
- .skip-in-fast-mode-template
|
||||
needs:
|
||||
- x86_64-unknown-linux-gnu-nowallet
|
||||
- x86_64-pc-linux-gnu-nowallet
|
||||
variables:
|
||||
BUILD_TARGET: linux64_nowallet
|
||||
|
||||
linux64_release-build:
|
||||
extends:
|
||||
- .build-template
|
||||
- .skip-in-fast-mode-template
|
||||
needs:
|
||||
- x86_64-unknown-linux-gnu-release
|
||||
variables:
|
||||
BUILD_TARGET: linux64_release
|
||||
|
||||
mac-build:
|
||||
extends:
|
||||
- .build-template
|
||||
|
32
.travis.yml
32
.travis.yml
@ -6,6 +6,7 @@ dist: xenial
|
||||
|
||||
os: linux
|
||||
language: minimal
|
||||
arch: amd64
|
||||
|
||||
services:
|
||||
- docker
|
||||
@ -13,7 +14,12 @@ services:
|
||||
cache:
|
||||
ccache: true
|
||||
directories:
|
||||
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
|
||||
- $BASE_BUILD_DIR/ci/scratch/.ccache
|
||||
# macOS
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- /usr/local/Homebrew
|
||||
before_cache:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
||||
env:
|
||||
global:
|
||||
# DOCKER_HUB_USER
|
||||
@ -153,7 +159,7 @@ install:
|
||||
- export PULL_REQUEST="$TRAVIS_PULL_REQUEST"
|
||||
- export COMMIT_RANGE="$TRAVIS_COMMIT_RANGE"
|
||||
- export JOB_NUMBER="$TRAVIS_JOB_NUMBER"
|
||||
- export HOST_SRC_DIR=$TRAVIS_BUILD_DIR
|
||||
- export HOST_SRC_DIR=$BASE_BUILD_DIR
|
||||
- export HOST_CACHE_DIR=$HOME/cache
|
||||
- export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
|
||||
- source ./ci/matrix.sh
|
||||
@ -230,32 +236,42 @@ after_success:
|
||||
- stage: test
|
||||
name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh"
|
||||
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
|
||||
# x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan))
|
||||
- stage: test
|
||||
name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_amd64_trusty.sh"
|
||||
FILE_ENV="./ci/test/00_setup_env_native_trusty.sh"
|
||||
|
||||
- stage: test
|
||||
name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]'
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_amd64_tsan.sh"
|
||||
FILE_ENV="./ci/test/00_setup_env_native_tsan.sh"
|
||||
# x86_64 Linux (no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer)
|
||||
- stage: test
|
||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_amd64_asan.sh"
|
||||
FILE_ENV="./ci/test/00_setup_env_native_asan.sh"
|
||||
|
||||
- stage: test
|
||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh"
|
||||
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
|
||||
- stage: test
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_amd64_nowallet.sh"
|
||||
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
|
||||
|
||||
- stage: test
|
||||
name: 'macOS 10.12 [GOAL: deploy] [no functional tests]'
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_mac.sh"
|
||||
|
||||
- stage: test
|
||||
name: 'macOS 10.14 native [GOAL: install] [GUI: BIP70 enabled] [no depends]'
|
||||
os: osx
|
||||
# Use the most recent version:
|
||||
# Xcode 11, macOS 10.14, JDK 12.0.1
|
||||
# https://docs.travis-ci.com/user/reference/osx/#macos-version
|
||||
osx_image: xcode11
|
||||
env: >-
|
||||
FILE_ENV="./ci/test/00_setup_env_mac_host.sh"
|
||||
|
@ -9,7 +9,7 @@ DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
|
||||
DOCKER_TAG=${DOCKER_TAG:-latest}
|
||||
DOCKER_RELATIVE_PATH=contrib/containers/deploy
|
||||
|
||||
BUILD_DIR=${BUILD_DIR:-.}
|
||||
BASE_BUILD_DIR=${BASE_BUILD_DIR:-.}
|
||||
|
||||
|
||||
if [ -d $DOCKER_RELATIVE_PATH/bin ]; then
|
||||
@ -17,9 +17,9 @@ if [ -d $DOCKER_RELATIVE_PATH/bin ]; then
|
||||
fi
|
||||
|
||||
mkdir $DOCKER_RELATIVE_PATH/bin
|
||||
cp "$BUILD_DIR"/src/dashd $DOCKER_RELATIVE_PATH/bin/
|
||||
cp "$BUILD_DIR"/src/dash-cli $DOCKER_RELATIVE_PATH/bin/
|
||||
cp "$BUILD_DIR"/src/dash-tx $DOCKER_RELATIVE_PATH/bin/
|
||||
cp "$BASE_BUILD_DIR"/src/dashd $DOCKER_RELATIVE_PATH/bin/
|
||||
cp "$BASE_BUILD_DIR"/src/dash-cli $DOCKER_RELATIVE_PATH/bin/
|
||||
cp "$BASE_BUILD_DIR"/src/dash-tx $DOCKER_RELATIVE_PATH/bin/
|
||||
strip $DOCKER_RELATIVE_PATH/bin/dashd
|
||||
strip $DOCKER_RELATIVE_PATH/bin/dash-cli
|
||||
strip $DOCKER_RELATIVE_PATH/bin/dash-tx
|
||||
|
@ -33,13 +33,13 @@ fi
|
||||
|
||||
ccache --max-size=$CCACHE_SIZE
|
||||
|
||||
if [ -n "$USE_SHELL" ]; then
|
||||
export CONFIG_SHELL="$USE_SHELL"
|
||||
if [ -n "$CONFIG_SHELL" ]; then
|
||||
export CONFIG_SHELL="$CONFIG_SHELL"
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$BUILD_DIR/depends/$HOST --bindir=$OUT_DIR/bin --libdir=$OUT_DIR/lib"
|
||||
BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$BASE_BUILD_DIR/depends/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
|
||||
|
||||
( test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' ) || ./autogen.sh
|
||||
( test -n "$CONFIG_SHELL" && eval '"$CONFIG_SHELL" -c "./autogen.sh"' ) || ./autogen.sh
|
||||
|
||||
rm -rf build-ci
|
||||
mkdir build-ci
|
||||
|
@ -5,105 +5,30 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export BUILD_TARGET=${BUILD_TARGET:-linux64}
|
||||
export PULL_REQUEST=${PULL_REQUEST:-false}
|
||||
export JOB_NUMBER=${JOB_NUMBER:-1}
|
||||
|
||||
export BUILDER_IMAGE_NAME="dash-builder-$BUILD_TARGET-$JOB_NUMBER"
|
||||
|
||||
export HOST_SRC_DIR=${HOST_SRC_DIR:-$(pwd)}
|
||||
export HOST_CACHE_DIR=${HOST_CACHE_DIR:-$(pwd)/ci-cache-$BUILD_TARGET}
|
||||
|
||||
export SRC_DIR=${SRC_DIR:-$HOST_SRC_DIR}
|
||||
export BUILD_DIR=$SRC_DIR
|
||||
export OUT_DIR=$BUILD_DIR/out
|
||||
|
||||
export CACHE_DIR=${CACHE_DIR:-$HOST_CACHE_DIR}
|
||||
export CCACHE_DIR=$CACHE_DIR/ccache
|
||||
|
||||
export DOCKER_RUN_VOLUME_ARGS="-v $HOST_SRC_DIR:$SRC_DIR -v $HOST_CACHE_DIR:$CACHE_DIR"
|
||||
export DOCKER_RUN_ENV_ARGS="-e SRC_DIR=$SRC_DIR -e CACHE_DIR=$CACHE_DIR -e PULL_REQUEST=$PULL_REQUEST -e COMMIT_RANGE=$COMMIT_RANGE -e JOB_NUMBER=$JOB_NUMBER -e BUILD_TARGET=$BUILD_TARGET"
|
||||
export DOCKER_RUN_ARGS="$DOCKER_RUN_VOLUME_ARGS $DOCKER_RUN_ENV_ARGS"
|
||||
export DOCKER_RUN_IN_BUILDER="docker run -t --rm -w $SRC_DIR $DOCKER_RUN_ARGS $BUILDER_IMAGE_NAME"
|
||||
|
||||
# Default values for targets
|
||||
export GOAL="install"
|
||||
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||
MAKEJOBS="-j$(nproc)"
|
||||
export MAKEJOBS
|
||||
|
||||
export RUN_UNITTESTS=true
|
||||
export RUN_INTEGRATIONTESTS=true
|
||||
source ./ci/test/00_setup_env.sh
|
||||
|
||||
# Configure sanitizers options
|
||||
export TSAN_OPTIONS="suppressions=${SRC_DIR}/test/sanitizer_suppressions/tsan"
|
||||
export UBSAN_OPTIONS="suppressions=${SRC_DIR}/test/sanitizer_suppressions/ubsan"
|
||||
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan"
|
||||
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan"
|
||||
|
||||
if [ "$BUILD_TARGET" = "arm-linux" ]; then
|
||||
export HOST=arm-linux-gnueabihf
|
||||
export CHECK_DOC=1
|
||||
# -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 --enable-suppress-external-warnings --enable-werror CXXFLAGS=-Wno-psabi"
|
||||
export RUN_UNITTESTS=false
|
||||
export RUN_INTEGRATIONTESTS=false
|
||||
source ./ci/test/00_setup_env_arm.sh
|
||||
elif [ "$BUILD_TARGET" = "win64" ]; then
|
||||
export HOST=x86_64-w64-mingw32
|
||||
export DPKG_ADD_ARCH="i386"
|
||||
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
|
||||
export DIRECT_WINE_EXEC_TESTS=true
|
||||
source ./ci/test/00_setup_env_win64.sh
|
||||
elif [ "$BUILD_TARGET" = "linux32" ]; then
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks"
|
||||
export USE_SHELL="/bin/dash"
|
||||
export PYZMQ=true
|
||||
source ./ci/test/00_setup_env_i686.sh
|
||||
elif [ "$BUILD_TARGET" = "linux32_ubsan" ]; then
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=undefined"
|
||||
export USE_SHELL="/bin/dash"
|
||||
export PYZMQ=true
|
||||
source ./ci/test/00_setup_env_i686_ubsan.sh
|
||||
elif [ "$BUILD_TARGET" = "linux64" ]; then
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
||||
source ./ci/test/00_setup_env_native_qt5.sh
|
||||
elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=thread"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
||||
source ./ci/test/00_setup_env_native_tsan.sh
|
||||
elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export BITCOIN_CONFIG="--enable-zmq --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
||||
export RUN_UNITTESTS=false
|
||||
export RUN_INTEGRATIONTESTS=false
|
||||
source ./ci/test/00_setup_env_native_fuzz.sh
|
||||
elif [ "$BUILD_TARGET" = "linux64_cxx20" ]; then
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --enable-c++20 --enable-suppress-external-warnings --enable-werror"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
||||
export RUN_INTEGRATIONTESTS=false
|
||||
source ./ci/test/00_setup_env_native_cxx20.sh
|
||||
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DEP_OPTS="NO_WALLET=1"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports"
|
||||
elif [ "$BUILD_TARGET" = "linux64_release" ]; then
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DEP_OPTS="NO_UPNP=1"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
|
||||
export PYZMQ=true
|
||||
source ./ci/test/00_setup_env_native_nowallet.sh
|
||||
elif [ "$BUILD_TARGET" = "mac" ]; then
|
||||
export HOST=x86_64-apple-darwin19
|
||||
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --enable-werror"
|
||||
export XCODE_VERSION=11.3.1
|
||||
export XCODE_BUILD_ID=11C505
|
||||
export GOAL="all deploy"
|
||||
export RUN_UNITTESTS=false
|
||||
export RUN_INTEGRATIONTESTS=false
|
||||
source ./ci/test/00_setup_env_mac.sh
|
||||
fi
|
||||
|
@ -10,12 +10,12 @@ PASS_ARGS="$*"
|
||||
|
||||
source ./ci/dash/matrix.sh
|
||||
|
||||
if [ "$RUN_INTEGRATIONTESTS" != "true" ]; then
|
||||
if [ "$RUN_INTEGRATION_TESTS" != "true" ]; then
|
||||
echo "Skipping integration tests"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH=$BUILD_DIR/depends/$HOST/lib
|
||||
export LD_LIBRARY_PATH=$BASE_BUILD_DIR/depends/$HOST/lib
|
||||
|
||||
cd build-ci/dashcore-$BUILD_TARGET
|
||||
|
||||
|
@ -8,20 +8,21 @@ set -e
|
||||
|
||||
source ./ci/dash/matrix.sh
|
||||
|
||||
if [ "$RUN_UNITTESTS" != "true" ]; then
|
||||
if [ "$RUN_UNIT_TESTS" != "true" ]; then
|
||||
echo "Skipping unit tests"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# TODO this is not Travis agnostic
|
||||
export BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
|
||||
export LD_LIBRARY_PATH=$BUILD_DIR/depends/$HOST/lib
|
||||
export LD_LIBRARY_PATH=$BASE_BUILD_DIR/depends/$HOST/lib
|
||||
|
||||
export WINEDEBUG=fixme-all
|
||||
export BOOST_TEST_LOG_LEVEL=test_suite
|
||||
|
||||
cd build-ci/dashcore-$BUILD_TARGET
|
||||
|
||||
bash -c "${CI_WAIT}" & # Print dots in case the unit tests take a long time to run
|
||||
if [ "$DIRECT_WINE_EXEC_TESTS" = "true" ]; then
|
||||
# Inside Docker, binfmt isn't working so we can't trust in make invoking windows binaries correctly
|
||||
wine ./src/test/test_dash.exe
|
||||
|
@ -13,32 +13,42 @@ if [ -n "${FILE_ENV}" ]; then
|
||||
source "${FILE_ENV}"
|
||||
fi
|
||||
|
||||
export BUILD_TARGET=${BUILD_TARGET:-linux64}
|
||||
export PULL_REQUEST=${PULL_REQUEST:-false}
|
||||
export JOB_NUMBER=${JOB_NUMBER:-1}
|
||||
|
||||
BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
|
||||
export BASE_ROOT_DIR
|
||||
|
||||
echo "Fallback to default values in env (if not yet set)"
|
||||
# The number of parallel jobs to pass down to make and test_runner.py
|
||||
export MAKEJOBS=${MAKEJOBS:--j4}
|
||||
MAKEJOBS="-j$(nproc)"
|
||||
export MAKEJOBS
|
||||
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
|
||||
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch/}
|
||||
export HOST=${HOST:-x86_64-unknown-linux-gnu}
|
||||
# What host to compile for. See also ./depends/README.md
|
||||
# Tests that need cross-compilation export the appropriate HOST.
|
||||
# Tests that run natively guess the host
|
||||
export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
|
||||
# Whether to prefer BusyBox over GNU utilities
|
||||
export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
|
||||
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
|
||||
export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}
|
||||
export RUN_INTEGRATION_TESTS=${RUN_INTEGRATION_TESTS:-true}
|
||||
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
||||
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04}
|
||||
# Randomize test order.
|
||||
# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
|
||||
export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
|
||||
export HOST_CACHE_DIR=${HOST_CACHE_DIR:-$BASE_ROOT_DIR/ci-cache-$BUILD_TARGET}
|
||||
export CACHE_DIR=${CACHE_DIR:-$HOST_CACHE_DIR}
|
||||
export CCACHE_SIZE=${CCACHE_SIZE:-100M}
|
||||
export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}
|
||||
export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
|
||||
export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
|
||||
export CCACHE_DIR=${CCACHE_DIR:-$CACHE_DIR/ccache}
|
||||
# Folder where the build is done (depends and dist). Can not be changed and is equal to the root of the git repo
|
||||
export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_ROOT_DIR}
|
||||
# Folder where the build is done (bin and lib). Can not be changed.
|
||||
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_BUILD_DIR/out/$HOST}
|
||||
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_BUILD_DIR/out}
|
||||
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||
export WINEDEBUG=${WINEDEBUG:-fixme-all}
|
||||
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git}
|
||||
@ -46,3 +56,9 @@ export GOAL=${GOAL:-install}
|
||||
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_BUILD_DIR}/qa-assets}
|
||||
export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH
|
||||
export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}
|
||||
# Dash's Docker-specifics
|
||||
export BUILDER_IMAGE_NAME="dash-builder-$BUILD_TARGET-$JOB_NUMBER"
|
||||
export DOCKER_RUN_VOLUME_ARGS="-v $BASE_ROOT_DIR:$BASE_ROOT_DIR -v $HOST_CACHE_DIR:$CACHE_DIR"
|
||||
export DOCKER_RUN_ENV_ARGS="-e BASE_ROOT_DIR=$BASE_ROOT_DIR -e CACHE_DIR=$CACHE_DIR -e PULL_REQUEST=$PULL_REQUEST -e COMMIT_RANGE=$COMMIT_RANGE -e JOB_NUMBER=$JOB_NUMBER -e BUILD_TARGET=$BUILD_TARGET"
|
||||
export DOCKER_RUN_ARGS="$DOCKER_RUN_VOLUME_ARGS $DOCKER_RUN_ENV_ARGS"
|
||||
export DOCKER_RUN_IN_BUILDER="docker run -t --rm -w $BASE_ROOT_DIR $DOCKER_RUN_ARGS $BUILDER_IMAGE_NAME"
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
||||
export DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
|
||||
export TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\""
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DOCKER_NAME_TAG=ubuntu:14.04
|
||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no"
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DOCKER_NAME_TAG=ubuntu:16.04
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_FUNCTIONAL_TESTS=false # Disabled for now. TODO identify suppressions or exclude specific tests
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=thread --disable-hardening --disable-asm CC=clang CXX=clang++"
|
7
ci/test/00_setup_env_arm.sh
Normal file → Executable file
7
ci/test/00_setup_env_arm.sh
Normal file → Executable file
@ -14,10 +14,11 @@ export QEMU_USER_CMD="${QEMU_USER_CMD:"qemu-arm -L /usr/arm-linux-gnueabihf/"}"
|
||||
# the target is required, so install both.
|
||||
export DPKG_ADD_ARCH="armhf"
|
||||
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
|
||||
export CHECK_DOC=1
|
||||
export USE_BUSY_BOX=true
|
||||
export RUN_UNIT_TESTS=true
|
||||
export RUN_FUNCTIONAL_TESTS=true
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_INTEGRATION_TESTS=false
|
||||
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-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --enable-suppress-external-warnings --enable-werror CXXFLAGS=-Wno-psabi"
|
||||
|
4
ci/test/00_setup_env_i686.sh
Normal file → Executable file
4
ci/test/00_setup_env_i686.sh
Normal file → Executable file
@ -7,7 +7,9 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export DEP_OPTS="NO_PROTOBUF=1"
|
||||
export PACKAGES="g++-multilib python3-zmq"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=undefined"
|
||||
export CONFIG_SHELL="/bin/dash"
|
||||
export PYZMQ=true
|
||||
|
14
ci/test/00_setup_env_i686_ubsan.sh
Executable file
14
ci/test/00_setup_env_i686_ubsan.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export PACKAGES="g++-multilib python3-zmq"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --disable-bip70 --enable-reduce-exports --enable-crash-hooks --with-sanitizers=undefined"
|
||||
export CONFIG_SHELL="/bin/dash"
|
||||
export PYZMQ=true
|
6
ci/test/00_setup_env_mac.sh
Normal file → Executable file
6
ci/test/00_setup_env_mac.sh
Normal file → Executable file
@ -11,6 +11,6 @@ export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev l
|
||||
export XCODE_VERSION=11.3.1
|
||||
export XCODE_BUILD_ID=11C505
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="deploy"
|
||||
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
|
||||
export RUN_INTEGRATION_TESTS=false
|
||||
export GOAL="all deploy"
|
||||
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --enable-werror"
|
||||
|
19
ci/test/00_setup_env_mac_host.sh
Executable file
19
ci/test/00_setup_env_mac_host.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-apple-darwin19
|
||||
export BREW_PACKAGES="automake berkeley-db4 libtool boost miniupnpc pkg-config protobuf qt qrencode python3 ccache zeromq"
|
||||
export PIP_PACKAGES="zmq"
|
||||
export RUN_CI_ON_HOST=true
|
||||
export RUN_UNIT_TESTS=true
|
||||
export RUN_INTEGRATION_TESTS=false
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --enable-werror"
|
||||
# Run without depends
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
16
ci/test/00_setup_env_native_cxx20.sh
Executable file
16
ci/test/00_setup_env_native_cxx20.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev"
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
||||
export RUN_INTEGRATION_TESTS=false
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --enable-c++20 --enable-suppress-external-warnings --enable-werror"
|
||||
|
9
ci/test/00_setup_env_amd64_fuzz.sh → ci/test/00_setup_env_native_fuzz.sh
Normal file → Executable file
9
ci/test/00_setup_env_amd64_fuzz.sh → ci/test/00_setup_env_native_fuzz.sh
Normal file → Executable file
@ -6,11 +6,12 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev"
|
||||
export NO_DEPENDS=1
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export RUN_INTEGRATION_TESTS=false
|
||||
export RUN_FUZZ_TESTS=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address CC=clang CXX=clang++"
|
||||
export BITCOIN_CONFIG="--enable-zmq --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++"
|
3
ci/test/00_setup_env_amd64_nowallet.sh → ci/test/00_setup_env_native_nowallet.sh
Normal file → Executable file
3
ci/test/00_setup_env_amd64_nowallet.sh → ci/test/00_setup_env_native_nowallet.sh
Normal file → Executable file
@ -6,8 +6,7 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export PACKAGES="python3-zmq"
|
||||
export DEP_OPTS="NO_WALLET=1"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports"
|
14
ci/test/00_setup_env_native_qt5.sh
Executable file
14
ci/test/00_setup_env_native_qt5.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
# TODO: we have few rpcs that aren't covered by any test, re-enable the line below once it's fixed
|
||||
# export TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_pruning,feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
|
8
ci/test/00_setup_env_amd64_asan.sh → ci/test/00_setup_env_native_tsan.sh
Normal file → Executable file
8
ci/test/00_setup_env_amd64_asan.sh → ci/test/00_setup_env_native_tsan.sh
Normal file → Executable file
@ -6,9 +6,11 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export NO_DEPENDS=1
|
||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||
export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163)
|
||||
export RUN_BENCH=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=integer,undefined CC=clang CXX=clang++"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=thread"
|
||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||
export PYZMQ=true
|
6
ci/test/00_setup_env_win64.sh
Normal file → Executable file
6
ci/test/00_setup_env_win64.sh
Normal file → Executable file
@ -8,6 +8,8 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-w64-mingw32
|
||||
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export DPKG_ADD_ARCH="i386"
|
||||
export RUN_INTEGRATION_TESTS=false
|
||||
export GOAL="deploy"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests"
|
||||
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
|
||||
export DIRECT_WINE_EXEC_TESTS=true
|
||||
|
@ -6,12 +6,40 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
set +o errexit
|
||||
pushd /usr/local/Homebrew || exit 1
|
||||
git reset --hard origin/master
|
||||
popd || exit 1
|
||||
set -o errexit
|
||||
${CI_RETRY_EXE} brew update
|
||||
# brew upgrade returns an error if any of the packages is already up to date
|
||||
# Failure is safe to ignore, unless we really need an update.
|
||||
brew upgrade $BREW_PACKAGES || true
|
||||
|
||||
# install new packages (brew install returns an error if already installed)
|
||||
for i in $BREW_PACKAGES; do
|
||||
if ! brew list | grep -q $i; then
|
||||
${CI_RETRY_EXE} brew install $i
|
||||
fi
|
||||
done
|
||||
|
||||
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||
OPENSSL_PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH=$OPENSSL_PKG_CONFIG_PATH:$PKG_CONFIG_PATH
|
||||
|
||||
${CI_RETRY_EXE} pip3 install $PIP_PACKAGES
|
||||
|
||||
fi
|
||||
|
||||
mkdir -p "${BASE_SCRATCH_DIR}"
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
|
||||
export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan"
|
||||
export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1"
|
||||
env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
|
||||
export ASAN_OPTIONS="detect_stack_use_after_return=1"
|
||||
export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan"
|
||||
export TSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/tsan"
|
||||
export UBSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1"
|
||||
env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
|
||||
if [[ $HOST = *-mingw32 ]]; then
|
||||
DOCKER_ADMIN="--cap-add SYS_ADMIN"
|
||||
elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
@ -41,15 +69,22 @@ else
|
||||
fi
|
||||
export -f DOCKER_EXEC
|
||||
|
||||
DOCKER_EXEC free -m -h
|
||||
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
|
||||
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
|
||||
else
|
||||
DOCKER_EXEC free -m -h
|
||||
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
|
||||
fi
|
||||
|
||||
if [ -n "$DPKG_ADD_ARCH" ]; then
|
||||
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
|
||||
fi
|
||||
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
|
||||
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
|
||||
fi
|
||||
|
||||
if [ ! -d ${DIR_QA_ASSETS} ]; then
|
||||
DOCKER_EXEC git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
|
||||
|
@ -6,9 +6,12 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
DOCKER_EXEC echo \> \$HOME/.dashcore # Make sure default datadir does not exist and is never read by creating a dummy file
|
||||
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz"
|
||||
OSX_SDK_PATH="depends/sdk-sources/${OSX_SDK_BASENAME}"
|
||||
# Make sure default datadir does not exist and is never read by creating a dummy file
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
echo > $HOME/Library/Application\ Support/DashCore
|
||||
else
|
||||
DOCKER_EXEC echo \> \$HOME/.dashcore
|
||||
fi
|
||||
|
||||
DOCKER_EXEC mkdir -p depends/SDKs depends/sdk-sources
|
||||
|
||||
|
47
configure.ac
47
configure.ac
@ -833,20 +833,6 @@ AX_GCC_FUNC_ATTRIBUTE([dllexport])
|
||||
AX_GCC_FUNC_ATTRIBUTE([dllimport])
|
||||
|
||||
if test x$use_glibc_compat != xno; then
|
||||
|
||||
dnl __fdelt_chk's params and return type have changed from long unsigned int to long int.
|
||||
dnl See which one is present here.
|
||||
AC_MSG_CHECKING(__fdelt_chk type)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE
|
||||
#undef _FORTIFY_SOURCE
|
||||
#endif
|
||||
#define _FORTIFY_SOURCE 2
|
||||
#include <sys/select.h>
|
||||
extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])],
|
||||
[ fdelt_type="long unsigned int"],
|
||||
[ fdelt_type="long int"])
|
||||
AC_MSG_RESULT($fdelt_type)
|
||||
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2"])
|
||||
@ -949,39 +935,6 @@ fi
|
||||
|
||||
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
|
||||
|
||||
dnl FD_ZERO may be dependent on a declaration of memcpy, e.g. in SmartOS
|
||||
dnl check that it fails to build without memcpy, then that it builds with
|
||||
AC_MSG_CHECKING(FD_ZERO memcpy dependence)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <cstddef>
|
||||
#if HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
]],[[
|
||||
#if HAVE_SYS_SELECT_H
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
#endif
|
||||
]])],
|
||||
[ AC_MSG_RESULT(no) ],
|
||||
[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <cstring>
|
||||
#if HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
]], [[
|
||||
#if HAVE_SYS_SELECT_H
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
#endif
|
||||
]])],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CSTRING_DEPENDENT_FD_ZERO, 1, [Define this symbol if FD_ZERO is dependent of a memcpy declaration being available]) ],
|
||||
[ AC_MSG_ERROR(failed with cstring include) ]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_DECLS([getifaddrs, freeifaddrs],,,
|
||||
[#include <sys/types.h>
|
||||
#include <ifaddrs.h>]
|
||||
|
@ -686,8 +686,6 @@ libdash_util_a_SOURCES = \
|
||||
support/lockedpool.cpp \
|
||||
chainparamsbase.cpp \
|
||||
clientversion.cpp \
|
||||
compat/glibc_sanity_fdelt.cpp \
|
||||
compat/glibc_sanity.cpp \
|
||||
compat/glibcxx_sanity.cpp \
|
||||
compat/strnlen.cpp \
|
||||
fs.cpp \
|
||||
|
@ -10,26 +10,6 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
// Prior to GLIBC_2.14, memcpy was aliased to memmove.
|
||||
extern "C" void* memmove(void* a, const void* b, size_t c);
|
||||
extern "C" void* memcpy(void* a, const void* b, size_t c)
|
||||
{
|
||||
return memmove(a, b, c);
|
||||
}
|
||||
|
||||
extern "C" void __chk_fail(void) __attribute__((__noreturn__));
|
||||
extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
|
||||
{
|
||||
if (a >= FD_SETSIZE)
|
||||
__chk_fail();
|
||||
return a / __NFDBITS;
|
||||
}
|
||||
extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
|
||||
|
||||
#if defined(__i386__) || defined(__arm__)
|
||||
|
||||
extern "C" int64_t __udivmoddi4(uint64_t u, uint64_t v, uint64_t* rp);
|
||||
|
@ -1,53 +0,0 @@
|
||||
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config/dash-config.h>
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
bool sanity_test_fdelt();
|
||||
#endif
|
||||
|
||||
extern "C" void* memcpy(void* a, const void* b, size_t c);
|
||||
void* memcpy_int(void* a, const void* b, size_t c)
|
||||
{
|
||||
return memcpy(a, b, c);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
// trigger: Use the memcpy_int wrapper which calls our internal memcpy.
|
||||
// A direct call to memcpy may be optimized away by the compiler.
|
||||
// test: Fill an array with a sequence of integers. memcpy to a new empty array.
|
||||
// Verify that the arrays are equal. Use an odd size to decrease the odds of
|
||||
// the call being optimized away.
|
||||
template <unsigned int T>
|
||||
bool sanity_test_memcpy()
|
||||
{
|
||||
unsigned int memcpy_test[T];
|
||||
unsigned int memcpy_verify[T] = {};
|
||||
for (unsigned int i = 0; i != T; ++i)
|
||||
memcpy_test[i] = i;
|
||||
|
||||
memcpy_int(memcpy_verify, memcpy_test, sizeof(memcpy_test));
|
||||
|
||||
for (unsigned int i = 0; i != T; ++i) {
|
||||
if (memcpy_verify[i] != i)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
bool glibc_sanity_test()
|
||||
{
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
if (!sanity_test_fdelt())
|
||||
return false;
|
||||
#endif
|
||||
return sanity_test_memcpy<1025>();
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config/dash-config.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#ifdef HAVE_CSTRING_DEPENDENT_FD_ZERO
|
||||
#include <cstring>
|
||||
#endif
|
||||
#include <sys/select.h>
|
||||
|
||||
// trigger: Call FD_SET to trigger __fdelt_chk. FORTIFY_SOURCE must be defined
|
||||
// as >0 and optimizations must be set to at least -O2.
|
||||
// test: Add a file descriptor to an empty fd_set. Verify that it has been
|
||||
// correctly added.
|
||||
bool sanity_test_fdelt()
|
||||
{
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(0, &fds);
|
||||
return FD_ISSET(0, &fds);
|
||||
}
|
||||
#endif
|
@ -5,7 +5,6 @@
|
||||
#ifndef BITCOIN_COMPAT_SANITY_H
|
||||
#define BITCOIN_COMPAT_SANITY_H
|
||||
|
||||
bool glibc_sanity_test();
|
||||
bool glibcxx_sanity_test();
|
||||
|
||||
#endif // BITCOIN_COMPAT_SANITY_H
|
||||
|
@ -1041,7 +1041,7 @@ static bool InitSanityCheck()
|
||||
return InitError(Untranslated("Elliptic curve cryptography sanity check failure. Aborting."));
|
||||
}
|
||||
|
||||
if (!glibc_sanity_test() || !glibcxx_sanity_test())
|
||||
if (!glibcxx_sanity_test())
|
||||
return false;
|
||||
|
||||
if (!BLSInit()) {
|
||||
|
@ -12,7 +12,6 @@ BOOST_FIXTURE_TEST_SUITE(sanity_tests, BasicTestingSetup)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(basic_sanity)
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(glibc_sanity_test() == true, "libc sanity test");
|
||||
BOOST_CHECK_MESSAGE(glibcxx_sanity_test() == true, "stdlib sanity test");
|
||||
BOOST_CHECK_MESSAGE(ECC_InitSanityCheck() == true, "secp256k1 sanity test");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user