-
Notifications
You must be signed in to change notification settings - Fork 30
104 lines (99 loc) · 4.32 KB
/
melodic.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# This is a basic workflow to help you get started with Actions
name: 'Melodic'
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
paths-ignore:
- '**/README.md'
- '**.yaml'
- '**.yml'
- '**.launch'
branches:
- 'dev/ros-melodic'
pull_request:
branches:
- 'master'
- 'dev/bebopInterface'
- 'dev/gazebo9'
- 'dev/mitProject2019'
- 'sphinx'
- 'dev/ros-melodic'
- 'feature/ros-kinetic-gazebo9-pkgs'
- 'feature/spline'
###########################################################################################
## MANUALLY TRIGGER BUILD
###########################################################################################
workflow_dispatch:
jobs:
###########################################################################################
## GITHUB ACTIONS - CANCELS PREVIOUS RUNS
###########################################################################################
cancel:
name: Cancel Previous Runs
runs-on: ubuntu-18.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
##########################################################################################
## GITHUB ACTIONS - ROS MELODIC WITH GAZEBO 9
###########################################################################################
build:
name: Build on Ubuntu 18.04 with ROS Melodic
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install ROS
env:
ROS_CI_DESKTOP: "`lsb_release -cs`" # e.g. [trusty|xenial|...]
CI_SOURCE_PATH: $(pwd)
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
ROS_DISTRO: melodic
run: |
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 update -qq
sudo apt-get install dpkg
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
sudo apt install -y python-catkin-tools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-desktop-full
sudo apt-get install -y ros-$ROS_DISTRO-joy python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt install -y ros-$ROS_DISTRO-octomap-ros ros-$ROS_DISTRO-mavlink python-rosinstall build-essential protobuf-compiler
sudo apt install -y libgoogle-glog-dev python-rosinstall-generator ros-$ROS_DISTRO-pointcloud-to-laserscan
sudo apt install -y python-rosdep ros-$ROS_DISTRO-octomap ros-$ROS_DISTRO-octomap-mapping
sudo apt-get install -y ros-$ROS_DISTRO-joy ros-$ROS_DISTRO-control-toolbox
source /opt/ros/$ROS_DISTRO/setup.bash
sudo rosdep init
rosdep update --include-eol-distros
rosdep install octomap_mapping
rosmake octomap_mapping
#####################################################################################
- name: Installation completed! Started the building process..
env:
ROS_DISTRO: melodic
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
mkdir -p ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin init
cd ~/catkin_ws/src
git clone -b med18_gazebo9 https://github.com/gsilano/rotors_simulator.git
git clone -b med18_gazebo9 https://github.com/gsilano/mav_comm.git
git clone https://github.com/gsilano/bebop_autonomy.git
git clone -b dev/gazebo9 https://github.com/gsilano/BebopS.git
rosdep update
cd ~/catkin_ws
rosdep install --from-paths src -i
rosdep update
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False
catkin build
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc