-
Notifications
You must be signed in to change notification settings - Fork 123
50 lines (48 loc) · 1.91 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
name: foxy
on:
push:
branches:
- foxy
pull_request:
branches:
- foxy
jobs:
job1:
name: Build
runs-on: ubuntu-20.04
steps:
- name: ROS2 Install
run: |
# Ref: https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt update && sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install ros-foxy-desktop
source /opt/ros/foxy/setup.bash
- uses: actions/checkout@v1
with:
submodules: true
- name: Copy repository
run: |
mkdir -p ~/ros2_ws/src/lidarslam_ros2
cp -rf . ~/ros2_ws/src/lidarslam_ros2
- name: Install dependencies
run: |
source /opt/ros/foxy/setup.bash
sudo apt install -y python3-rosdep2
rosdep update
cd ~/ros2_ws/src
rosdep install -r -y --from-paths . --ignore-src
- name: Build packages
run: |
source /opt/ros/foxy/setup.bash
# Install colcon
# Ref: https://index.ros.org/doc/ros2/Tutorials/Colcon-Tutorial/
sudo apt install python3-colcon-common-extensions
cd ~/ros2_ws
colcon build
source ~/ros2_ws/install/setup.bash