-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
83 lines (66 loc) · 4.7 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
---
language: cpp
compiler: gcc
os: linux
sudo: required
dist: trusty
matrix:
fast_finish: true
env:
global:
- MAKEJOBS=-j3
- DEPS_URL=https://deps.leocoin.org/
matrix:
- BUILD=win32 HOST=i686-w64-mingw32 DISTNAME=i686-win PACKAGES="mingw-w64 g++-mingw-w64" BITS=32 MAKEFILE=makefile.linux-mingw BOOST_LIB_SUFFIX="-mt-s" OUTPUT_SUFFIX=".exe" QMAKEOPTS="-xplatform win32-g++" BOOST_THREAD_LIB_SUFFIX="_win32-mt-s"
- BUILD=win64 HOST=x86_64-w64-mingw32 DISTNAME=x86_64-win PACKAGES="mingw-w64 g++-mingw-w64" BITS=64 MAKEFILE=makefile.linux-mingw BOOST_LIB_SUFFIX="-mt-s" OUTPUT_SUFFIX=".exe" QMAKEOPTS="-xplatform win32-g++" BOOST_THREAD_LIB_SUFFIX="_win32-mt-s"
- BUILD=macosx HOST=x86_64-apple-darwin14 DISTNAME=x86_64-darwin PACKAGES="clang llvm-dev genisoimage" BOOST_LIB_SUFFIX="-mt-s" BOOST_THREAD_LIB_SUFFIX="-mt-s" DEPS=LEOcoin-deps-osx.tar.xz EXTRADEPS=osxcross.tar.xz
QMAKE_CXXFLAGS="-I/home/vagrant/deps/SDK/MacOSX10.9/usr/include -DBOOST_HAS_INT128=1" QMAKEOPTS="-xplatform macx-clang-linux" OTOOL=${HOST}-otool INSTALLNAMETOOL=${HOST}-install_name_tool STRIP=${HOST}-strip
- BUILD=linux64 MAKEFILE=makefile.unix BOOST_LIB_SUFFIX="-mt" BITS=64
# - BUILD=macosx MAKEFILE=makefile.osx BOOST_LIB_SUFFIX="-mt" TODO: osx daemon!!
before_install:
- sudo apt-get -qq update
install:
- if [ "$DEPS" == "" ]; then export DEPS=LEOcoin-deps-${BUILD}.tar.xz; fi
- export INDIR=$HOME/inputs
- export DEPSDIR=$HOME/deps${BITS}
- export PATH=$DEPSDIR/host/bin:$DEPSDIR:$DEPSDIR/bin:$PATH
- export QTDIR=$TRAVIS_BUILD_DIR
- sudo apt-get install build-essential $PACKAGES
- mkdir -p $INDIR $DEPSDIR
- cd $INDIR && wget $DEPS_URL/$DEPS `[ "$EXTRADEPS" != "" ] && echo $DEPS_URL/$EXTRADEPS`
- cd $DEPSDIR && tar xf $INDIR/$DEPS
- if [ $EXTRADEPS != "" ]; then tar xf $INDIR/$EXTRADEPS; fi
script:
- echo 'Build Daemon' && echo -en 'travis_fold:start:script.daemon\\r'
- cd $TRAVIS_BUILD_DIR/src
- if [ "$MAKEFILE" != "" ]; then make $MAKEJOBS -f $MAKEFILE HOST="$HOST" STATIC=1 OPENSSL_INCLUDE_PATH="$DEPSDIR/include" OPENSSL_LIB_PATH="$DEPSDIR/lib" DEPSDIR="$DEPSDIR" CURDIR="$TRAVIS_BUILD_DIR/src" USE_UPNP=1 BOOST_LIB_SUFFIX="$BOOST_LIB_SUFFIX" DEBUGFLAGS= && install -s LEOcoind${OUTPUT_SUFFIX} $INDIR/; fi
- echo -en 'travis_fold:end:script.daemon\\r'
- echo 'Build Qt' && echo -en 'travis_fold:start:script.qt\\r'
- cd $TRAVIS_BUILD_DIR
- qmake $QMAKEOPTS QMAKE_LRELEASE="$DEPSDIR/host/bin/lrelease" INCLUDEPATH="$DEPSDIR/include" LIBS="-L$DEPSDIR/lib" BOOST_LIB_SUFFIX="$BOOST_LIB_SUFFIX" BOOST_THREAD_LIB_SUFFIX="$BOOST_THREAD_LIB_SUFFIX" RELEASE=1 DEFINES=BOOST_THREAD_USE_LIB QMAKE_CXXFLAGS="-frandom-seed=LEOcoin $QMAKE_CXXFLAGS" USE_BUILD_INFO=1 USE_O3=1
- if [[ "$BUILD" =~ "linux" ]]; then sed -i 's^,-whole-archive -lleveldb -Wl,^,-lleveldb,^' Makefile; fi
- make $MAKEJOBS
- echo -en 'travis_fold:end:script.qt\\r'
- echo 'Package executables' && echo -en 'travis_fold:start:script.package\\r'
- export BUILD=LEOcoin_`if [ "$TRAVIS_TAG" != "" ]; then [ "${TRAVIS_TAG:0:1}" == "v" ] && echo ${TRAVIS_TAG:1}_ || echo ${TRAVIS_TAG}_; fi`${BUILD}
- export UPLOAD=${BUILD}.zip;
- if [ -d release ]; then cd release; fi
- if [ -f LEOcoin${OUTPUT_SUFFIX} ]; then install -s LEOcoin${OUTPUT_SUFFIX} $INDIR/; export UPLOAD=${BUILD}.zip; fi
- if [ -d LEOcoin.app ]; then contrib/macdeploy/createdmg; mv LEOcoin.macosx.dmg $INDIR/${BUILD}.dmg; export UPLOAD=${BUILD}.dmg; fi
- cd $INDIR
- if [ -f LEOcoin${OUTPUT_SUFFIX} ]; then zip $INDIR/$UPLOAD LEOcoin${OUTPUT_SUFFIX} LEOcoind${OUTPUT_SUFFIX}; fi
- sha256sum $UPLOAD > $INDIR/${UPLOAD}.sha256sum.txt
- echo -en 'travis_fold:end:script.package\\r'
- cd $TRAVIS_BUILD_DIR # Need to be in build dir last
after_script:
- if [ "$TRAVIS_TAG" = "" ]; then travis_retry curl --max-time 60 --upload $INDIR/$UPLOAD https://transfer.sh/$UPLOAD; fi
deploy:
- provider: releases
api_key:
secure: qzpItzq8Y5nEh+CIHWvMbygRZsYvdBeU4xOttJRXOuXG4wUzuza1o5xJCkUr+qhm+/XLH01NkFLy8jahTv7JcNa2GCBnvfoI9JGReQIlX3hi7XcrqFZb8VhMmqC7AmOs+igGgt9rusP3ZtsmOd0yjh8kKJui0sRNam3wU0iPpu6b87Gxp9wZ13l0hQm6D89+iAT+hjTkyN4lMJLYIEEin7AXDWltjx11z7tKMEQEL533gVgJ6eBSW0DxBYZ8toE0HySJb9xAW3M8D0EsZfYBRMQe+5q1cLqbNpYVPQIWs2gMFmnCdI4e+jSp0aXyy0Y9YxjBxm17z7MRixG5Tz6XfWc/9qhiBEawklF6fGjR68nky5JqNW31BEEQiBaryfl5O3OWRiM0a2V1qjOb3m90rtl3GdEK8Yu0LutQnvZSnAyut9WuQxaYc4ovdsT0XFbnEfHdego0evAfV/I8mgwTdcChM3aJGPdJZEb81/TvIZZMxVLqFkQ4Z3Cf5RxoqfFZt4DviPg6KT6dMCUTpI3uDs3SQR5gEuBczzKpUVrIuvxi2T3hV1D9VYY2MqZuGa5mu5JlMG7thA0VMeJMAhQm15TdXkmuyZwmaWkLXKfJAwpL1U3MEaQKC0wFFSUZ0km41hAaWgEtZGBQLKQCukIXb21qLR0KX8cMw5OkvBnhRxs=
file: # Linter thinks this is broken?
- $INDIR/$UPLOAD
- $INDIR/${UPLOAD}.sha256sum.txt
overwrite: true
on:
tags: true