forked from carla-simulator/ros-bridge
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
64 lines (59 loc) · 2.34 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
#
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
#
os: linux
dist: xenial
sudo: false
matrix:
include:
- env: TEST="Test installation with ROS Kinetic & pylint"
addons:
apt:
packages:
- python-pip
before_script:
- pip install --user simple-pid
- pip install --user pylint
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
- sudo apt-get update
- sudo apt-get install ros-kinetic-desktop-full
script:
- mkdir ros-bridge/
- shopt -s dotglob
- shopt -s extglob
- mv !(ros-bridge) ros-bridge/
- mkdir -p catkin_ws/src
- cd catkin_ws/src
- ln -s ../../ros-bridge
- source /opt/ros/kinetic/setup.bash
- cd ..
- sudo rosdep init
- rosdep update
- rosdep install --from-paths src --ignore-src -r
- catkin_make install
- source install/setup.bash
- cd src/ros-bridge
- pylint --rcfile=.pylintrc carla_ackermann_control/src/carla_ackermann_control/ carla_ros_bridge/src/carla_ros_bridge/ carla_ego_vehicle/src/carla_ego_vehicle/ carla_waypoint_publisher/src/carla_waypoint_publisher/
after_failure:
- tail --lines=2000 build.log
- env: TEST="Check code formatting"
addons:
apt:
packages:
- pep8
- python-autopep8
- python-pep8
script:
- autopep8 carla_ros_bridge/src/carla_ros_bridge/*.py --in-place --max-line-length=100
- autopep8 carla_ackermann_control/src/carla_ackermann_control/*.py --in-place --max-line-length=100
- autopep8 carla_ego_vehicle/src/carla_ego_vehicle/*.py --in-place --max-line-length=100
- autopep8 carla_waypoint_publisher/src/carla_waypoint_publisher/*.py --in-place --max-line-length=100
- git diff --quiet HEAD --; if [ ! $? -eq 0 ]; then echo "Code is not autopep8 compliant. Please run check.sh"; git diff HEAD --; exit 1; fi
after_failure:
- tail --lines=2000 build.log
notifications:
email: false