2016-06-16 21:39:59 +00:00
|
|
|
language: cpp
|
|
|
|
script:
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2016-07-15 16:12:40 +00:00
|
|
|
- cmake -DBUILD_TESTING=ON -DDINDEXER_WITH_BUILD_DATE=on -DPBL_WITH_TESTS=off -DDINDEXER_WITH_NICE_MEDIA_TYPES=on -DDINDEXER_ENABLED_BACKENDS=postgresql,redis ..
|
2016-06-16 21:39:59 +00:00
|
|
|
- cmake --build .
|
|
|
|
- ctest
|
2016-06-17 09:00:54 +00:00
|
|
|
- cpack
|
2016-06-16 21:39:59 +00:00
|
|
|
|
|
|
|
env:
|
2016-06-17 09:00:54 +00:00
|
|
|
matrix: TRAVIS_EMPTY_WORKAROUND=1
|
2016-06-16 21:39:59 +00:00
|
|
|
global:
|
|
|
|
- CMAKE_PREFIX_PATH=${TRAVIS_BUILD_DIR}/deps/opt
|
2016-06-17 09:00:54 +00:00
|
|
|
- LATEST_RELEASE_VER="$(git describe --abbrev=0 --tags | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')"
|
2016-06-16 21:39:59 +00:00
|
|
|
|
|
|
|
gcc_deps: &gcc_deps
|
|
|
|
packages:
|
|
|
|
- postgresql-server-dev-9.5
|
|
|
|
- libmagic-dev
|
|
|
|
- libreadline-dev
|
|
|
|
- g++-5
|
|
|
|
- gcc-5
|
|
|
|
- libpq-dev
|
|
|
|
- libpq5
|
2016-06-17 09:00:54 +00:00
|
|
|
- rpm
|
2016-07-15 18:11:30 +00:00
|
|
|
- libev-dev
|
2016-06-16 21:39:59 +00:00
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
exclude:
|
|
|
|
- env: TRAVIS_EMPTY_WORKAROUND=1
|
|
|
|
|
|
|
|
include:
|
|
|
|
- compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
<<: *gcc_deps
|
|
|
|
env: CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-5 -DCMAKE_C_COMPILER=gcc-5"
|
|
|
|
|
|
|
|
- compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
<<: *gcc_deps
|
|
|
|
env: CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-5 -DCMAKE_C_COMPILER=gcc-5"
|
|
|
|
|
|
|
|
#See: https://github.com/boostorg/hana/blob/master/.travis.yml
|
|
|
|
install:
|
|
|
|
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
|
|
|
|
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
|
|
|
|
- export PATH=${DEPS_DIR}/opt/bin:${PATH}
|
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi
|
|
|
|
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.8"; export CC="clang-3.8"; fi
|
|
|
|
|
|
|
|
- BOOST_VERSION=1.61.0
|
|
|
|
|
|
|
|
# Install cmake
|
|
|
|
- |
|
|
|
|
if [ ! -f "opt/bin/cmake" ]; then
|
|
|
|
CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
|
|
|
|
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C opt
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install boost
|
|
|
|
- if [[ "${BOOST_VERSION}" == "1.60.0" ]]; then BOOST_URL="http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz"; fi
|
|
|
|
- if [[ "${BOOST_VERSION}" == "1.61.0" ]]; then BOOST_URL="http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.gz"; fi
|
|
|
|
- |
|
|
|
|
if [[ "${BOOST_URL}" != "" ]] && [ ! -d opt/include/boost ]; then
|
|
|
|
echo "Downloading boost ${BOOST_VERSION}...";
|
|
|
|
mkdir boost && travis_retry wget --quiet -O - ${BOOST_URL} | tar --strip-components=1 -xz -C boost;
|
2016-07-15 16:24:12 +00:00
|
|
|
(cd boost && ./bootstrap.sh && ./b2 install --ignore-site-config --with-filesystem --with-program_options --with-system --with-regex --prefix=${DEPS_DIR}/opt) > /dev/null
|
2016-06-16 21:39:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Install yaml-cpp
|
|
|
|
- |
|
|
|
|
if [ ! -f opt/lib/libyaml-cpp.so ]; then
|
|
|
|
mkdir yaml-cpp && travis_retry wget --quiet -O - https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz | tar --strip-components=1 -xz -C yaml-cpp
|
|
|
|
(cd yaml-cpp && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=${DEPS_DIR}/opt . && cmake --build . && make install)
|
|
|
|
fi
|
|
|
|
|
2016-07-15 18:26:42 +00:00
|
|
|
# Install hiredis
|
|
|
|
- |
|
|
|
|
if [ ! -f opt/lib/libhiredis.so ]; then
|
|
|
|
mkdir hiredis && travis_retry wget --quiet -O - https://github.com/redis/hiredis/archive/v0.13.3.tar.gz | tar --strip-components=1 -xz -C hiredis
|
2016-07-15 18:39:20 +00:00
|
|
|
(cd hiredis && make && make PREFIX=${DEPS_DIR}/opt install)
|
2016-07-15 18:26:42 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-16 21:39:59 +00:00
|
|
|
- cd ${TRAVIS_BUILD_DIR}
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- "${TRAVIS_BUILD_DIR}/deps/opt"
|
|
|
|
|
|
|
|
sudo: false
|
|
|
|
os: linux
|
|
|
|
dist: trusty
|
2016-06-17 09:00:54 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: F4MQJKc/7JBF6OUkWW9/XkEgmkVNMJLiv2lSzarSmEfmBIUYSy5rvq3HP5GY/Bo7l7dwb7t0IdQcUrfiPPbpDSlPcCRpNPnDUwxv25RYNUrtWTxUQ03BbwZTdWKYbRVP99JAd2KzWO+jC6JXPf8oe4vJdykNnydmqV80rIlPVbHefubrLtCm0LwHMW9n/ZsauKsZg1LSueNKtVB0vIbV0Ff2AZM1YCDnTS6EobM8QlbsefDlRmrv7FzC2akTJYzDIsCxyL27j8NLw0aFmtdCRdKwoHJitT8Y3AhymsjZZpqXAVdWPBHhev4APw1nnALkLG2wlYjGNjkYvIyJWw9MQXstDF3nrmhZoIrvFvBPd/VOKr4lxYyQPf7L2oNTpJ4n4jqMg+gD3tnhq9QuCKyqIgfTH5Ejwo5C5KaznkcDVUyhhsGfGZOPKH0MFWZHDokks3b3DVLgwK398bRGIJ/dyvhMikOA2pDHCXmhpKIO1A1SpvIKmx0S1rY5AgD7QCi9X934RHEPLci2VJsJrI5qi0ttTvBoMbUPM6oet1w7VdsXW+XJn00fis7bUdKOxK9YK8+7GYWmeb7lMS8i+VMiZwj92YBadwalxNaydgAi52ALBGld1nUwnIf7UzTmfHc6s43Bhzw8TiucJPEviHnGa71P5ESqpD2hBsUR4LTIIOk=
|
|
|
|
file:
|
|
|
|
- "$TRAVIS_BUILD_DIR/dindexer-${LATEST_RELEASE_VER}-Linux.deb"
|
|
|
|
- "$TRAVIS_BUILD_DIR/dindexer-${LATEST_RELEASE_VER}-Linux.rpm"
|
|
|
|
- "$TRAVIS_BUILD_DIR/dindexer-${LATEST_RELEASE_VER}-Linux.tar.gz"
|
|
|
|
on:
|
|
|
|
repo: KingDuckZ/dindexer
|
|
|
|
tags: true
|