forked from IntelRealSense/realsense-ros
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (74 loc) · 2.99 KB
/
main.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
78
79
80
81
82
83
84
85
86
87
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the development branch
push:
branches: [ development ]
pull_request:
branches: [ development ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Build on ros ${{ matrix.ros_distro }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
include:
- os: ubuntu-20.04
ros_distro: 'noetic'
_python: 'python3'
- os: ubuntu-18.04
ros_distro: 'melodic'
_python: 'python'
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distro }}
- name: Install dependencies
run: |
echo _python:${{ matrix._python }}
echo ros_distro:${{ matrix.ros_distro }}
sudo apt-get update
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --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-dev --allow-unauthenticated -y
- name: Setup catkin workspace
run: |
echo "source /opt/ros/${{ matrix.ros_distro }}/setup.bash" >> ${{github.workspace}}/.bashrc
source ${{github.workspace}}/.bashrc
mkdir -p ${{github.workspace}}/catkin_ws/src
cd ${{github.workspace}}/catkin_ws/src
catkin_init_workspace
cd ..
- uses: actions/checkout@v2
with:
path: 'catkin_ws/src/realsense-ros'
- name: Build
run: |
source ${{github.workspace}}/.bashrc
cd ${{github.workspace}}/catkin_ws
rosdep update
rosdep install -i --from-path src --rosdistro ${{ matrix.ros_distro }} -y
catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
catkin_make install
echo "source ${{github.workspace}}/catkin_ws/devel/setup.bash" >> ${{github.workspace}}/.bashrc
source ${{github.workspace}}/.bashrc
- name: Download data
run: |
cd ${{github.workspace}}/catkin_ws
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/"
- name: Run tests
run: |
cd ${{github.workspace}}/catkin_ws
source ${{github.workspace}}/.bashrc
${{ matrix._python }} src/realsense-ros/realsense2_camera/scripts/rs2_test.py non_existent_file