-
Notifications
You must be signed in to change notification settings - Fork 9
279 lines (250 loc) · 9.93 KB
/
Copy pathtest.yml
File metadata and controls
279 lines (250 loc) · 9.93 KB
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
name: test
on:
workflow_dispatch:
pull_request:
branches: [main, release/*]
jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ros_distribution:
- foxy
- humble
- iron
- jazzy
- kilted
include:
- ros_distribution: foxy
docker_image: ros:foxy-ros-base
- ros_distribution: humble
docker_image: ros:humble-ros-base
- ros_distribution: iron
docker_image: ros:iron-ros-base
- ros_distribution: jazzy
docker_image: ros:jazzy-ros-base
- ros_distribution: kilted
docker_image: ros:kilted-ros-base
container:
image: ${{ matrix.docker_image }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install additional ROS dependencies
run: |
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh
# ros:foxy-ros-base is no longer being updated due to EOL of foxy.
# We have to pull the new GPG key for ROS package repository manually.
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA
apt update
apt install -y curl
rosdep update --include-eol-distros
rosdep install -i -y --from-paths src/Rcl.NET.Tests
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
- name: Build
working-directory: src/Rcl.NET.Tests
run: |
dotnet nuget locals all --clear
dotnet build -c Release
- name: Test (fastrtps)
working-directory: src/Rcl.NET.Tests
env:
RMW_IMPLEMENTATION: rmw_fastrtps_cpp
ROS_LOCALHOST_ONLY: 0
run: |
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh && \
dotnet test -c Release -p:BuildInParallel=false --no-build --verbosity normal --blame-crash-dump-type mini --blame-hang-dump-type none --blame-hang-timeout 1m
- name: Test (cyclonedds)
working-directory: src/Rcl.NET.Tests
env:
RMW_IMPLEMENTATION: rmw_cyclonedds_cpp
ROS_LOCALHOST_ONLY: 0
run: |
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh && \
dotnet test -c Release -p:BuildInParallel=false --no-build --verbosity normal --blame-crash-dump-type mini --blame-hang-dump-type none --blame-hang-timeout 1m
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ros_distribution:
- foxy
- humble
- iron
- jazzy
- kilted
include:
- ros_distribution: kilted
ros_archive: https://github.com/ros2/ros2/releases/download/release-kilted-20250728/ros2-kilted-20250728-windows-release-amd64.zip
is_legacy_distro: false
- ros_distribution: jazzy
ros_archive: https://github.com/ros2/ros2/releases/download/release-jazzy-20250820/ros2-jazzy-20250820-windows-release-amd64.zip
is_legacy_distro: false
- ros_distribution: iron
ros_archive: https://github.com/ros2/ros2/releases/download/release-iron-20241204/ros2-iron-20241204-windows-release-amd64.zip
is_legacy_distro: true
- ros_distribution: humble
ros_archive: https://github.com/ros2/ros2/releases/download/release-humble-20241205/ros2-humble-20241205-windows-release-amd64.zip
is_legacy_distro: true
- ros_distribution: foxy
ros_archive: https://github.com/ros2/ros2/releases/download/release-foxy-20230620/ros2-foxy-20230620-windows-release-amd64.zip
is_legacy_distro: true
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Restore cached ROS installation
id: ros-cache
uses: actions/cache@v3
with:
path: c:/dev/${{ matrix.ros_distribution }}/
key: ${{ matrix.ros_archive }}
- name: Download and install ROS
if: ${{ steps.ros-cache.outputs.cache-hit != 'true' }}
run: |
Invoke-WebRequest -Uri ${{ matrix.ros_archive }} -OutFile ros2-release.zip
Expand-Archive -Path ros2-release.zip c:/dev/${{ matrix.ros_distribution }}
- name: Install dependencies (Legacy)
if: ${{ matrix.is_legacy_distro }}
run: |
reg add HKCU\SOFTWARE\Kitware\CMake /f
Invoke-WebRequest -Uri https://github.com/ros2/choco-packages/releases/download/2022-03-15/tinyxml2.6.0.0.nupkg -OutFile tinyxml2.6.0.0.nupkg
choco install --limit-output --no-progress -y -s . tinyxml2
choco install --limit-output --no-progress -y openssl --version 1.1.1.2100
- name: Install Pixi
if: ${{ !matrix.is_legacy_distro }}
run: |
Set-ExecutionPolicy ByPass
irm -useb https://pixi.sh/install.ps1 | iex
- name: Restore cached Pixi dependencies
if: ${{ !matrix.is_legacy_distro }}
id: pixi-cache
uses: actions/cache@v3
with:
path: c:/dev/pixi/
key: pixi-${{ matrix.ros_distribution }}
- name: Install dependencies
if: ${{ !matrix.is_legacy_distro }}
run: |
mkdir c:/dev/pixi/
cd c:/dev/pixi/
irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/${{ matrix.ros_distribution }}/pixi.toml -OutFile pixi.toml
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
pixi install
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
- name: Build
working-directory: src/Rcl.NET.Tests
run: |
dotnet nuget locals all --clear
dotnet build -c Release
- name: Test (fastrtps) (Legacy)
if: ${{ matrix.is_legacy_distro }}
shell: cmd
working-directory: src/Rcl.NET.Tests
env:
RMW_IMPLEMENTATION: rmw_fastrtps_cpp
ROS_LOCALHOST_ONLY: 0
run: |
refreshenv && ^
call c:/dev/${{ matrix.ros_distribution }}/ros2-windows/setup.bat && ^
dotnet test -c Release -p:BuildInParallel=false --no-build --verbosity normal --blame-crash-dump-type mini --blame-hang-dump-type none --blame-hang-timeout 1m
- name: Test (cyclonedds) (Legacy)
if: ${{ matrix.is_legacy_distro }}
shell: cmd
working-directory: src/Rcl.NET.Tests
env:
RMW_IMPLEMENTATION: rmw_cyclonedds_cpp
ROS_LOCALHOST_ONLY: 0
run: |
refreshenv && ^
call c:/dev/${{ matrix.ros_distribution }}/ros2-windows/setup.bat && ^
dotnet test -c Release -p:BuildInParallel=false --no-build --verbosity normal --blame-crash-dump-type mini --blame-hang-dump-type none --blame-hang-timeout 1m
- name: Test (fastrtps)
if: ${{ !matrix.is_legacy_distro }}
shell: cmd
working-directory: src/Rcl.NET.Tests
env:
RMW_IMPLEMENTATION: rmw_fastrtps_cpp
ROS_LOCALHOST_ONLY: 0
run: |
refreshenv && ^
pixi run --manifest-path "c:/dev/pixi/" ^
"c:/dev/${{ matrix.ros_distribution }}/ros2-windows/setup.bat && ^
dotnet test -c Release -p:BuildInParallel=false --no-build --verbosity normal --blame-crash-dump-type mini --blame-hang-dump-type none --blame-hang-timeout 1m"
- name: Test (cyclonedds)
if: ${{ !matrix.is_legacy_distro }}
shell: cmd
working-directory: src/Rcl.NET.Tests
env:
RMW_IMPLEMENTATION: rmw_cyclonedds_cpp
ROS_LOCALHOST_ONLY: 0
run: |
refreshenv && ^
pixi run --manifest-path "c:/dev/pixi/" ^
"c:/dev/${{ matrix.ros_distribution }}/ros2-windows/setup.bat && ^
dotnet test -c Release -p:BuildInParallel=false --no-build --verbosity normal --blame-crash-dump-type mini --blame-hang-dump-type none --blame-hang-timeout 1m"
#test_macos:
# runs-on: macos-latest
# strategy:
# matrix:
# ros_distribution:
# - foxy
# - humble
# steps:
# - uses: actions/checkout@v2
# - name: Setup ROS environment
# uses: ros-tooling/setup-ros@v0.6
# with:
# required-ros-distributions: ${{ matrix.ros_distribution }}
# - name: Install additional ROS dependencies
# run: |
# . /opt/ros/${{ matrix.ros_distribution }}/setup.sh
# rosdep update
# rosdep install -i -y --from-paths src/Rcl.NET.Tests
# - name: Setup .NET 7.0
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 7.0.x
# - name: Build
# working-directory: src/Rcl.NET.Tests
# run: |
# dotnet nuget locals all --clear
# dotnet build -c Release
# - name: Test (fastrtps)
# working-directory: src/Rcl.NET.Tests
# env:
# RMW_IMPLEMENTATION: rmw_fastrtps_cpp
# run: |
# . /opt/ros/${{ matrix.ros_distribution }}/setup.sh
# dotnet test -c Release --no-build --verbosity normal -p:ParallelizeTestCollections=false
# - name: Test (cyclonedds)
# working-directory: src/Rcl.NET.Tests
# env:
# RMW_IMPLEMENTATION: rmw_cyclonedds_cpp
# run: |
# . /opt/ros/${{ matrix.ros_distribution }}/setup.sh
# dotnet test -c Release --no-build --verbosity normal -p:ParallelizeTestCollections=false