2019-11-28 23:38:43 +01:00
language : cpp
dist : bionic
2018-09-18 17:07:54 +02:00
cache :
2019-11-28 23:38:43 +01:00
ccache : true
timeout : 600
2018-09-18 17:07:54 +02:00
directories :
2019-11-28 23:38:43 +01:00
- $HOME/Library/Caches/Homebrew
2018-09-18 17:07:54 +02:00
env :
global :
- CCACHE_COMPRESS=1
2019-11-28 23:38:43 +01:00
- GCC_COLORS=\
os : linux
addons :
apt :
packages : [ libboost-chrono-dev, libboost-date-time-dev, libboost-filesystem-dev, libboost-locale-dev,
libboost-thread-dev, libboost-serialization-dev, libboost-program-options-dev, libboost-regex-dev,
libboost-system-dev, libssl-dev, libzmq3-dev, libunbound-dev, libevent-dev, libsodium-dev, libreadline-dev,
libldns-dev, libgtest-dev, libhidapi-dev, libusb-1.0-0-dev, libprotobuf-dev, protobuf-compiler,
libminiupnpc-dev, python3, pkg-config, ccache]
homebrew :
update : true
packages : [ cmake, ccache, zeromq, boost, openssl@1.1, unbound, miniupnpc, libsodium, readline, ldns, hidapi, libusb, pkg-config]
2019-12-02 08:28:43 +01:00
jobs :
2019-11-28 23:38:43 +01:00
include :
- name : "bionic"
env : BUILD_TESTS=1
- name : "bionic/clang"
compiler : clang
- name : "bionic/debug"
env : CMAKE_BUILD_TYPE=Debug
- name : "xenial"
dist : xenial
- name : "macOS 10.14"
os : osx
osx_image : xcode11.2
- name : "macOS 10.13"
os : osx
osx_image : xcode9.3
- arch : arm64
- arch : s390x
- arch : ppc64le
- name : "Windows cross-compile"
addons :
apt :
packages : [ g++-mingw-w64-x86-64, qttools5-dev-tools, python3]
before_script :
- export HOST=x86_64-w64-mingw32
- sudo update-alternatives --set $HOST-g++ $(which $HOST-g++-posix)
- sudo update-alternatives --set $HOST-gcc $(which $HOST-gcc-posix)
- make -j2 -C contrib/depends HOST=$HOST NO_QT=1
- export CMAKE_OPTS="-DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/contrib/depends/$HOST/share/toolchain.cmake"
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/contrib/depends/$HOST/lib
2019-12-02 08:28:43 +01:00
fast_finish : true
allow_failures :
- name : "Windows cross-compile"
2019-12-26 18:50:18 +01:00
- arch : ppc64le
2018-09-18 17:07:54 +02:00
before_script :
2019-11-28 23:38:43 +01:00
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH" PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"; fi
- if [ "${TRAVIS_COMPILER}" = "clang" ] && ! [ -e /usr/lib/ccache/clang ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang; sudo ln -s ../../bin/ccache /usr/lib/ccache/clang++; fi
- echo $TRAVIS_COMMIT_RANGE
- git log --format=fuller -1
2018-09-18 17:07:54 +02:00
script :
2019-11-28 23:38:43 +01:00
- mkdir build
- cd build
- if [ -z "$CMAKE_BUILD_TYPE" ]; then CMAKE_BUILD_TYPE=Release; fi
- CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
- if [ -n "$BUILD_TESTS" ]; then CMAKE_OPTS="$CMAKE_OPTS -DBUILD_TESTS=$BUILD_TESTS"; fi
- cmake $CMAKE_OPTS ..
- |
set -e
if [ -z "$TRAVIS_CPU_ARCH" ] || [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
make -j2
else
# The wallet code is too bloated to be compiled at -j2 with only 4GB ram, so do the huge ones
# at -j1 and the rest at -j2.
#
make -j1 obj_rpc obj_wallet # core_rpc_server.cpp and wallet2.cpp are hogs
make -j2 daemon device_trezor # covers most things
make -j1 wallet_rpc_server # another hog, which depends on much of the above
make -j2 # everything else
fi
- if [ -n "$RUN_TESTS" ]; then make ARGS="-E libwallet_api_tests" test; fi
before_cache :
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi