-
Notifications
You must be signed in to change notification settings - Fork 0
212 lines (212 loc) · 6.33 KB
/
test-all-distribution.yml
File metadata and controls
212 lines (212 loc) · 6.33 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
name: Comprehensive Test Matrix
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Julia ${{ matrix.julia }} - ROS ${{ matrix.ros }} - Python ${{ matrix.python }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.8'
julia: 'lts'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.8'
julia: '1'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.9'
julia: 'lts'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.9'
julia: '1'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.10'
julia: 'lts'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.10'
julia: '1'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.11'
julia: 'lts'
- ros: humble
os: ubuntu-22.04
ros_distro: humble
python: '3.11'
julia: '1'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.10'
julia: 'lts'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.10'
julia: '1'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.11'
julia: 'lts'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.11'
julia: '1'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.12'
julia: 'lts'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.12'
julia: '1'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.13'
julia: 'lts'
- ros: jazzy
os: ubuntu-24.04
ros_distro: jazzy
python: '3.13'
julia: '1'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.10'
julia: 'lts'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.10'
julia: '1'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.11'
julia: 'lts'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.11'
julia: '1'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.12'
julia: 'lts'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.12'
julia: '1'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.13'
julia: 'lts'
- ros: rolling
os: ubuntu-24.04
ros_distro: rolling
python: '3.13'
julia: '1'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia }}
arch: x64
- name: Cache Julia Dependencies
uses: julia-actions/cache@v2
- name: Install Dependencies
run: |
julia --project=. -e 'using Pkg; Pkg.instantiate()'
shell: bash
- name: Configure PyCall to use system Python
run: |
julia --project=. -e '
ENV["PYTHON"] = "/usr/bin/python${{ matrix.python }}"
using Pkg
Pkg.build("PyCall")
'
shell: bash
- name: Set up ROS 2 ${{ matrix.ros }}
run: |
sudo apt update
sudo apt install -y curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install -y ros-${{ matrix.ros_distro }}-desktop python3-colcon-common-extensions python3-rosdep python3-vcstool
- name: Initialize rosdep
run: |
sudo rosdep init || true
rosdep update
- name: Run Tests
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
export AMENT_PREFIX_PATH=/opt/ros/${{ matrix.ros_distro }}
julia --project=. -e 'using Pkg; Pkg.test()'
shell: bash
- name: Test ROS2 Integration
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
export AMENT_PREFIX_PATH=/opt/ros/${{ matrix.ros_distro }}
julia --project=. -e '
using ROS2
init()
node = ROSNode("test_node")
pub = Publisher(node, "test_topic", "std_msgs.msg.String")
msg = create_msg("std_msgs.msg.String")
msg.data = "Hello from Julia!"
println("Publishing message...")
publish(pub, msg)
for i = 1:10
spin_once(node)
sleep(0.1)
end
shutdown()
println("Integration test passed!")
'
shell: bash
- name: Upload Coverage
uses: codecov/codecov-action@v3
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
flags: unittests-${{ matrix.ros }}-python${{ matrix.python }}
name: codecov-${{ matrix.ros }}-py${{ matrix.python }}
fail_ci_if_error: false