language: cpp script: - mkdir build - cd build - cmake -DBUILD_TESTING=ON -DDINDEXER_WITH_BUILD_DATE=on -DPBL_WITH_TESTS=off -DDINDEXER_WITH_NICE_MEDIA_TYPES=on .. - cmake --build . - ctest - cpack env: matrix: TRAVIS_EMPTY_WORKAROUND=1 global: - CMAKE_PREFIX_PATH=${TRAVIS_BUILD_DIR}/deps/opt - LATEST_RELEASE_VER="$(git describe --abbrev=0 --tags | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" gcc_deps: &gcc_deps packages: - postgresql-server-dev-9.5 - libmagic-dev - libreadline-dev - g++-5 - gcc-5 - libpq-dev - libpq5 - rpm 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; (cd boost && ./bootstrap.sh && ./b2 install --ignore-site-config --with-filesystem --with-program_options --with-system --prefix=${DEPS_DIR}/opt) > /dev/null 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 - cd ${TRAVIS_BUILD_DIR} cache: directories: - "${TRAVIS_BUILD_DIR}/deps/opt" sudo: false os: linux dist: trusty 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