forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (53 loc) · 1.47 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
# Use new container infrastructure to enable caching
sudo: required
dist: trusty
# language is go
language: go
go:
- "1.13"
go_import_path: gocv.io/x/gocv
addons:
apt:
packages:
- libgmp-dev
- build-essential
- cmake
- git
- libgtk2.0-dev
- pkg-config
- libavcodec-dev
- libavformat-dev
- libswscale-dev
- libtbb2
- libtbb-dev
- libjpeg-dev
- libpng-dev
- libtiff-dev
- libjasper-dev
- libdc1394-22-dev
- xvfb
before_install:
- ./travis_build_opencv.sh
- 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}
- sudo ln /dev/null /dev/raw1394
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_cache:
- rm -f $HOME/fresh-cache
script:
- export GOCV_CAFFE_TEST_FILES="${HOME}/testdata"
- export GOCV_TENSORFLOW_TEST_FILES="${HOME}/testdata"
- export OPENCV_ENABLE_NONFREE=ON
- echo "Ensuring code is well formatted"; ! gofmt -s -d . | read
- go test -v -coverprofile=coverage.txt -covermode=atomic -tags matprofile .
- go test -tags matprofile ./contrib -coverprofile=contrib.txt -covermode=atomic; cat contrib.txt >> coverage.txt; rm contrib.txt;
after_success:
- bash <(curl -s https://codecov.io/bash)
# Caching so the next build will be fast as possible.
cache:
timeout: 1000
directories:
- $HOME/usr
- $HOME/testdata