oxen-core/.travis.yml
Jason Rhinelander 743d4e60ce Various linking and build fixes
- updating to latest loki-mq (1.0.0 + various linking fixes)
- BUILD_SHARED_LIBS was being handled very strangely; make it a full
option instead (defaulting to off) that a cmake invoker can specify, as
per cmake recommendations.
- travis ci tweaks/changes:
  - Add a static bionic build
  - Simplify cmake argument code
  - Add `--version` invocation for lokid and loki-wallet-cli to test
    that the binaries were linked properly.
- always build an embedded sodium statically; if we do it dynamically
and an older system one exists we are going to have trouble.
- don't force epee and blocks to be static; rather they get controlled
by the above BUILD_SHARED_LIBS, just like all the other internal
libraries.
- use some PkgConfig:: imported targets rather than bunch-of-variables.
2020-03-15 14:29:47 -03:00

89 lines
3.4 KiB
YAML

language: cpp
dist: bionic
cache:
ccache: true
timeout: 600
directories:
- $HOME/Library/Caches/Homebrew
env:
global:
- CCACHE_COMPRESS=1
- 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, libudev-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]
jobs:
include:
- name: "bionic"
env: BUILD_TESTS=ON
- name: "bionic/static"
env: STATIC=ON
- 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
fast_finish: true
allow_failures:
- name: "Windows cross-compile"
- arch: ppc64le
- arch: arm64
before_script:
- 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
script:
- mkdir build && cd build
- cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} -DSTATIC=${STATIC:-OFF} -DBUILD_TESTS=${BUILD_TESTS:-OFF} -DDOWNLOAD_SODIUM=ON
- |
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 rpc 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
# Test that we can invoke the binaries (e.g. to test against linking failure):
- ./bin/lokid --version
- ./bin/loki-wallet-cli --version
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi