Skip to content

Instantly share code, notes, and snippets.

@bpinaya
Last active October 11, 2016 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bpinaya/0820c7d43669126214931084f65c99ae to your computer and use it in GitHub Desktop.
Save bpinaya/0820c7d43669126214931084f65c99ae to your computer and use it in GitHub Desktop.
variables:
ROS_DISTRO: "indigo"
CI_SOURCE_PATH: "$CI_PROJECT_DIR"
ROS_PARALLEL_JOBS: "-j8 -l6"
before_script:
# before install
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- if [ ! -f CMakeLists.txt ]; then catkin_init_workspace; else echo "CMakeList file already there";fi
- if [ ! -f .rosinstall ]; then wstool init; else echo "rosinstall file already there";fi
- if [ -f $CI_PROJECT_NAME ]; then rm $CI_PROJECT_NAME; else echo "no past symlink";fi
- ln -s $CI_SOURCE_PATH .
# install
- cd ~/catkin_ws/src
- if [ ! -f .rosinstall ]; then wstool init; else echo "rosinstall file already there";fi
- if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
- wstool up
- cd ~/catkin_ws
- ls -a
# This is if you configure your rosdep correctly
# - rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
indigo-master:
stage: build
script:
- source /opt/ros/$ROS_DISTRO/setup.bash
- cd ~/catkin_ws
- catkin_make $( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS )
- source devel/setup.bash
- catkin_make run_tests && catkin_make test
- echo "Done with the test"
only:
- master
tags:
- ros
@bpinaya
Copy link
Author

bpinaya commented Oct 11, 2016

The -only specifies your branch, I run it on master but you can change it as you like, more modifications coming latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment