forked from robotology/idyntree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
78 lines (71 loc) · 3.37 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
sudo: required
dist: trusty
osx_image: xcode7.3
language: cpp
cache: ccache
matrix:
include:
- os: linux
compiler: clang
env: TRAVIS_CMAKE_GENERATOR="Unix Makefiles", TRAVIS_BUILD_TYPE="Debug", VALGRIND_TESTS="ON", COMPILE_BINDINGS="ON"
- os: linux
compiler: clang
env: TRAVIS_CMAKE_GENERATOR="Unix Makefiles", TRAVIS_BUILD_TYPE="Release", VALGRIND_TESTS="ON", COMPILE_BINDINGS="ON"
- os: linux
compiler: gcc
env: TRAVIS_CMAKE_GENERATOR="Unix Makefiles", TRAVIS_BUILD_TYPE="Debug", VALGRIND_TESTS="ON", COMPILE_BINDINGS="ON"
- os: linux
compiler: gcc
env: TRAVIS_CMAKE_GENERATOR="Unix Makefiles", TRAVIS_BUILD_TYPE="Release",VALGRIND_TESTS="ON", COMPILE_BINDINGS="ON"
- os: osx
compiler: gcc
env: TRAVIS_CMAKE_GENERATOR="Unix Makefiles", TRAVIS_BUILD_TYPE="Debug", VALGRIND_TESTS="OFF", COMPILE_BINDINGS="OFF"
allow_failures:
- os: osx
compiler: clang
env: TRAVIS_CMAKE_GENERATOR="Xcode", TRAVIS_BUILD_TYPE="Release", VALGRIND_TESTS="OFF", COMPILE_BINDINGS="OFF"
before_script:
# workaround around opencv linking problem in clang:
# http://stackoverflow.com/questions/12689304/ctypes-error-libdc1394-error-failed-to-initialize-libdc1394
- sudo ln /dev/null /dev/raw1394
- cmake --version
- cd ..
# Install ccache on osx
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ccache; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
# Use ccache also for clang and clang++ on linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CC" == "clang" ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" == "clang++" ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang++; fi; fi
# use superbuild for getting iDynTree dependencies
- git clone https://github.com/robotology/codyco-superbuild
- cd codyco-superbuild
# install dependencies using the codyco-superbuild script
- chmod +x ./.ci/travis-deps.sh
- sh .ci/travis-deps.sh
- mkdir build
- cd build
- export CMAKE_PREFIX_PATH=`pwd`/install
# using the YCM_EP_MAINTAINER_MODE variable to enable the subproject-dependees target
- cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCODYCO_TRAVIS_CI:BOOL=ON -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DYCM_EP_MAINTAINER_MODE:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE ..
- cmake --build . --target iDynTree-dependees
- pwd
- cd ../..
# Prepare iDynTree build
- cd idyntree
- mkdir build
- cd build
# Xcode has support for multiple configurations. Passing -DCMAKE_BUILD_TYPE is ignored
- cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=${VALGRIND_TESTS} -DCODYCO_TRAVIS_CI:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=${COMPILE_BINDINGS} -DIDYNTREE_USES_LUA:BOOL=${COMPILE_BINDINGS} -DIDYNTREE_USES_OCTAVE:BOOL=OFF ..
script:
- cmake --build . --config ${TRAVIS_BUILD_TYPE}
- sudo cmake --build . --config ${TRAVIS_BUILD_TYPE} --target install
- ctest --output-on-failure --build-config ${TRAVIS_BUILD_TYPE}
# test examples
- cd ../examples
- mkdir build
- cd build
- cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCODYCO_TRAVIS_CI:BOOL=ON -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ..
- cmake --build . --config ${TRAVIS_BUILD_TYPE}
notifications:
email:
- pegua1@gmail.com