-
Notifications
You must be signed in to change notification settings - Fork 97
/
.travis.yml
75 lines (62 loc) · 1.79 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
sudo: required
language: cpp
services:
- docker
cache: ccache
env:
global:
- DOCKER_CONTAINER_NAME=nikolausdemmel/ubuntu-dev-cv-gui
- CC=/usr/bin/gcc
- CXX=/usr/bin/g++
- BUILD_TYPE=Release
matrix:
include:
- os: linux
env: DIST_VERS=16.04
- os: linux
env: DIST_VERS=16.04 CC=/usr/bin/clang-5.0 CXX=/usr/bin/clang++-5.0
- os: linux
env: DIST_VERS=16.04 BUILD_TYPE=Debug
- os: linux
env: DIST_VERS=14.04
- os: osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
install: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker pull $DOCKER_CONTAINER_NAME:$DIST_VERS
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# upgrade python first, else linking python@2 fails (dependency of opencv@2)
brew upgrade python
# removing pip numpy, else installing brew numpy fails (dependency of opencv@2)
brew install python@2
/usr/bin/yes | pip uninstall numpy
# upgrade already installed
brew upgrade cmake
# install additional dependencies
brew install opencv@2 ccache
fi
script: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run --name ci -it \
-v ${TRAVIS_BUILD_DIR}:/repo \
-v $HOME/.ccache:/root/.ccache \
-e BUILD_TYPE -e CC -e CXX \
$DOCKER_CONTAINER_NAME:$DIST_VERS \
/bin/bash -c '
export PS4='\''+ \e[33;1m($0 @ line $LINENO) \$\e[0m '\'' # quotes must be escaped
set -e # exit on failure
set -x # trace for debug
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE /repo
cmake --build .'
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
cmake --build .
fi
# TODO: try w/o docker, just installing from apt; compare speed.
#jobs:
# foo: