Skip to content

Commit 84980be

Browse files
committed
v1.0.0
1 parent fea92c8 commit 84980be

File tree

1,448 files changed

+448575
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,448 files changed

+448575
-1
lines changed

.travis.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
sudo: required
2+
dist: trusty
3+
os: linux
4+
language: minimal
5+
cache:
6+
ccache: true
7+
directories:
8+
- depends/built
9+
- depends/sdk-sources
10+
- $HOME/.ccache
11+
stages:
12+
- lint
13+
- test
14+
env:
15+
global:
16+
- MAKEJOBS=-j3
17+
- RUN_UNIT_TESTS=true
18+
- RUN_FUNCTIONAL_TESTS=false # Not Yet Implemented
19+
- RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions
20+
- DOCKER_NAME_TAG=ubuntu:18.04
21+
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
22+
- CCACHE_SIZE=100M
23+
- CCACHE_TEMPDIR=/tmp/.ccache-temp
24+
- CCACHE_COMPRESS=1
25+
- CCACHE_DIR=$HOME/.ccache
26+
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
27+
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
28+
- WINEDEBUG=fixme-all
29+
- DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
30+
31+
before_install:
32+
- set -o errexit; source .travis/test_03_before_install.sh
33+
install:
34+
- set -o errexit; source .travis/test_04_install.sh
35+
before_script:
36+
- set -o errexit; source .travis/test_05_before_script.sh
37+
script:
38+
- set -o errexit; source .travis/test_06_script.sh
39+
after_script:
40+
- echo $TRAVIS_COMMIT_RANGE
41+
- echo $TRAVIS_COMMIT_LOG
42+
43+
jobs:
44+
include:
45+
# lint stage
46+
- stage: lint
47+
env:
48+
sudo: false
49+
cache: false
50+
language: python
51+
python: '3.6'
52+
install:
53+
- set -o errexit; source .travis/lint_04_install.sh
54+
before_script:
55+
- set -o errexit; source .travis/lint_05_before_script.sh
56+
script:
57+
- set -o errexit; source .travis/lint_06_script.sh
58+
# ARM
59+
- stage: test
60+
env: >-
61+
HOST=arm-linux-gnueabihf
62+
PACKAGES="python3 g++-arm-linux-gnueabihf"
63+
DEP_OPTS="NO_QT=1"
64+
RUN_UNIT_TESTS=false
65+
RUN_FUNCTIONAL_TESTS=false
66+
GOAL="install"
67+
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
68+
# This could be removed once the ABI change warning does not show up by default
69+
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi"
70+
# AArch64
71+
- stage: test
72+
env: >-
73+
HOST=aarch64-linux-gnu
74+
PACKAGES="python3 g++-aarch64-linux-gnu"
75+
DEP_OPTS="NO_QT=1"
76+
RUN_UNIT_TESTS=false
77+
RUN_FUNCTIONAL_TESTS=false
78+
GOAL="install"
79+
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
80+
# Win32
81+
- stage: test
82+
env: >-
83+
HOST=i686-w64-mingw32
84+
DPKG_ADD_ARCH="i386"
85+
DEP_OPTS="NO_QT=1"
86+
PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
87+
GOAL="install"
88+
BITCOIN_CONFIG="--enable-reduce-exports"
89+
# Win64
90+
- stage: test
91+
env: >-
92+
HOST=x86_64-w64-mingw32
93+
DEP_OPTS="NO_QT=1"
94+
PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
95+
GOAL="install"
96+
BITCOIN_CONFIG="--enable-reduce-exports"
97+
# 32-bit + dash
98+
- stage: test
99+
env: >-
100+
HOST=i686-pc-linux-gnu
101+
PACKAGES="g++-multilib python3-zmq"
102+
DEP_OPTS="NO_QT=1"
103+
GOAL="install"
104+
BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
105+
CONFIG_SHELL="/bin/dash"
106+
# x86_64 Linux (uses qt5 dev package instead of depends Qt to speed up build and avoid timeout)
107+
- stage: test
108+
env: >-
109+
HOST=x86_64-unknown-linux-gnu
110+
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev"
111+
DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
112+
GOAL="install"
113+
BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER"
114+
# x86_64 Linux (no depends, only system libs)
115+
- stage: test
116+
env: >-
117+
HOST=x86_64-unknown-linux-gnu
118+
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev libgmp-dev"
119+
NO_DEPENDS=1
120+
GOAL="install"
121+
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
122+
# x86_64 Linux (sanitizers)
123+
# - stage: test
124+
# env: >-
125+
# HOST=x86_64-unknown-linux-gnu
126+
# PACKAGES="clang python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev libgmp-dev"
127+
# NO_DEPENDS=1
128+
# RUN_BENCH=true
129+
# RUN_FUNCTIONAL_TESTS=false # Disabled for now, can be combined with the other x86_64 linux NO_DEPENDS job when functional tests pass the sanitizers
130+
# GOAL="install"
131+
# BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=undefined CC=clang CXX=clang++"
132+
# x86_64 Linux, No wallet
133+
# - stage: test
134+
# env: >-
135+
# HOST=x86_64-unknown-linux-gnu
136+
# PACKAGES="python3"
137+
# DEP_OPTS="NO_WALLET=1"
138+
# GOAL="install"
139+
# BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
140+
# Cross-Mac
141+
- stage: test
142+
env: >-
143+
HOST=x86_64-apple-darwin14
144+
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
145+
OSX_SDK=10.11
146+
RUN_UNIT_TESTS=false
147+
RUN_FUNCTIONAL_TESTS=false
148+
GOAL="all deploy"
149+
BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"

