Skip to content

[WIP] Have travis run docker to test on multiple arch #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3263f64
Testing travis matrix
louisgv Jul 27, 2018
6ea5cdb
Fix travis syntax
louisgv Jul 27, 2018
6ade99c
Fix syntax for multiple nodejs version for all distribution
louisgv Jul 27, 2018
b43087f
Update .travis.yml
louisgv Aug 13, 2018
2dc4e7c
Update .travis.yml
louisgv Aug 13, 2018
0d6bbd3
Update .travis.yml
louisgv Aug 13, 2018
5c5b95b
Update .travis.yml
louisgv Aug 13, 2018
1fd8ec5
Try kinetic for bionic
louisgv Aug 20, 2018
ea836b9
Using docker
louisgv Aug 20, 2018
f192030
Fix environment
louisgv Aug 20, 2018
723ccb8
Add matrix back into env
louisgv Aug 20, 2018
6b9b8b6
Fix minor syntax error
louisgv Aug 20, 2018
6a2e5c7
Update .travis.yml
louisgv Aug 20, 2018
911e328
Merge branch 'kinetic-devel' into travis-docker
louisgv Aug 20, 2018
62ca735
Update .travis.yml
louisgv Aug 20, 2018
b0d201e
Fix indentation on comments
louisgv Aug 20, 2018
04dd734
Update .travis.yml
louisgv Aug 20, 2018
f6ce7c4
Update .travis.yml
louisgv Aug 20, 2018
46f2835
Update .travis.yml
louisgv Aug 20, 2018
fb4e8ed
Update .travis.yml
louisgv Aug 20, 2018
8026fbe
Update .travis.yml
louisgv Aug 20, 2018
51d2263
Update .travis.yml
louisgv Aug 20, 2018
0d4868b
Update .travis.yml
louisgv Aug 21, 2018
9fbc609
Update .travis.yml
louisgv Aug 21, 2018
ac485d8
Update .travis.yml
louisgv Aug 21, 2018
a9f7419
Update .travis.yml
louisgv Aug 21, 2018
0f7c20c
Update .travis.yml
louisgv Aug 21, 2018
b6acf71
Update .travis.yml
louisgv Aug 21, 2018
e56804f
Update .travis.yml
louisgv Aug 21, 2018
02f6423
Update .travis.yml
louisgv Aug 21, 2018
c442a11
Update .travis.yml
louisgv Aug 21, 2018
3a09d3f
Update .travis.yml
louisgv Aug 21, 2018
300735e
Update .travis.yml
louisgv Aug 21, 2018
c35d8ae
Update .travis.yml
louisgv Aug 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 152 additions & 48 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,173 @@
dist: trusty
sudo: required
compiler:
- gcc
language: node_js
node_js:
- "6"
- "7"
- "8"
dist: xenial
services:
- docker

addons:
apt:
packages:
- docker-ce
env:
global:
- ROS_DISTRO=indigo
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- CI_SOURCE_PATH=$(pwd)
- CATKIN_WS_PATH=/root/catkin_ws
- DOCKER_SOURCE_PATH=/root/app
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
- 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
matrix:
- distro: trusty
docker_tag: "0.0.2"
node_version: 6
ROS_DISTRO: indigo
- distro: trusty
docker_tag: "0.0.2"
node_version: 7
ROS_DISTRO: indigo
- distro: trusty
docker_tag: "0.0.2"
node_version: 8
ROS_DISTRO: indigo
- distro: xenial
docker_tag: "0.0.3"
node_version: 6
ROS_DISTRO: kinetic
- distro: xenial
docker_tag: "0.0.3"
node_version: 7
ROS_DISTRO: kinetic
- distro: xenial
docker_tag: "0.0.3"
node_version: 8
ROS_DISTRO: kinetic
- distro: bionic
docker_tag: "0.0.5"
node_version: 6
ROS_DISTRO: melodic
- distro: bionic
docker_tag: "0.0.5"
node_version: 7
ROS_DISTRO: melodic
- distro: bionic
docker_tag: "0.0.5"
node_version: 8
ROS_DISTRO: melodic

branches:
only:
- kinetic-devel

