Commit 9bb271f1 authored by Evgeniy Fominov's avatar Evgeniy Fominov Committed by Davis E. King

Travis CI Integration scripts (#294)

parent a8c51cea
language: cpp
packages: &gcc5_pkgs
- gcc-5
- g++-5
- libstdc++6
matrix:
include:
# build and run all tests
- compiler: gcc
env:
- GCC_VER=5
- ADDRESS_MODEL=64
- BUILD_SYSTEM=cmake
- PATH=$HOME/bin:$PATH
- VARIANT=test
addons: &ao_gcc5
apt:
sources:
- ubuntu-toolchain-r-test
packages: *gcc5_pkgs
# build all examples
- compiler: gcc
env:
- GCC_VER=5
- ADDRESS_MODEL=64
- BUILD_SYSTEM=cmake
- PATH=$HOME/bin:$PATH
- VARIANT=examples
addons: *ao_gcc5
cache:
directories:
- cmake
before_install:
- dlib/travis/before-install.sh
install:
- if [ "$CXX" == "g++" ]; then export CXX=g++-$GCC_VER; export CC=gcc-$GCC_VER; fi
- if [ "$CXX" == "clang++" ]; then export CXX=clang++-$CLANG_VER; export CC=clang-$CLANG_VER; fi
script:
- dlib/travis/build-and-test.sh
notifications:
email:
false
#!/usr/bin/env bash
# Exit if anything fails.
set -eux
## download CMAKE 3.5 to get colored output
if [[ ! -x cmake/bin/cmake && -d cmake ]]; then
rm -rf cmake
fi
if [[ ! -d cmake ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
mkdir -v cmake
wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
fi
#!/usr/bin/env bash
# Exit if anything fails.
set -eux
# build dlib and tests
mkdir build
cd build
if [ "$VARIANT" = "test" ]; then
../cmake/bin/cmake ../dlib/test -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build . --target dtest -- -j 2
./dtest --runall
fi
if [ "$VARIANT" = "examples" ]; then
../cmake/bin/cmake ../examples -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build . -- -j 2
fi
cd ..
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment