-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (38 loc) · 1.47 KB
/
ros2-humble.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
name: ROS2-Humble
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
build-test-colcon:
# Name the Job
name: ROS2-Humble-Ubuntu-22.04
# Set the type of machine to run on
runs-on: ubuntu-22.04
steps:
# Run package update
- name: Run package update
run: |
sudo apt-get update
sudo apt-get dist-upgrade -y
# Install ROS2 Humble
- name: Install ROS Humble
run: |
sudo apt update && sudo apt install locales
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 install curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt install ros-humble-ros-base
# Checks out a copy of your repository
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'recursive'
# Compiles the code
- name: Run build
run: |
source /opt/ros/humble/setup.bash
cd $GITHUB_WORKSPACE
make