-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
88 lines (73 loc) · 2.25 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
79
80
81
82
83
84
85
86
87
88
# Authors: see AUTHORS.md at project root.
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/yarp-devices
language: cpp
dist: bionic
os: linux
compiler:
- gcc
- clang
env:
global:
- CACHE_DIR=~/cached-deps
- YCM_CHECKOUT=ycm-0.13
matrix:
- YARP_CHECKOUT=yarp-3.6
- YARP_CHECKOUT=yarp-3.5
matrix:
include:
- if: type = cron
compiler: gcc
env: ROBOTOLOGY_CHECKOUT=master
- if: type = cron
compiler: clang
env: ROBOTOLOGY_CHECKOUT=master
cache:
directories: $CACHE_DIR
addons:
apt:
packages:
- swig # bindings
- lcov # code coverage
branches:
except:
- /^.*appveyor.*$/
before_install:
#-- Code coverage
- if [ "$CXX" = "g++" ]; then gem install coveralls-lcov; fi
install:
#-- Install wiringPi
- >
if [ ! -d "$CACHE_DIR/libwiringPi" ]; then
echo "libwiringPi not in cache"
git clone --depth=1 https://github.com/asrob-uc3m/wiringPi ~/wiringPi
make -C ~/wiringPi/wiringPi -j$(nproc) install DESTDIR="$CACHE_DIR/libwiringPi" PREFIX="" LDCONFIG=""
else
echo "libwiringPi already in cache"
fi
- export wiringPi_ROOT="$CACHE_DIR/libwiringPi"
#-- Install YCM
- >
source "$TRAVIS_BUILD_DIR/scripts/travis/git-cache-dependency.sh"
--package-name YCM
--repo-url https://github.com/robotology/ycm
--repo-checkout "${ROBOTOLOGY_CHECKOUT:-$YCM_CHECKOUT}"
#-- Install YARP
- >
source "$TRAVIS_BUILD_DIR/scripts/travis/git-cache-dependency.sh"
--package-name YARP
--repo-url https://github.com/robotology/yarp
--repo-checkout "${ROBOTOLOGY_CHECKOUT:-$YARP_CHECKOUT}"
--additional-cmake-options "-DENABLE_yarpmod_serialport:BOOL=ON"
--prepend-to-linker-path lib
--additional-export-paths "YARP_DATA_DIRS;share/yarp"
before_script:
- mkdir -p "$TRAVIS_BUILD_DIR/build" && cd "$_"
- cmake .. -DCMAKE_INSTALL_PREFIX="$PWD/install" -DENABLE_coverage:BOOL=ON -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples:BOOL=ON
- make install
script:
- echo "No unit tests available"
after_success:
#-- Code coverage
- if [ "$CXX" = "g++" ]; then source "$TRAVIS_BUILD_DIR/scripts/travis/coverage.sh"; fi
- cd "$TRAVIS_BUILD_DIR/build" && make uninstall