-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
47 lines (41 loc) · 1.99 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
sudo: required
language: cpp
services:
- docker
env:
global:
- toolset_branch: master
- ros_release: kinetic
- ubuntu_version: xenial
- docker_image: "shadowrobot/build-tools:$ubuntu_version-$ros_release"
- used_modules: check_build,software_tests #check_cache,code_style_check,check_deb_make,codecov_tool
# available modules: https://github.com/shadow-robot/sr-build-tools/blob/master/ansible/roles/ci/doc/modules.md
before_install:
# pull docker image from shadowrobot
- docker pull $docker_image
script:
# run docker image from shadowrobot in ansible working directory and and with travis build dir as mounted volume
# bash command to run in docker container consists of
# - download ximea drivers
# - extract ximea drivers
# - remove udevadm command in ximea install script (because it does not work in the docker container)
# - auto approval of firewire camera warning in ximea install script
# - install ximea drivers
# - pull latest ansible playbook files from sr robotics
# - checkout correct branch
# - run ansible playbook with provided parameters
- >
docker run -w "/home/user/sr-build-tools/ansible" -v $TRAVIS_BUILD_DIR:/host$TRAVIS_BUILD_DIR
$docker_image
bash -c "
wget -q http://www.ximea.com/downloads/recent/XIMEA_Linux_SP.tgz &&
tar xzf XIMEA_Linux_SP.tgz &&
cd package &&
sed -i -e 's/udevadm control --reload/echo removed command/g' scripts/install_steps &&
sed -i -e 's/read choice/echo automatic approval/g' scripts/install_steps &&
./install &&
cd .. &&
git pull &&
git checkout $toolset_branch &&
sudo PYTHONUNBUFFERED=1 ansible-playbook -v -i \"localhost,\" -c local docker_site.yml --tags \"travis,$used_modules\" -e \"travis_repo_dir=/host$TRAVIS_BUILD_DIR travis_is_pull_request=$TRAVIS_PULL_REQUEST ros_release=$ros_release ubuntu_version=$ubuntu_version\"
"