# Install system dependencies, namely a very barebones ROS setup.
before_install:
- sudo apt-get install -y dpkg # to upgrade to dpkg >= 1.17.5ubuntu5.8, which fixes https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1730627
- 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://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
- sudo apt-get update -qq
- sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin
- source /opt/ros/$ROS_DISTRO/setup.bash
# Prepare rosdep to install dependencies.
- sudo rosdep init
- rosdep update
- docker pull boldt/base-ubuntu-nvm-node-npm:${docker_tag}
- >
docker run -d -it
-e ROS_REPO
-e ROS_DISTRO
-e ROSINSTALL_FILE
-e ROS_CI_DESKTOP
-e CATKIN_WS_PATH
-e CATKIN_OPTIONS
-e CI_SOURCE_PATH
-e PYTHONPATH
-e DOCKER_SOURCE_PATH
-e node_version
-v $(pwd):${DOCKER_SOURCE_PATH}
--name build
boldt/base-ubuntu-nvm-node-npm:${docker_tag}
- docker ps -a

# Create a catkin workspace with the package under integration.
install:
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- catkin_init_workspace
# Create the devel/setup.bash (run catkin_make with an empty workspace) and
# source it to set the path variables.
- cd ~/catkin_ws
- catkin_make
- source devel/setup.bash

# Install required message packages
- git clone https://github.com/ros/std_msgs.git src/std_msgs
- git clone https://github.com/ros/common_msgs src/common_msgs
- git clone https://github.com/RethinkRobotics-opensource/test_msgs.git src/test_msgs
- git clone https://github.com/ros/ros_comm_msgs.git src/ros_comm_msgs
# Install all dependencies, using wstool first and rosdep second.
# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
- cd ~/catkin_ws/src
- wstool init
- if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
- wstool up
# package depdencies: install using rosdep.
- cd ~/catkin_ws
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
- source devel/setup.bash

- >
docker exec build bash -c
'sudo apt-get install -y dpkg'
# to upgrade to dpkg >= 1.17.5ubuntu5.8, which fixes https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1730627
- >
docker exec build bash -c
'sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"'
- >
docker exec build bash -c
'sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116;'
- >
docker exec build bash -c
'sudo apt-get update -qq;'
- >
docker exec build bash -c
'sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin;'
- >
docker exec build bash -c
'source /opt/ros/$ROS_DISTRO/setup.bash'
# Prepare rosdep to install dependencies.
- >
docker exec build bash -c
'sudo rosdep init;'
- >
docker exec build bash -c
'rosdep update;'
- >
docker exec build bash -c
'mkdir -p $CATKIN_WS_PATH/src;'
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'catkin_init_workspace;'
# Create the devel/setup.bash (run catkin_make with an empty workspace) and
# source it to set the path variables.
- >
docker exec -w $CATKIN_WS_PATH build bash -c
'catkin_make;'
- >
docker exec -w $CATKIN_WS_PATH build bash -c
'source devel/setup.bash;'
# Install required message packages
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'git clone https://github.com/ros/std_msgs.git'
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'git clone https://github.com/ros/common_msgs'
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'git clone https://github.com/RethinkRobotics-opensource/test_msgs.git'
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'git clone https://github.com/ros/ros_comm_msgs.git'
# Install all dependencies, using wstool first and rosdep second.
# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'wstool init;'
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi;'
- >
docker exec -w $CATKIN_WS_PATH/src build bash -c
'wstool up;'
# package depdencies: install using rosdep.
- >
docker exec -w $CATKIN_WS_PATH build bash -c
'rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO;'
- >
docker exec -w $CATKIN_WS_PATH build bash -c
'source devel/setup.bash;'
- >
docker exec -w $CATKIN_WS_PATH build bash -c
'nvm install $node_version'

script:
- cd $CI_SOURCE_PATH
- npm install
- npm run compile
- npm run generate
- npm test
- >
docker exec -w $DOCKER_SOURCE_PATH build bash -c
'npm install;'
- >
docker exec -w $DOCKER_SOURCE_PATH build bash -c
'npm run compile;'
- >
docker exec -w $DOCKER_SOURCE_PATH build bash -c
'npm run generate;'
- >
docker exec -w $DOCKER_SOURCE_PATH build bash -c
'npm test;'