-
Notifications
You must be signed in to change notification settings - Fork 89
111 lines (95 loc) · 3.56 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build: # On Linux, iterates on all ROS 1 and ROS 2 distributions.
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
- noetic
- humble
- jazzy
# Define the Docker image(s) associated with each ROS distribution.
# The include syntax allows additional variables to be defined, like
# docker_image in this case. See documentation:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build
#
# Platforms are defined in REP 3 and REP 2000:
# https://ros.org/reps/rep-0003.html
# https://ros.org/reps/rep-2000.html
include:
# Noetic Ninjemys (May 2020 - May 2025)
- docker_image: ghcr.io/catthehacker/ubuntu:act-20.04
ros_distribution: noetic
ros_version: 1
# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ghcr.io/catthehacker/ubuntu:act-22.04
ros_distribution: humble
ros_version: 2
# Jazzy Jalisco (May 2024 - May 2029)
- docker_image: ubuntu:24.04
ros_distribution: jazzy
ros_version: 2
container:
image: ${{ matrix.docker_image }}
steps:
- name: Update Git
run: |
apt-get update
apt-get install git -y
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Ubuntu 24.04 specific apt packages
if: ${{ contains(matrix.docker_image,'ubuntu:24.04') }}
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
apt-get install -y sudo python3-pip libboost-all-dev nodejs
sudo pip3 install -U rosdep --break-system-packages
- name: Act dependencies
if: ${{ env.ACT }}
run: |
apt-get install gnupg lsb-release -y
- name: setup ROS environment
uses: ros-tooling/setup-ros@0.7.9
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Apt packages
run: |
apt-get update
apt-get -y install rsync libyaml-cpp-dev libcurl4-openssl-dev lsb-release wget software-properties-common gnupg
- name: Setup AirSim
run: |
./setup.sh
./build.sh
working-directory: AirSim
- name: Update rosdep
run: |
rosdep update
- name: build and test ROS 1
if: ${{ matrix.ros_version == 1 }}
shell: bash
run: |
apt-get install -y python3-catkin-tools
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
rosdep install --from-paths src --ignore-src -r -y --rosdistro ${{ matrix.ros_distribution }}
catkin init
catkin build --no-status
working-directory: ros
- name: build and test ROS 2
if: ${{ matrix.ros_version == 2 }}
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
rosdep install --from-paths src --ignore-src -r -y --rosdistro ${{ matrix.ros_distribution }}
colcon build
working-directory: ros2