forked from IntelRealSense/realsense-ros
-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
68 lines (61 loc) · 2.72 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
sudo: required
matrix:
include:
- dist: xenial
- dist: bionic
- dist: focal
# - git clone -v --progress https://github.com/doronhi/realsense.git # This is Done automatically by TravisCI
before_install:
- if [[ $(lsb_release -sc) == "xenial" ]]; then _python=python; _ros_dist=kinetic;
elif [[ $(lsb_release -sc) == "bionic" ]]; then _python=python; _ros_dist=melodic;
elif [[ $(lsb_release -sc) == "focal" ]]; then _python=python3; _ros_dist=noetic; fi
- echo _python:$_python
- echo _ros_dist:$_ros_dist
- sudo apt-key adv --keyserver hkp://keys.gnupg.net:80 --recv-key C8B3A55A6F3EFCDE
- sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main"
- sudo apt-get update -qq
- sudo apt-get install librealsense2-dkms --allow-unauthenticated -y
- sudo apt-get install librealsense2-dev --allow-unauthenticated -y
install:
# install ROS:
- echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /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 ros-$_ros_dist-ros-base -y
- sudo apt install "$_python"-rosdep -y
- sudo rosdep init
- rosdep update
- echo "source /opt/ros/$_ros_dist/setup.bash" >> ~/.bashrc
- if [[ $(lsb_release -sc) == "bionic" ]] || [[ $(lsb_release -sc) == "focal" ]]; then
sudo apt-get install libeigen3-dev;
fi
- source ~/.bashrc
- mkdir -p ~/catkin_ws/src/realsense
# install realsense2-camera
- mv * ~/catkin_ws/src/realsense/ # This leaves behind .git, .gitignore and .travis.yml but no matter.
- cd ~/catkin_ws/src/
- catkin_init_workspace
- cd ..
- rosdep install --from-paths src --ignore-src -r -y
- sudo apt purge ros-$_ros_dist-librealsense2
- catkin_make clean
- catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
- catkin_make install
- echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
- source ~/.bashrc
# download data:
- bag_filename="https://librealsense.intel.com/rs-tests/TestData/outdoors_1color.bag";
- wget $bag_filename -P "records/"
- bag_filename="https://librealsense.intel.com/rs-tests/D435i_Depth_and_IMU_Stands_still.bag";
- wget $bag_filename -P "records/"
# Run test:
script:
- $_python src/realsense/realsense2_camera/scripts/rs2_test.py --all
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache