forked from robotology/gazebo-yarp-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (69 loc) · 2.16 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
75
76
77
78
language: cpp
sudo: false
dist: trusty
cache: ccache
services:
- docker
env:
global:
- PROJECT_DIR_ABS=$TRAVIS_BUILD_DIR
- YARP_DOCKER_TAG="master"
matrix:
- GAZEBO_VERSION=gazebo7 GAZEBO_YARP_PLUGINS_BUILD_TYPE=Debug
- GAZEBO_VERSION=gazebo7 GAZEBO_YARP_PLUGINS_BUILD_TYPE=Release
- GAZEBO_VERSION=gazebo8 GAZEBO_YARP_PLUGINS_BUILD_TYPE=Debug
- GAZEBO_VERSION=gazebo8 GAZEBO_YARP_PLUGINS_BUILD_TYPE=Release
compiler:
- gcc
- clang
before_install:
# Pull the docker containers
- if [ ! $TRAVIS_BRANCH = "master" ] ; then YARP_DOCKER_TAG="devel" ; fi
- docker pull robotology/yarp:${YARP_DOCKER_TAG}
- docker pull robotology/yarp-tdd:${GAZEBO_VERSION}${YARP_DOCKER_TAG}
before_script:
# Run the yarpserver as background container
- >-
docker run -d -it
-p 10000:10000
--name yarp-server
robotology/yarp:${YARP_DOCKER_TAG}
yarpserver
# Run CMake into the persistent $PROJECT_DIR_ABS folder
- cd $PROJECT_DIR_ABS
- mkdir build
- >-
docker run -it --rm
-v "$HOME/.ccache:/root/.ccache"
-v "$PROJECT_DIR_ABS:/app" -w /app
-e CC=$CC
-e CXX=$CXX
robotology/yarp-tdd:${GAZEBO_VERSION}${YARP_DOCKER_TAG}
sh -c 'cd build && cmake -DCMAKE_BUILD_TYPE=${GAZEBO_YARP_PLUGINS_BUILD_TYPE} -DALLOW_IDL_GENERATION:BOOL=OFF ./..'
script:
# Build the project
- >-
docker run -it --rm
-v "$HOME/.ccache:/root/.ccache"
-v "$PROJECT_DIR_ABS:/app" -w /app
-e CC=$CC
-e CXX=$CXX
robotology/yarp-tdd:${GAZEBO_VERSION}${YARP_DOCKER_TAG}
sh -c 'cd build && make'
# Install and execute the project
- >-
docker run -it --rm
-v "$PROJECT_DIR_ABS:/app" -w /app
-v "$HOME/.ccache:/root/.ccache"
-e CC=$CC
-e CXX=$CXX
-e GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:/app/build/robotology/gazebo-yarp-plugins/build:/usr/local/lib
robotology/yarp-tdd:${GAZEBO_VERSION}${YARP_DOCKER_TAG}
sh -c 'cd build && make install && yarp detect --write && testrunner --verbose --suit /icub-tests/suits/basics-icubGazeboSim.xml'
after_script:
# Stop and remove running containers
- docker stop yarp-server
- docker rm yarp-server
notifications:
email: