-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
72 lines (62 loc) · 2.13 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
# Use new container infrastructure to enable caching
sudo: required
dist: trusty
# Choose a lightweight base image; we provide our own build tools.
language: c
# GHC depends on GMP. You can add other dependencies here as well.
addons:
apt:
packages:
- libgmp-dev
- build-essential
- cmake
- git
- libgtk2.0-dev
- pkg-config
- libavcodec-dev
- libavformat-dev
- libswscale-dev
- python-dev
- python-numpy
- libtbb2
- libtbb-dev
- libjpeg-dev
- libpng-dev
- libtiff-dev
- libjasper-dev
- libdc1394-22-dev
# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
- ARGS="--jobs 2 --resolver lts-14.4" CACHE_NAME=LTS_14_4_CV_3_4_5
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -q
- sudo apt-get install gcc-7 g++-7 -y
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 1000 --slave /usr/bin/g++ g++ /usr/bin/g++-7
- sudo update-alternatives --auto gcc
# Install OpenCV 3
- ./travis-build-opencv
- export PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config):$HOME/usr/lib/pkgconfig
- export INCLUDE_PATH=$HOME/usr/include:${INCLUDE_PATH}
- export LD_LIBRARY_PATH=$HOME/usr/lib:${LD_LIBRARY_PATH}
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
# around some quirks in Travis's terminal implementation.
before_cache:
- rm -f $HOME/fresh-cache
script:
- stack --no-terminal --install-ghc build --only-dependencies $ARGS
- stack --no-terminal test --only-dependencies $ARGS
#- stack --no-terminal haddock --only-dependencies $ARGS -- too long :(
- bash trampoline.sh
# Caching so the next build will be fast too.
cache:
timeout: 1000
directories:
- $HOME/.stack
- $HOME/usr