forked from Bitcoin-ABC/bitcoin-abc
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
118 lines (117 loc) · 7.86 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
group: deprecated-2017Q2
sudo: required
dist: xenial
language: generic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++
cache:
directories:
- depends/built
- depends/sdk-sources
- $HOME/.ccache
env:
global:
- MAKEJOBS=-j4
- RUN_TESTS=true
- CHECK_DOC=0
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
- CCACHE_SIZE=100M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
- PYTHON_DEBUG=1
- WINEDEBUG=fixme-all
- MATRIX_EVAL="CC=gcc && CXX=g++"
matrix:
# 32-bit + dash
- HOST=i686-pc-linux-gnu PACKAGES="g++-7-multilib bc python3-zmq" DEP_OPTS="NO_QT=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++ CXXFLAGS=-coverage" USE_SHELL="/bin/dash"
# bitcoind
# - HOST=x86_64-unknown-linux-gnu PACKAGES="bc python3-zmq" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER -fpermissive"
# No wallet
# - HOST=x86_64-unknown-linux-gnu PACKAGES="python3 xvfb" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
# Cross-Mac
# - HOST=x86_64-apple-darwin11 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" OSX_SDK=10.11 GOAL="deploy"
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/pyenv/d' | tr "\n" ":" | sed "s|::|:|g")
- eval "${MATRIX_EVAL}"
install:
- if [ -n "$PPA" ]; then travis_retry sudo add-apt-repository "$PPA" -y; fi
- if [ -n "$DPKG_ADD_ARCH" ]; then sudo dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50
- pip install --user cpp-coveralls
before_script:
- unset CC; unset CXX
- eval "${MATRIX_EVAL}"
- export CC; export CXX
- COMPILERS="CC=$CC CXX=$CXX"
- if [ "$HOST" = "x86_64-apple-darwin11" ]; then unset CC; unset CXX; COMPILERS=""; fi
- if [ "$HOST" = "i686-pc-linux-gnu" ]; then sudo ln -s /usr/include/asm-generic /usr/include/asm ; fi
- if [ "$CHECK_DOC" = 1 ]; then contrib/devtools/check-doc.py; fi
- mkdir -p depends/SDKs depends/sdk-sources
- if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
# Start xvfb if needed, as documented at https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- if [ "$RUN_TESTS" = "true" -a "${DEP_OPTS#*NO_QT=1}" = "$DEP_OPTS" ]; then export DISPLAY=:99.0; /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac; fi
script:
- if [ "$RUN_TESTS" = "true" -a "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then while read LINE; do travis_retry gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys; fi
- if [ "$RUN_TESTS" = "true" -a "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then git fetch --unshallow; fi
- if [ "$RUN_TESTS" = "true" -a "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then contrib/verify-commits/verify-commits.sh; fi
- export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
- if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
- BITCOIN_CONFIG_ALL="$COMPILERS --disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
- depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
- set -e
- test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
- mkdir build && cd build
- ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- make distdir VERSION=$HOST
- cd wormhole-$HOST
- ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- rm -rf ./src/omnicore/*.o
- rm -rf ./src/omnicore/*.gcda
- rm -rf ./src/omnicore/*.*.gcda
- rm -rf ./src/omnicore/*.gcov
- rm -rf ./src/omnicore/*.*.gcov
- make $MAKEJOBS $GOAL >makelog.txt || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
- cat makelog.txt
- rm -rf makelog.txt
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
# - if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --quiet --exclude pruning"; fi
# - if [ "$RUN_TESTS" = "true" ]; then test/functional/test_runner.py --coverage ${extended}; fi
- ./src/test/test_bitcoin --run_test=omnicore_create_payload_tests
- ./src/test/test_bitcoin --run_test=omnicore_checkpoint_tests
- ./src/test/test_bitcoin --run_test=omnicore_create_tx_tests
- ./src/test/test_bitcoin --run_test=omnicore_crowdsale_participation_tests
- ./src/test/test_bitcoin --run_test=omnicore_dex_purchase_tests
- ./src/test/test_bitcoin --run_test=omnicore_encoding_b_tests
- ./src/test/test_bitcoin --run_test=omnicore_lock_tests
- ./src/test/test_bitcoin --run_test=omnicore_mbstring_tests
- ./src/test/test_bitcoin --run_test=omnicore_obfuscation_tests
- ./src/test/test_bitcoin --run_test=omnicore_output_restriction_tests
- ./src/test/test_bitcoin --run_test=omnicore_params_tests
- ./src/test/test_bitcoin --run_test=omnicore_rounduint64_tests
- ./src/test/test_bitcoin --run_test=omnicore_rules_txs_tests
# - ./src/test/test_bitcoin --run_test=omnicore_script_dust_tests
- ./src/test/test_bitcoin --run_test=omnicore_script_extraction_tests
# - ./src/test/test_bitcoin --run_test=omnicore_sender_bycontribution_tests
# - ./src/test/test_bitcoin --run_test=omnicore_strtoint64_tests
# - ./src/test/test_bitcoin --run_test=omnicore_swapbyteorder_tests
# - ./src/test/test_bitcoin --run_test=omnicore_tally_tests
- coveralls -b ./src/ --include ./src/omnicore --exclude ./src/bench --exclude ./src/cmake-build-debug --exclude ./src/wallet --exclude ./src/zmq --exclude ./cmake-build-debug --exclude ./undo.h --exclude ./src/omnicore/test/ --exclude ./src/rpc --exclude ./src/qt --exclude ./src/univalue --exclude ./src/primitives --exclude ./src/policy --exclude ./src/obj-test --exclude ./src/obj --exclude ./src/omnicore/res/ --exclude ./src/omnicore/.deps/ --exclude ./src/omnicore/doc --exclude ./src/script --exclude ./src/secp256k1 --exclude ./src/seeder --exclude ./src/support --exclude ./src/test --exclude ./src/leveldb/ --exclude ./src/crypto/ --exclude ./src/consensus --exclude ./src/config --exclude ./src/compat --exclude ./src/omnicore/res --exclude ./src/.deps --gcov-options '\\-lp' >cover.txt
- rm -rf cover.txt
- if [ "$RUN_TESTS" = "true" ]; then test/functional/test_runner.py whc*; fi
after_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG