forked from libbitcoin/libbitcoin-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (87 loc) · 4.83 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
###############################################################################
# Copyright (c) 2014-2019 libbitcoin-protocol developers (see COPYING).
#
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
#
###############################################################################
sudo:
- false
language:
- cpp
addons:
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
matrix:
include:
- os: osx
compiler: clang
env: LINK=dynamic
- os: osx
compiler: clang
env: LINK=static
- os: linux
compiler: clang
env: LINK=dynamic
- os: linux
compiler: clang
env: LINK=static
addons:
apt:
sources:
- sourceline: 'ppa:h-rayflood/llvm'
packages:
- clang-5.0
- os: linux
compiler: gcc
env: LINK=dynamic
addons:
apt:
packages:
- g++-4.8
- os: linux
compiler: gcc
env: LINK=static
fast_finish:
- true
before_install:
# Set aliases for readability.
- if [[ $CC == gcc ]]; then GCC=true; fi
- if [[ $CC == clang ]]; then CLANG=true; fi
- if [[ $LINK == static ]]; then STATIC=true; fi
- if [[ $LINK == dynamic ]]; then DYNAMIC=true; fi
- if [[ $TRAVIS_OS_NAME == osx ]]; then OSX=true; fi
- if [[ $TRAVIS_OS_NAME == linux ]]; then LINUX=true; fi
# Update homebrew.
- if [[ $OSX && $CLANG ]]; then brew update; fi
install:
# Export CC/CXX to control compiler/version.
- if [[ $OSX && $CLANG && $STATIC ]]; then export CC=clang; export CXX=clang++; fi
- if [[ $LINUX && $CLANG && $STATIC ]]; then export CC=clang-5.0; export CXX=clang++-5.0; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then export CC=gcc; export CXX=g++; fi
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then export CC=clang; export CXX=clang++; fi
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then export CC=clang; export CXX=clang++; fi
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then export CC=gcc-4.8; export CXX=g++-4.8; fi
# Download and install packages.
script:
# Download and build libbitcoin-protocol and all dependencies.
- if [[ $OSX && $CLANG && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --disable-shared --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix; fi
- if [[ $LINUX && $CLANG && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --disable-shared --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --build-mbedtls --disable-shared --build-dir=my-build --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Og -g --coverage' CXXFLAGS='-Og -g --coverage'; fi
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-zmq --build-mbedtls --disable-static; fi
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --build-mbedtls --disable-ndebug --disable-static --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --disable-static --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os -s' CXXFLAGS='-Os -s'; fi
after_success:
# Download and unpack lcov > 1.10
- if [[ $LINUX && $GCC && $STATIC ]]; then wget https://github.com/linux-test-project/lcov/releases/download/v1.12/lcov-1.12.tar.gz; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then tar xzf lcov-1.12.tar.gz; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then cd lcov-1.12; PREFIX="$TRAVIS_BUILD_DIR/my-prefix" make install; cd ..; fi
# Install coveralls.
- if [[ $LINUX && $GCC && $STATIC ]]; then gem install coveralls-lcov; fi
# Capture coverage info, filter out system and test code, and debug before upload.
- if [[ $LINUX && $GCC && $STATIC ]]; then $TRAVIS_BUILD_DIR/my-prefix/usr/bin/lcov --directory . --capture --output-file coverage.info; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then $TRAVIS_BUILD_DIR/my-prefix/usr/bin/lcov --remove coverage.info "/usr/*" "$TRAVIS_BUILD_DIR/my-prefix/*" "my-build/*" "test/*" "interface.pb.*" --output-file coverage.info; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then $TRAVIS_BUILD_DIR/my-prefix/usr/bin/lcov --list coverage.info; fi
# Upload coverage info to coveralls service (--repo-token <private coveralls repo token>).
- if [[ $LINUX && $GCC && $STATIC ]]; then coveralls-lcov coverage.info; fi