-
Notifications
You must be signed in to change notification settings - Fork 145
240 lines (200 loc) · 7.56 KB
/
ci.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
name: CI
on:
workflow_call:
inputs:
ci_target_ref:
required: true
type: string
env:
ROS_DISTRO: jazzy
jobs:
micro_ros_build:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
path: src/micro_ros_setup
ref: ${{ inputs.ci_target_ref }}
- uses: ros-tooling/[email protected]
with:
use-ros2-testing: false
required-ros-distributions: ${{ env.ROS_DISTRO }}
- name: Dependencies
run: |
apt update
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y
- name: Build
run: |
. /opt/ros/${{ env.ROS_DISTRO }}/setup.sh
colcon build
- name: Install micro-ROS build system
run: |
(test -f install/micro_ros_setup/lib/micro_ros_setup/build_firmware.sh) && true || false
- uses: actions/upload-artifact@@v4.4.0
with:
name: micro_ros_build_${{ inputs.ci_target_ref }}
path: install
micro_ros_agent:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
strategy:
fail-fast: false
needs: micro_ros_build
steps:
- uses: actions/checkout@v4
with:
path: src/micro_ros_setup
ref: ${{ inputs.ci_target_ref }}
- uses: ros-tooling/[email protected]
with:
use-ros2-testing: false
required-ros-distributions: ${{ env.ROS_DISTRO }}
- name: dependencies
run: |
apt update
apt install -y ros-${{ env.ROS_DISTRO }}-rmw-fastrtps-cpp
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y
- uses: actions/[email protected]
with:
name: micro_ros_build_${{ inputs.ci_target_ref }}
path: install
# Workaround https://github.com/actions/upload-artifact/issues/38
- run: |
chmod +x -R install
- name: build
run: |
. /opt/ros/${{ env.ROS_DISTRO }}/setup.sh
. install/local_setup.sh
ros2 run micro_ros_setup create_agent_ws.sh
ros2 run micro_ros_setup build_agent.sh
- name: installation
run: |
(test -f install/micro_ros_agent/lib/micro_ros_agent/micro_ros_agent) && true || false
micro_ros_client:
runs-on: ubuntu-latest
needs: micro_ros_build
container:
image: ubuntu:24.04
strategy:
fail-fast: false
matrix:
include:
- rtos: host
platform: null
configuration: null
transport_arguments: null
binary: 'install/micro_ros_demos_rclc/lib/micro_ros_demos_rclc/int32_publisher/int32_publisher'
- rtos: generate_lib
platform: null
configuration: null
transport_arguments: null
build_arguments: $(pwd)/src/micro_ros_setup/config/generate_lib/generic/demo_toolchain.cmake
binary: 'firmware/build/libmicroros.a'
- rtos: freertos
platform: crazyflie21
configuration: crazyflie_position_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_crazyflie21_extensions/cf2.bin'
- rtos: freertos
platform: olimex-stm32-e407
configuration: int32_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_olimex_e407_extensions/build/micro-ROS.elf'
- rtos: freertos
platform: nucleo_f446re
configuration: int32_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_nucleo_f446re_extensions/build/micro-ROS.elf'
- rtos: freertos
platform: nucleo_f446ze
configuration: int32_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_nucleo_f446ze_extensions/build/micro-ROS.elf'
- rtos: freertos
platform: nucleo_f746zg
configuration: int32_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_nucleo_f746zg_extensions/build/micro-ROS.elf'
- rtos: freertos
platform: nucleo_f767zi
configuration: int32_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_nucleo_f767zi_extensions/build/micro-ROS.elf'
- rtos: freertos
platform: esp32
configuration: int32_publisher
transport_arguments: -t serial -d 1
binary: 'firmware/freertos_apps/microros_esp32_extensions/build/int32_publisher.elf'
- rtos: zephyr
platform: olimex-stm32-e407
configuration: int32_publisher
transport_arguments: -t serial-usb
binary: 'firmware/build/zephyr/zephyr.bin'
- rtos: zephyr
platform: discovery_l475_iot1
configuration: int32_publisher
transport_arguments: -t serial-usb
binary: 'firmware/build/zephyr/zephyr.bin'
- rtos: zephyr
platform: nucleo_h743zi
configuration: int32_publisher
transport_arguments: -t serial -d 3
binary: 'firmware/build/zephyr/zephyr.bin'
- rtos: zephyr
platform: nucleo_f746zg
configuration: int32_publisher
transport_arguments: -t serial -d 3
binary: 'firmware/build/zephyr/zephyr.bin'
- rtos: zephyr
platform: host
configuration: ping_pong
transport_arguments: -t udp -i 192.168.1.1 -p 8080
binary: 'firmware/build/zephyr/zephyr.exe'
- rtos: raspbian
platform: buster_v7
configuration: agent_lite
binary: 'firmware/bin/micro_ros_agent_lite'
- rtos: raspbian
platform: buster_v7
configuration: weather_publisher
binary: 'firmware/bin/weather_publisher'
steps:
- uses: actions/checkout@v4
with:
path: src/micro_ros_setup
ref: ${{ inputs.ci_target_ref }}
- uses: ros-tooling/[email protected]
with:
use-ros2-testing: false
required-ros-distributions: ${{ env.ROS_DISTRO }}
- name: Dependencies
run: |
apt update
apt upgrade -y
apt-get update
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y
- uses: actions/[email protected]
with:
name: micro_ros_build_${{ inputs.ci_target_ref }}
path: install
# Workaround https://github.com/actions/upload-artifact/issues/38
- run: |
chmod +x -R install
- name: Configure and build micro-ROS
run: |
. /opt/ros/${{ env.ROS_DISTRO }}/setup.sh
. install/local_setup.sh
ros2 run micro_ros_setup create_firmware_ws.sh ${{ matrix.rtos }} ${{ matrix.platform }}
ros2 run micro_ros_setup configure_firmware.sh ${{ matrix.configuration }} ${{ matrix.transport_arguments }}
ros2 run micro_ros_setup build_firmware.sh ${{ matrix.build_arguments }}
- name: Check binaries
run: |
(test -f ${{ matrix.binary }}) && true || false