|
1 | | -sudo: required |
2 | | -dist: trusty |
| 1 | +# The test build matrix (stage: test) is constructed to test a wide range of |
| 2 | +# configurations, rather than a single pass/fail. This helps to catch build |
| 3 | +# failures and logic errors that present on platforms other than the ones the |
| 4 | +# author has tested. |
| 5 | +# |
| 6 | +# Some builders use the dependency-generator in `./depends`, rather than using |
| 7 | +# apt-get to install build dependencies. This guarantees that the tester is |
| 8 | +# using the same versions as Gitian, so the build results are nearly identical |
| 9 | +# to what would be found in a final release. |
| 10 | +# |
| 11 | +# In order to avoid rebuilding all dependencies for each build, the binaries |
| 12 | +# are cached and re-used when possible. Changes in the dependency-generator |
| 13 | +# will trigger cache-invalidation and rebuilds as necessary. |
| 14 | +# |
| 15 | +# These caches can be manually removed if necessary. This is one of the very |
| 16 | +# few manual operations that is possible with Travis, and it can be done by a |
| 17 | +# PIVX GitHub member via the Travis web interface [0]. |
| 18 | +# |
| 19 | +# Travis CI uploads the cache after the script phase of the build [1]. |
| 20 | +# However, the build is terminated without saving the chache if it takes over |
| 21 | +# 50 minutes [2]. Thus, if we spent too much time in early build stages, fail |
| 22 | +# with an error and save the cache. |
| 23 | +# |
| 24 | +# [0] https://travis-ci.org/ClearNode/ClearCoin/caches |
| 25 | +# [1] https://docs.travis-ci.com/user/caching/#build-phases |
| 26 | +# [2] https://docs.travis-ci.com/user/customizing-the-build#build-timeouts |
| 27 | + |
| 28 | +dist: xenial |
3 | 29 | os: linux |
4 | 30 | language: minimal |
5 | 31 | cache: |
6 | 32 | ccache: true |
7 | 33 | directories: |
8 | | - - depends/built |
9 | | - - depends/sdk-sources |
10 | | - - $HOME/.ccache |
| 34 | + - $TRAVIS_BUILD_DIR/depends/built |
| 35 | + - $TRAVIS_BUILD_DIR/depends/sdk-sources |
| 36 | + - $HOME/.ccache |
| 37 | + - $HOME/.clr-params |
11 | 38 | stages: |
12 | 39 | - lint |
| 40 | + - cmake |
13 | 41 | - test |
| 42 | + |
14 | 43 | env: |
15 | 44 | global: |
16 | 45 | - MAKEJOBS=-j3 |
17 | 46 | - RUN_UNIT_TESTS=true |
18 | | - - RUN_FUNCTIONAL_TESTS=false # Not Yet Implemented |
| 47 | + - RUN_FUNCTIONAL_TESTS=false |
19 | 48 | - 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 | 49 | - DOCKER_NAME_TAG=ubuntu:18.04 |
21 | 50 | - BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID |
22 | 51 | - CCACHE_SIZE=100M |
23 | 52 | - CCACHE_TEMPDIR=/tmp/.ccache-temp |
24 | 53 | - CCACHE_COMPRESS=1 |
25 | 54 | - CCACHE_DIR=$HOME/.ccache |
| 55 | + - PARAMS_DIR=$HOME/.clr-params |
26 | 56 | - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out |
27 | 57 | - SDK_URL=https://bitcoincore.org/depends-sources/sdks |
28 | 58 | - WINEDEBUG=fixme-all |
29 | 59 | - DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache" |
30 | | - |
| 60 | + - CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. Please manually re-run this job by using the travis restart button or asking a bitcoin maintainer to restart. The next run should not time out because the build cache has been saved." |
31 | 61 | before_install: |
32 | 62 | - set -o errexit; source .travis/test_03_before_install.sh |
33 | 63 | install: |
34 | 64 | - set -o errexit; source .travis/test_04_install.sh |
35 | 65 | before_script: |
36 | 66 | - set -o errexit; source .travis/test_05_before_script.sh |
37 | 67 | script: |
38 | | - - set -o errexit; source .travis/test_06_script.sh |
| 68 | + - export CONTINUE=1 |
| 69 | + - if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long |
| 70 | + - if [ $CONTINUE = "1" ]; then set -o errexit; source .travis/test_06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi |
| 71 | + - if [ -n ${BUILD_TIMEOUT+x} ] && [ $SECONDS -gt $BUILD_TIMEOUT ]; then export CONTINUE=0; fi |
| 72 | + - if [ $SECONDS -gt 2000 ]; then export CONTINUE=0; fi # Likely the build took very long; The tests take about 1000s, so we should abort if we have less than 50*60-1000=2000s left |
| 73 | + - if [ $CONTINUE = "1" ]; then set -o errexit; source .travis/test_06_script_b.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi |
39 | 74 | after_script: |
40 | | - - echo $TRAVIS_COMMIT_RANGE |
41 | | - - echo $TRAVIS_COMMIT_LOG |
42 | | - |
| 75 | + - echo $TRAVIS_COMMIT_RANGE |
| 76 | + - echo $TRAVIS_COMMIT_LOG |
43 | 77 | jobs: |
| 78 | + allow_failures: |
| 79 | + - stage: cmake |
| 80 | + fast_finish: true |
44 | 81 | include: |
45 | | -# lint stage |
| 82 | + |
46 | 83 | - stage: lint |
| 84 | + name: 'lint' |
47 | 85 | env: |
48 | | - sudo: false |
49 | 86 | cache: false |
50 | 87 | language: python |
51 | | - python: '3.6' |
| 88 | + python: '3.5' # Oldest supported version according to doc/dependencies.md |
52 | 89 | install: |
53 | 90 | - set -o errexit; source .travis/lint_04_install.sh |
54 | 91 | before_script: |
55 | 92 | - set -o errexit; source .travis/lint_05_before_script.sh |
56 | 93 | script: |
57 | 94 | - set -o errexit; source .travis/lint_06_script.sh |
58 | | -# ARM |
| 95 | + |
59 | 96 | - stage: test |
| 97 | + name: 'ARM 32-bit [GOAL: install] [no unit or functional tests]' |
60 | 98 | env: >- |
61 | 99 | HOST=arm-linux-gnueabihf |
62 | 100 | PACKAGES="python3 g++-arm-linux-gnueabihf" |
63 | | - DEP_OPTS="NO_QT=1" |
64 | 101 | RUN_UNIT_TESTS=false |
65 | 102 | RUN_FUNCTIONAL_TESTS=false |
66 | 103 | GOAL="install" |
67 | 104 | # -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1" |
68 | 105 | # 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 |
| 106 | + BITCOIN_CONFIG="--with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --disable-online-rust CXXFLAGS=-Wno-psabi" |
| 107 | +
|
71 | 108 | - stage: test |
| 109 | + name: 'ARM 64-bit [GOAL:install] [no unit or functional tests]' |
72 | 110 | env: >- |
73 | 111 | HOST=aarch64-linux-gnu |
74 | 112 | PACKAGES="python3 g++-aarch64-linux-gnu" |
75 | | - DEP_OPTS="NO_QT=1" |
76 | 113 | RUN_UNIT_TESTS=false |
77 | 114 | RUN_FUNCTIONAL_TESTS=false |
78 | 115 | 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 |
| 116 | + BITCOIN_CONFIG="--with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --disable-online-rust" |
| 117 | +
|
90 | 118 | - stage: test |
| 119 | + name: 'Win64 [GOAL: deploy] [no functional tests]' |
91 | 120 | env: >- |
92 | 121 | HOST=x86_64-w64-mingw32 |
93 | | - DEP_OPTS="NO_QT=1" |
94 | 122 | PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" |
95 | | - GOAL="install" |
96 | | - BITCOIN_CONFIG="--enable-reduce-exports" |
97 | | -# 32-bit + dash |
| 123 | + RUN_FUNCTIONAL_TESTS=false |
| 124 | + GOAL="deploy" |
| 125 | + BITCOIN_CONFIG="--with-gui=auto --enable-reduce-exports --disable-online-rust --with-params-dir=$PARAMS_DIR" |
| 126 | +
|
98 | 127 | - stage: test |
| 128 | + name: '32-bit + dash [GOAL: install]' |
99 | 129 | env: >- |
100 | 130 | HOST=i686-pc-linux-gnu |
101 | 131 | PACKAGES="g++-multilib python3-zmq" |
102 | | - DEP_OPTS="NO_QT=1" |
103 | 132 | GOAL="install" |
104 | | - BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" |
| 133 | + BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --disable-online-rust --with-params-dir=$PARAMS_DIR LDFLAGS=-static-libstdc++" |
105 | 134 | CONFIG_SHELL="/bin/dash" |
106 | | -# x86_64 Linux (uses qt5 dev package instead of depends Qt to speed up build and avoid timeout) |
| 135 | +
|
| 136 | + - stage: test |
| 137 | + name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout]' |
| 138 | + env: >- |
| 139 | + HOST=x86_64-unknown-linux-gnu |
| 140 | + PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libqt5svg5-dev libqt5charts5-dev libqrencode-dev protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" |
| 141 | + DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" |
| 142 | + RUN_FUNCTIONAL_TESTS=true |
| 143 | + #TEST_RUNNER_EXTRA="--coverage --extended" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash |
| 144 | + GOAL="install" |
| 145 | + BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --disable-online-rust --with-params-dir=$PARAMS_DIR" |
| 146 | + BUILD_TIMEOUT=540 |
| 147 | +
|
107 | 148 | - stage: test |
| 149 | + name: 'x86_64 Linux [GOAL: install] [bionic] [no GUI, no unit tests - only functional tests on legacy pre-HD wallets]' |
108 | 150 | env: >- |
109 | 151 | HOST=x86_64-unknown-linux-gnu |
110 | | - PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" |
| 152 | + PACKAGES="python3-zmq protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" |
111 | 153 | DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" |
| 154 | + RUN_UNIT_TESTS=false |
| 155 | + RUN_FUNCTIONAL_TESTS=true |
| 156 | + TEST_RUNNER_EXTRA="--legacywallet" # Run functional tests on pre-HD wallet |
| 157 | + GOAL="install" |
| 158 | + BITCOIN_CONFIG="--enable-zmq --with-gui=no --enable-glibc-back-compat --enable-reduce-exports --disable-online-rust --with-params-dir=$PARAMS_DIR" |
| 159 | + BUILD_TIMEOUT=800 |
| 160 | +
|
| 161 | + - stage: test |
| 162 | + name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs]' |
| 163 | + env: >- |
| 164 | + HOST=x86_64-unknown-linux-gnu |
| 165 | + DOCKER_NAME_TAG=ubuntu:16.04 |
| 166 | + PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libqt5svg5-dev libssl-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 libsodium-dev cargo" |
| 167 | + NO_DEPENDS=1 |
112 | 168 | 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) |
| 169 | + BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --disable-hardening --disable-asm --with-params-dir=$PARAMS_DIR" |
| 170 | +
|
115 | 171 | - stage: test |
| 172 | + name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs]' |
116 | 173 | env: >- |
117 | 174 | 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" |
| 175 | + PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libqt5svg5-dev libqt5charts5-dev 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 libsodium-dev cargo" |
119 | 176 | NO_DEPENDS=1 |
120 | 177 | 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) |
| 178 | + BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 --with-params-dir=$PARAMS_DIR CPPFLAGS=-DDEBUG_LOCKORDER" |
| 179 | +
|
123 | 180 | # - stage: test |
| 181 | +# name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address]' |
124 | 182 | # env: >- |
125 | 183 | # 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" |
| 184 | +# PACKAGES="clang python3-zmq qtbase5-dev qttools5-dev-tools libqt5svg5-dev libqt5charts5-dev 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 | 185 | # NO_DEPENDS=1 |
| 186 | +# RUN_UNIT_TESTS=false |
| 187 | +# RUN_FUNCTIONAL_TESTS=false |
128 | 188 | # 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 | 189 | # GOAL="install" |
131 | 190 | # 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 |
| 191 | + |
133 | 192 | # - stage: test |
| 193 | +# name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]' |
134 | 194 | # env: >- |
135 | 195 | # HOST=x86_64-unknown-linux-gnu |
136 | | -# PACKAGES="python3" |
| 196 | +# PACKAGES="python3-zmq" |
137 | 197 | # DEP_OPTS="NO_WALLET=1" |
138 | 198 | # GOAL="install" |
139 | 199 | # BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" |
140 | | -# Cross-Mac |
| 200 | + |
141 | 201 | - stage: test |
| 202 | + name: 'macOS 10.10 [GOAL: deploy] [no functional tests]' |
142 | 203 | env: >- |
143 | 204 | HOST=x86_64-apple-darwin14 |
144 | | - PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" |
| 205 | + PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools" |
145 | 206 | OSX_SDK=10.11 |
146 | 207 | RUN_UNIT_TESTS=false |
147 | 208 | RUN_FUNCTIONAL_TESTS=false |
148 | | - GOAL="all deploy" |
149 | | - BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" |
| 209 | + GOAL="deploy" |
| 210 | + BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror --disable-online-rust" |
| 211 | +
|
| 212 | + - stage: cmake |
| 213 | + name: 'CMake Linux' |
| 214 | + language: cpp |
| 215 | + compiler: |
| 216 | + - gcc |
| 217 | + addons: |
| 218 | + apt: |
| 219 | + packages: |
| 220 | + - python3-zmq qtbase5-dev qttools5-dev-tools libqt5svg5-dev libssl-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 libsodium-dev cargo |
| 221 | + before_install: |
| 222 | + - set -o errexit; source .travis/test_03_before_install.sh |
| 223 | + install: |
| 224 | + before_script: |
| 225 | + script: |
| 226 | + - set -o errexit; source .travis/cmake_06_script.sh |
| 227 | + |
| 228 | + - stage: cmake |
| 229 | + name: 'CMake macOS' |
| 230 | + os: osx |
| 231 | + osx_image: xcode11.1 |
| 232 | + language: cpp |
| 233 | + compiler: |
| 234 | + - clang |
| 235 | + addons: |
| 236 | + homebrew: |
| 237 | + packages: |
| 238 | + - python3 |
| 239 | + - ccache |
| 240 | + - autoconf |
| 241 | + - automake |
| 242 | + - berkeley-db4 |
| 243 | + - libtool |
| 244 | + - boost |
| 245 | + - miniupnpc |
| 246 | + - openssl |
| 247 | + - pkg-config |
| 248 | + - protobuf |
| 249 | + - qt5 |
| 250 | + - zmq |
| 251 | + - libevent |
| 252 | + - qrencode |
| 253 | + - gmp |
| 254 | + - libsodium |
| 255 | + - rust |
| 256 | +# Set 'update: true' below until TravisCI updates their macOS build images. |
| 257 | +# See https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/16 |
| 258 | + update: false |
| 259 | + before_install: |
| 260 | + install: |
| 261 | + before_script: |
| 262 | + script: |
| 263 | + - mkdir -p $TRAVIS_BUILD_DIR/cmake-build-debug && cd $TRAVIS_BUILD_DIR/cmake-build-debug |
| 264 | + - cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" $TRAVIS_BUILD_DIR |
| 265 | + - cmake --build $TRAVIS_BUILD_DIR/cmake-build-debug --target all -- -j 3 |
0 commit comments