-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
77 lines (71 loc) · 2.95 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
dist: trusty
sudo: required
language: python
python:
- 2.7
cache:
directories:
- "~/.platformio"
# Configuration variables.
env:
global:
- ROS_DISTRO=indigo
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- CI_SRC_PATH=$(pwd)
matrix:
- PLATFORMIO_CI_SRC=$CI_SRC_PATH/Arduino/victoria_teensy_ros_node
- PLATFORMIO_CI_SRC=$CI_SRC_PATH/Arduino/victoria_teensy_circuit_test_ros_node
- PLATFORMIO_CI_SRC=$CI_SRC_PATH/Arduino/victoria_trex_ros_test
- PLATFORMIO_CI_SRC=$CI_SRC_PATH/Arduino/teensy_tinygps_test
before_install:
# Get roskeys
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
- sudo apt-get -qq update
install:
# Install minimum amount of ROS to get things working for rosserial.
- sudo apt-get install -y ros-$ROS_DISTRO-catkin
- sudo apt-get install -y python-rosdep
- sudo apt-get install -y ros-$ROS_DISTRO-rosbash
- sudo apt-get install -y ros-$ROS_DISTRO-roscpp
- sudo apt-get install -y ros-$ROS_DISTRO-roslib
- sudo apt-get install -y ros-$ROS_DISTRO-rospy
- sudo apt-get install -y ros-$ROS_DISTRO-common-msgs
- sudo apt-get install -y ros-$ROS_DISTRO-topic-tools
- sudo apt-get install -y ros-$ROS_DISTRO-tf
- pip install -U rospkg
- pip install -U catkin_pkg
- pip install -U empy
- source /opt/ros/$ROS_DISTRO/setup.bash
# Prepare rosdep to install dependencies.
- sudo rosdep init
- rosdep update
# Install platformio
- pip install platformio
### Get platformio libs.
# Install Timer.h library for easy ISRs.
# http://platformio.org/lib/show/75/Timer
# Pull in custom IMU libraries that use the i2c_t3.h instead of Timer.h
- platformio lib -g install 75 https://github.com/victoriarobotics/lsm6-arduino.git https://github.com/victoriarobotics/lis3mdl-arduino.git
before_script:
### Build rosserial
# Initialize catkin workspace for custom rosserial build.
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- catkin_init_workspace
# Pull in custom rosserial because PR https://github.com/ros-drivers/rosserial/pull/270
# hasn't made it to the debs yet. When it does, this should be removed.
- git clone https://github.com/ros-drivers/rosserial.git --branch $ROS_DISTRO-devel
# Include custom victoria_msgs
- git clone https://github.com/victoriarobotics/victoria_msgs.git
- cd ~/catkin_ws
- catkin_make
- source ~/catkin_ws/devel/setup.bash
# Make sketchbook/libraries folder.
- mkdir -p $CI_SRC_PATH/sketchbook/libraries
- export CI_LIB_PATH=$CI_SRC_PATH/sketchbook/libraries
# Make rosserial_arduino in the sketchbook/libraries folder
- rosrun rosserial_arduino make_libraries.py $CI_LIB_PATH
script:
# Build code
- platformio ci --lib="$CI_LIB_PATH/ros_lib" --board=teensy35 --board=teensy36