forked from plusone-robotics/rapp-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (50 loc) · 2.89 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
# Generic RAPP Platform Travis Continuous Integration Configuration File
# Author: Manos Tsardoulias, Aris Thallas
# Contact: [email protected], aris.thallas@{iti.gr, gmail.com}
sudo: required
dist: trusty
language: generic
compiler:
- gcc
env:
global:
- secure: jctNCksS3N66zVjML58EHB9FqRi6HaGV4o32Y+84epKt4vP0RMxuf5MrWAUDvZVAs9ojstG9LHni39tlCvmAulEGWNbeq6J8aVe3H+BaazXsSmfXZh+8IXqt1nc9T40Tw0DmsMTcExZwdjL5om1mLlaHGsnGKGUzjamEYXKORKM=
matrix:
- TEST_SUITE: UNIT1
- TEST_SUITE: UNIT2
- TEST_SUITE: INTEGRATION
- TEST_SUITE: DOCUMENTATION
before_install: # Use this to prepare the system to install prerequisites or dependencies
# Define some config vars
- export ROS_DISTRO=indigo
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- export RAPP_WS=~/rapp_platform/rapp-platform-catkin-ws
- export RAPP_PL=$RAPP_WS/src/rapp-platform
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
# Perform system updates and install needed packages
- echo "Installing needed libraries"
- sudo apt-get update &> /dev/null
- sudo apt-get install -qq -y git mercurial screen &> /dev/null
install: true # Use this to install any prerequisites or dependencies necessary to run your build
script: # All commands must exit with code 0 on success. Anything else is considered failure.
# First test the install scripts
- echo "Performing clean installation of rapp-platform"
- if [[ `git ls-remote --heads --exit-code https://github.com/rapp-project/rapp-platform-scripts.git "$TRAVIS_BRANCH"` ]]; then SCRIPTS_BRANCH="$TRAVIS_BRANCH"; else SCRIPTS_BRANCH="devel"; fi
- echo "Cloning rapp-scripts, branch $SCRIPTS_BRANCH"
- git clone --recursive --branch="$SCRIPTS_BRANCH" https://github.com/rapp-project/rapp-platform-scripts.git
- cd rapp-platform-scripts/setup
#- source /opt/ros/$ROS_DISTRO/setup.bash
- if [[ "$TEST_SUITE" == "INTEGRATION" ]]; then bash clean_install.sh travis ; else bash clean_install_travis_unit.sh travis ; fi
- source ~/.bashrc
- sudo ldconfig
- echo "RAPP Platform installed. Executing unit and functional tests"
# Run unit and functional tests
- cd $RAPP_WS
- if [[ "$TEST_SUITE" == "UNIT1" ]]; then catkin_make run_tests -j1 && catkin_test_results ; fi
- if [[ "$TEST_SUITE" == "UNIT2" ]]; then catkin_make tests -j1 && catkin_make test -j1; catkin_test_results --verbose ; fi
# Run integration tests
- if [[ "$TEST_SUITE" == "INTEGRATION" ]]; then echo "Initiating integration tests" && bash ~/rapp_platform/rapp-platform-scripts/deploy/deploy_rapp_ros.sh & screen -d -m ~/rapp_platform/rapp-platform-scripts/deploy/deploy_web_services.sh && sleep 30 && echo "Executing normal integration tests" && rosrun rapp_testing_tools rapp_run_test.py ; fi
after_success:
# Create documentation on conditions
- if [[ "$TEST_SUITE" == "DOCUMENTATION" ]]; then cd ~/rapp_platform/rapp-platform-scripts/documentation && bash travis_ci_documentation.sh; fi