forked from usgs/hazdev-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (53 loc) · 1.93 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
# travis file for java and c++, does not include gtest or doxygen.
language: java
jdk:
- openjdk10
sudo: false
# add modern c++
addons:
apt:
packages:
- g++-5
- gcc-5
- cppcheck
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
sources:
- ubuntu-toolchain-r-test
# before_install
# add modern cmake
install:
# set compilers
- export CXX="g++-5"
- export CC="gcc-5"
# All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
# Install a recent CMake (unless already installed on OS X)
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
if [[ -z "$(ls -A ${DEPS_DIR}/cmake/bin)" ]]; then
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz"
mkdir -p cmake && travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake
fi
export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
else
if ! brew ls --version cmake &>/dev/null; then brew install cmake; fi
fi
# unzip and build librdkafka
- unzip ${TRAVIS_BUILD_DIR}/lib/librdkafka-1.7.0.zip -d ${DEPS_DIR} && cd ${DEPS_DIR}/librdkafka-1.7.0
- pwd
- export LIBRDKAFKA_PATH=$(pwd)
- ./configure
- make
script:
- cd ${TRAVIS_BUILD_DIR}/java
- ant
- cd ${TRAVIS_BUILD_DIR}/cpp
- mkdir build
- mkdir dist
- cd build
- cmake -DBUILD_EXAMPLES=0 -DRUN_CPPCHECK=1 -DRUN_CPPLINT=1 -DGENERATE_DOCUMENTATION=1 -DCMAKE_INSTALL_PREFIX=../dist -DRAPIDJSON_PATH=${TRAVIS_BUILD_DIR}/lib/rapidjson -DLIBRDKAFKA_C_LIB=${DEPS_DIR}/librdkafka-1.7.0/src/librdkafka.a -DLIBRDKAFKA_CPP_LIB=${DEPS_DIR}/librdkafka-1.7.0/src-cpp/librdkafka++.a -DLIBRDKAFKA_PATH=${DEPS_DIR}/librdkafka-1.7.0 -DCPPLINT_PATH=${TRAVIS_BUILD_DIR}/lib/cpplint/cpplint.py -DCPPCHECK_PATH=/usr/bin/cppcheck .. && make install