2013-12-03 10:08:55 +08:00
|
|
|
language: go
|
2017-10-05 23:08:56 +08:00
|
|
|
sudo: required
|
2017-05-03 02:18:11 +08:00
|
|
|
dist: trusty
|
2016-12-08 20:36:44 +08:00
|
|
|
go_import_path: gobot.io/x/gobot
|
2013-12-03 10:08:55 +08:00
|
|
|
go:
|
2017-11-05 06:26:01 +08:00
|
|
|
- 1.8.4
|
2017-11-07 03:26:08 +08:00
|
|
|
- 1.9.2
|
2017-04-30 19:10:04 +08:00
|
|
|
- tip
|
2015-07-16 04:00:01 +08:00
|
|
|
matrix:
|
2017-04-30 19:10:04 +08:00
|
|
|
allow_failures:
|
|
|
|
- go: tip
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
2017-10-05 23:05:10 +08:00
|
|
|
- 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
|
2017-04-30 19:36:55 +08:00
|
|
|
- libsdl2-dev
|
|
|
|
- libsdl2-image-dev
|
2017-05-03 02:19:44 +08:00
|
|
|
- libsdl2-2.0.0
|
2017-04-30 19:36:55 +08:00
|
|
|
- libusb-dev
|
|
|
|
- xvfb
|
|
|
|
- unzip
|
2014-06-14 09:03:50 +08:00
|
|
|
before_install:
|
2017-10-05 23:05:10 +08:00
|
|
|
- ./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
|
2017-04-30 19:10:04 +08:00
|
|
|
- cd $HOME/gopath/src/gobot.io/x/gobot
|
|
|
|
- go get github.com/axw/gocov/gocov
|
2017-11-05 06:26:01 +08:00
|
|
|
- go get -u github.com/golang/dep/cmd/dep
|
2017-10-05 23:05:10 +08:00
|
|
|
before_cache:
|
2017-11-05 06:26:01 +08:00
|
|
|
- rm -f $HOME/fresh-cache
|
2016-10-03 14:25:07 +08:00
|
|
|
install:
|
2017-11-05 06:26:01 +08:00
|
|
|
- dep ensure
|
2014-07-24 08:00:41 +08:00
|
|
|
before_script:
|
2017-04-30 19:10:04 +08:00
|
|
|
- export DISPLAY=:99.0
|
|
|
|
- sh -e /etc/init.d/xvfb start
|
2013-12-03 10:08:55 +08:00
|
|
|
script:
|
2017-10-05 23:05:10 +08:00
|
|
|
- export CGO_CPPFLAGS="-I${HOME}/usr/include"
|
2017-11-05 06:26:01 +08:00
|
|
|
- export CGO_LDFLAGS="-L${HOME}/usr/lib -lopencv_core -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_calib3d"
|
|
|
|
- echo "Running tests"
|
|
|
|
- make test_with_coverage
|
|
|
|
- echo "Checking that code is well-formatted"
|
2017-11-05 06:36:09 +08:00
|
|
|
- make fmt_check
|
2017-02-16 20:20:04 +08:00
|
|
|
after_success:
|
2017-04-30 19:10:04 +08:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2014-01-21 15:22:41 +08:00
|
|
|
branches:
|
2017-04-30 19:10:04 +08:00
|
|
|
except:
|
|
|
|
- gobot.io
|
|
|
|
- /^gobot-.*$/
|
2017-02-16 20:20:04 +08:00
|
|
|
secure: "HggklzWOwKqImvjQe1yvojCoTaUBDrOVXRjsrZaoTaKpUtmho1tpCMtKF1dbyT0T5Y68P6f9e/XyANWVeziJNZ+YmNkY+CNdNYHiNnpl8att3MuL4hpwKDPAqLK8H2G+71j3O/rBvf6oIJHtSEesR5Sbb+2fSmhNFtLrDgp5FZA="
|
2017-10-05 23:05:10 +08:00
|
|
|
# Caching so the next build will be fast as possible.
|
|
|
|
cache:
|
|
|
|
timeout: 1000
|
|
|
|
directories:
|
|
|
|
- $HOME/usr
|