mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Added travis tests to make sure we work with old versions of cmake.
This commit is contained in:
parent
2fdc731077
commit
cd2c6e3a5b
16
.travis.yml
16
.travis.yml
@ -38,6 +38,15 @@ matrix:
|
||||
script:
|
||||
- dlib/travis/build-and-test.sh
|
||||
|
||||
###################
|
||||
- language: cpp
|
||||
compiler: gcc
|
||||
os: linux
|
||||
env:
|
||||
- VARIANT=old-cmake
|
||||
script:
|
||||
- dlib/travis/build-and-test.sh
|
||||
|
||||
###################
|
||||
- language: cpp
|
||||
compiler: gcc
|
||||
@ -104,4 +113,9 @@ matrix:
|
||||
# - dlib/travis/build-and-test.sh
|
||||
|
||||
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- cmake
|
||||
|
||||
before_install:
|
||||
- dlib/travis/before-install.sh
|
||||
|
22
dlib/travis/before-install.sh
Executable file
22
dlib/travis/before-install.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Exit if anything fails.
|
||||
set -eux
|
||||
|
||||
## download CMAKE to get colored output
|
||||
if [[ ! -x cmake/3.5/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 -p cmake/3.5
|
||||
wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake/3.5
|
||||
|
||||
CMAKE_URL="http://www.cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.tar.gz"
|
||||
mkdir -p cmake/2.8
|
||||
wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake/2.8
|
||||
|
||||
CMAKE_URL="http://www.cmake.org/files/v3.1/cmake-3.1.2-Linux-x86_64.tar.gz"
|
||||
mkdir -p cmake/3.1
|
||||
wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake/3.1
|
||||
fi
|
@ -30,6 +30,23 @@ if [ "$VARIANT" = "tools" ]; then
|
||||
cmake --build . -- -j 2
|
||||
fi
|
||||
|
||||
# The point of this test is just to make sure the cmake scripts work with the
|
||||
# oldest version of cmake we are supposed to support.
|
||||
if [ "$VARIANT" = "old-cmake" ]; then
|
||||
mkdir build
|
||||
cd build
|
||||
../cmake/2.8/bin/cmake ../dlib/test/tools
|
||||
../cmake/2.8/bin/cmake --build . -- -j 2
|
||||
|
||||
rm -rf *
|
||||
../cmake/3.1/bin/cmake ../dlib/test/tools
|
||||
../cmake/3.1/bin/cmake --build . -- -j 2
|
||||
|
||||
rm -rf *
|
||||
../cmake/3.5/bin/cmake ../dlib/test/tools
|
||||
../cmake/3.5/bin/cmake --build . -- -j 2
|
||||
fi
|
||||
|
||||
if [ "$VARIANT" = "examples" ]; then
|
||||
mkdir build
|
||||
cd build
|
||||
|
Loading…
Reference in New Issue
Block a user