.travis/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## travis build scripts
2+
3+
The `.travis` directory contains scripts for each build step in each build stage.
4+
Currently the travis build defines two stages `lint` and `test`. Each stage has
5+
it's own [lifecycle](https://docs.travis-ci.com/user/customizing-the-build/#the-build-lifecycle).
6+
Every script in here is named and numbered according to which stage and lifecycle
7+
step it belongs to.
8+

.travis/lint_04_install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C
8+
9+
travis_retry pip install flake8

.travis/lint_05_before_script.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C
8+
9+
git fetch --unshallow

.travis/lint_06_script.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C
8+
9+
10+
contrib/devtools/git-subtree-check.sh src/secp256k1
11+
contrib/devtools/git-subtree-check.sh src/univalue
12+
contrib/devtools/git-subtree-check.sh src/leveldb
13+
contrib/devtools/check-doc.py
14+
contrib/devtools/logprint-scanner.py
15+
16+
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
17+
contrib/devtools/lint-whitespace.sh
18+
fi

.travis/test_03_before_install.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
10+
export PATH
11+
12+
BEGIN_FOLD () {
13+
echo ""
14+
CURRENT_FOLD_NAME=$1
15+
echo "travis_fold:start:${CURRENT_FOLD_NAME}"
16+
}
17+
18+
END_FOLD () {
19+
RET=$?
20+
echo "travis_fold:end:${CURRENT_FOLD_NAME}"
21+
if [ $RET != 0 ]; then
22+
echo "${CURRENT_FOLD_NAME} failed with status code ${RET}"
23+
fi
24+
}
25+

.travis/test_04_install.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
travis_retry docker pull "$DOCKER_NAME_TAG"
10+
env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
11+
if [[ $HOST = *-mingw32 ]]; then
12+
DOCKER_ADMIN="--cap-add SYS_ADMIN"
13+
fi
14+
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
15+
16+
DOCKER_EXEC () {
17+
docker exec $DOCKER_ID bash -c "cd $PWD && $*"
18+
}
19+
20+
if [ -n "$DPKG_ADD_ARCH" ]; then
21+
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
22+
fi
23+
24+
travis_retry DOCKER_EXEC apt-get update
25+
travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
26+

.travis/test_05_before_script.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
#DOCKER_EXEC echo \> \$HOME/.clr # Make sure default datadir does not exist and is never read by creating a dummy file
10+
11+
mkdir -p depends/SDKs depends/sdk-sources
12+
13+
if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
14+
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
15+
fi
16+
if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
17+
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
18+
fi
19+
if [[ $HOST = *-mingw32 ]]; then
20+
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)
21+
fi
22+
if [ -z "$NO_DEPENDS" ]; then
23+
DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
24+
fi
25+

.travis/test_06_script.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
TRAVIS_COMMIT_LOG=$(git log --format=fuller -1)
10+
export TRAVIS_COMMIT_LOG
11+
12+
OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
13+
BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
14+
if [ -z "$NO_DEPENDS" ]; then
15+
DOCKER_EXEC ccache --max-size=$CCACHE_SIZE
16+
fi
17+
18+
BEGIN_FOLD autogen
19+
if [ -n "$CONFIG_SHELL" ]; then
20+
DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
21+
else
22+
DOCKER_EXEC ./autogen.sh
23+
fi
24+
END_FOLD
25+
26+
mkdir build
27+
cd build || (echo "could not enter build directory"; exit 1)
28+
29+
BEGIN_FOLD configure
30+
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
31+
END_FOLD
32+
33+
BEGIN_FOLD distdir
34+
DOCKER_EXEC make distdir VERSION=$HOST
35+
END_FOLD
36+
37+
cd "clr-$HOST" || (echo "could not enter distdir clr-$HOST"; exit 1)
38+
39+
BEGIN_FOLD configure
40+
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
41+
END_FOLD
42+
43+
BEGIN_FOLD build
44+
DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
45+
END_FOLD
46+
47+
if [ "$RUN_UNIT_TESTS" = "true" ]; then
48+
BEGIN_FOLD unit-tests
49+
DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
50+
END_FOLD
51+
fi
52+
53+
if [ "$RUN_BENCH" = "true" ]; then
54+
BEGIN_FOLD bench
55+
DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_clr -scaling=0.001
56+
END_FOLD
57+
fi
58+
59+
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
60+
extended="--extended --exclude feature_pruning,feature_dbcrash"
61+
fi
62+
63+
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
64+
BEGIN_FOLD functional-tests
65+
DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}
66+
END_FOLD
67+
fi

0 commit comments

Comments
 (0)