-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fee077
commit 55bde95
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
|
||
ignore: | ||
- "devel" | ||
- "docs" | ||
- "examples" | ||
- "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
################################################################################ | ||
|
||
cache: | ||
- apt | ||
|
||
# Build all valid Ubuntu/ROS combinations available on Travis VMs. | ||
language: cpp | ||
os: linux | ||
matrix: | ||
include: | ||
- name: "Bionic melodic" | ||
dist: bionic | ||
env: ROS_DISTRO=melodic | ||
|
||
# Configuration variables. All variables are global now, but this can be used to | ||
# trigger a build matrix for different ROS distributions if desired. | ||
env: | ||
global: | ||
- CI_BUILD_PROJECT_NAME=qml_ros_plugin | ||
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [trusty|xenial|...] | ||
- CI_SOURCE_PATH=$(pwd) | ||
- ROS_PARALLEL_JOBS='-j8 -l6' | ||
# Set the python path manually to include /usr/-/python2.7/dist-packages | ||
# as this is where apt-get installs python packages. | ||
- PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages | ||
|
||
################################################################################ | ||
|
||
# Install system dependencies, namely a very barebones ROS setup. | ||
before_install: | ||
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list" | ||
- sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | ||
- sudo apt-get update -qq | ||
- sudo apt-get install dpkg | ||
- sudo apt-get install -y python-catkin-pkg python-catkin-tools python-rosdep python-wstool ros-$ROS_DISTRO-ros-base ros-$ROS_DISTRO-code-coverage | ||
- source /opt/ros/$ROS_DISTRO/setup.bash | ||
# Prepare rosdep to install dependencies. | ||
- sudo rosdep init | ||
- rosdep update | ||
|
||
# Create a catkin workspace with the package under integration. | ||
install: | ||
- mkdir -p ~/catkin_ws/src | ||
- cd ~/catkin_ws/src | ||
- catkin init | ||
# Create the devel/setup.bash (run catkin_make with an empty workspace) and | ||
# source it to set the path variables. | ||
- cd ~/catkin_ws | ||
- catkin build | ||
- source devel/setup.bash | ||
# Add the package under integration to the workspace using a symlink. | ||
- cd ~/catkin_ws/src | ||
- ln -s $CI_SOURCE_PATH . | ||
|
||
# Install all dependencies | ||
before_script: | ||
# Install ros_babel_fish from source since it's not available as package yet | ||
- cd ~/catkin_ws/src | ||
- git clone https://github.com/StefanFabian/ros_babel_fish.git | ||
# package depdencies: install using rosdep. | ||
- cd ~/catkin_ws | ||
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO | ||
|
||
# Compile and test (mark the build as failed if any step fails). | ||
# | ||
# NOTE on testing: `catkin_make run_tests` will show the output of the tests | ||
# (gtest, nosetest, etc..) but always returns 0 (success) even if a test | ||
# fails. Running `catkin_test_results` aggregates all the results and returns | ||
# non-zero when a test fails (which notifies Travis the build failed). | ||
script: | ||
- source /opt/ros/$ROS_DISTRO/setup.bash | ||
- cd ~/catkin_ws | ||
- catkin build | ||
# Run the tests, ensuring the path is set correctly. | ||
- source devel/setup.bash | ||
- catkin run_tests $CI_BUILD_PROJECT_NAME && catkin_test_results | ||
# Generate coverage | ||
- catkin clean -y | ||
- catkin build $CI_BUILD_PROJECT_NAME -DENABLE_COVERAGE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug | ||
- catkin build $CI_BUILD_PROJECT_NAME --no-deps -DENABLE_COVERAGE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -v --catkin-make-args ${CI_BUILD_PROJECT_NAME}_coverage | ||
- bash <(curl -s https://codecov.io/bash) -f ./build/$CI_BUILD_PROJECT_NAME/${CI_BUILD_PROJECT_NAME}_coverage.info -R ./src/$CI_BUILD_PROJECT_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters