-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
179 lines (171 loc) · 6.46 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
sudo: required
dist: focal
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# gcc
- gcc
- g++
# build tools
- cmake
# libraries
- libace-dev
- libboost-dev
- libgsl0-dev
- libtinyxml-dev
env:
global:
- URDF_PARSER_PY_REPOSITORY_URL="https://github.com/ros/urdf_parser_py.git"
- SIMMECHANICS_TO_URDF_REPOSITORY_URL="https://github.com/robotology/simmechanics-to-urdf.git"
- DEPLOYMENT_REPOSITORY_TOKEN="github.com/robotology/icub-models.git"
- TRIGGERING_BRANCH_VALID_FOR_DEPLOYMENT="master"
- TRIGGERING_REPOSITORY_URL_VALID_FOR_DEPLOYMENT="https://github.com/robotology/icub-model-generator.git"
- BOT_USER_NAME="LOC2Bot"
- ICUB_MODELS_BRANCH="devel"
# For all dependencies, we use fixed releases to avoid regression due to
# changes in the dependencies. In particular, we use the latest released
# version as of 16 Septembter 2019, except for some dependencies that use
# specific commits, more details are provided in inline comments
before_script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install libeigen3-dev; fi
# Save the url of the repository and the user-name of the committ author
- export CURRENT_REPOSITORY_URL=`git remote get-url origin`
- COMMIT_AUTHOR="$(git --no-pager show -s --format='%an <%ae>' $TRAVIS_COMMIT)"
# Start in the parent directory of icub-model-generator
- cd ..
- sudo apt-get install --assume-yes --force-yes python-lxml python-yaml python-numpy python-setuptools
# probably python on the path return a python interpreter and the find_package(PythonInterp) in CMake another,
# let's install both debian packages and pip packages to be sure
- sudo pip install lxml numpy pyyaml catkin_pkg
# install urdf_parser_py and save the last commit SHA1 hash
- git clone $URDF_PARSER_PY_REPOSITORY_URL
- cd urdf_parser_py
# workaround for https://github.com/robotology/simmechanics-to-urdf/issues/36
- git checkout 31474b9baaf7c3845b40e5a9aa87d5900a2282c3
- export URDF_PARSER_PY_COMMIT=`git rev-parse HEAD`
- sudo python setup.py install
- cd ../
# install simmechanics-to-urdf and save the last commit SHA1 hash
- git clone $SIMMECHANICS_TO_URDF_REPOSITORY_URL
- cd simmechanics-to-urdf
- export SIMMECHANICS_TO_URDF_COMMIT=`git rev-parse HEAD`
- sudo python setup.py install
- cd ../
# copy output folders and add the environment variable
- git clone -b $ICUB_MODELS_BRANCH https://$DEPLOYMENT_REPOSITORY_TOKEN
- cd icub-models
- export ICUB_MODELS_SOURCE_DIR=`pwd`
- cd ../
# get C++ dependencies and save their last commit SHA1 hash
# ycm
- git clone https://github.com/robotology/ycm.git
- cd ycm
- git checkout v0.11.3
- mkdir build
- cd build
- cmake ..
- sudo cmake --build . --target install
- cd ../..
## yarp
- git clone https://github.com/robotology/yarp.git
- cd yarp
- git checkout v3.4.0
- export YARP_COMMIT=`git rev-parse HEAD`
- mkdir build
- cd build
- cmake -DCREATE_LIB_MATH:BOOL=ON ..
- sudo cmake --build . --target install
- cd ../..
## icub-main
- git clone https://github.com/robotology/icub-main.git
- cd icub-main
- git checkout v1.17.0
- export ICUB_MAIN_COMMIT=`git rev-parse HEAD`
- mkdir build
- cd build
- cmake ..
- sudo cmake --build . --target install
- cd ../..
## orocos_kdl
- git clone https://github.com/orocos/orocos_kinematics_dynamics
- cd orocos_kinematics_dynamics/orocos_kdl
- git checkout v1.4.0
- mkdir build
- cd build
- cmake ..
- sudo cmake --build . --target install
- cd ../../..
## console_bridge
- git clone https://github.com/ros/console_bridge
- cd console_bridge
# Go the commit of the 7th Septmber 2018 for
# console_bridge, urdfdom_headers and urdfdom, see
# https://travis-ci.org/robotology/icub-model-generator/builds/425819092?utm_source=github_status&utm_medium=notification
- git checkout ad25f7307da76be2857545e7e5c2a20727eee542
- mkdir build
- cd build
- cmake ..
- sudo cmake --build . --target install
- cd ../..
# urdfdom_headers
- git clone https://github.com/ros/urdfdom_headers
- cd urdfdom_headers
- git checkout e7e0972a4617b8a5df7a274ea3ba3b92e3895a35
- mkdir build
- cd build
- cmake ..
- sudo cmake --build . --target install
- cd ../..
# urdfdom
- git clone https://github.com/ros/urdfdom
- cd urdfdom
- git checkout 06f5f9bc34f09b530d9f3743cb0516934625da54
- mkdir build
- cd build
- cmake ..
- sudo cmake --build . --target install
- cd ../..
## idyntree
- git clone https://github.com/robotology/idyntree.git
- cd idyntree
- git checkout v0.11.1
- export IDYNTREE_COMMIT=`git rev-parse HEAD`
- mkdir build
- cd build
- cmake -DIDYNTREE_USES_KDL:BOOL=ON ..
- sudo cmake --build . --target install
- cd ../..
# Install sdformat
- sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
- wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install --assume-yes --force-yes libsdformat6-dev
# Prepare icub-model-generator build
- cd icub-model-generator
- mkdir build
- cd build
- cmake -D ICUB_MODELS_SOURCE_DIR=$ICUB_MODELS_SOURCE_DIR ..
script:
- make VERBOSE=1
- sudo cmake --build .
- ctest --output-on-failure
- sudo cmake --build . --target copy-models-to-icub-models
after_success:
# IF the build was triggered by a valid `repository url` on a valid `branch`, THEN commit the new models to the `deployment` repository
- if [[ $TRAVIS_BRANCH == $TRIGGERING_BRANCH_VALID_FOR_DEPLOYMENT && $CURRENT_REPOSITORY_URL == $TRIGGERING_REPOSITORY_URL_VALID_FOR_DEPLOYMENT && $TRAVIS_EVENT_TYPE == push ]]; then
cd $ICUB_MODELS_SOURCE_DIR;
git remote rm origin;
git remote add origin https://$BOT_USER_NAME:$BOT_TOKEN@$DEPLOYMENT_REPOSITORY_TOKEN;
git add --all;
git commit -a -m "Automatic build. Travis build:$TRAVIS_BUILD_NUMBER" -m "icub-model-generator commit:$TRAVIS_COMMIT"
-m "urdf_parser_py commit:$URDF_PARSER_PY_COMMIT" -m "simmechanics-to-urdf commit:$SIMMECHANICS_TO_URDF_COMMIT"
-m "yarp commit:$YARP_COMMIT" -m "icub-main commit:$ICUB_MAIN_COMMIT" -m "idyntree commit:$IDYNTREE_COMMIT" --author "$COMMIT_AUTHOR";
git push --set-upstream --quiet origin $ICUB_MODELS_BRANCH;
fi
notifications:
email:
- pegua1@gmail.com