forked from robotology/icub-main
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (47 loc) · 2.01 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
sudo: required
dist: trusty
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
env:
global:
- YARP_BRANCH="devel"
before_script:
#ubuntu dependencies
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo sh -c 'echo "deb http://www.icub.org/ubuntu trusty contrib/science" > /etc/apt/sources.list.d/icub.list'; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get --assume-yes --force-yes install cmake libeigen3-dev icub-common libv4lconvert0 libv4l-dev; fi
# macOS dependencies
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew upgrade python; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew tap robotology/cask; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install --only-dependencies yarp; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install gsl goocanvas sdl sdl_gfx sdl_image; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install opencv; fi
# add QT5 to path so that it can be found by CMake
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="$PATH:/usr/local/opt/qt/bin"; fi
#use the same set of cmake options used in the dashboard build
- source ./admin/scripts/generate-cmake-options.sh
# Setup the YARP branch
- if [ "$TRAVIS_BRANCH" = "devel" ] ; then export YARP_BRANCH="devel" && echo "Using yarp devel branch" ; fi
#install yarp
- git clone --depth 1 -b $YARP_BRANCH https://github.com/robotology/yarp
- cd yarp
- mkdir build
- cd build
- cmake ../ -DCREATE_GUIS:BOOL=ON -DCREATE_LIB_MATH:BOOL=ON -DCREATE_OPTIONAL_CARRIERS:BOOL=ON -DENABLE_yarpcar_bayer_carrier:BOOL=ON -DENABLE_icubmod_usbCamera:BOOL=ON -DENABLE_icubmod_usbCameraRaw:BOOL=ON
- make
- sudo make install
- cd ../..
- mkdir build
- cd build
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_icubmod_usbCamera:BOOL=FALSE"; fi
- cmake ../ ${CMAKE_OPTIONS}
script:
- cmake --build .
- sudo make install
- sudo make uninstall