-
Notifications
You must be signed in to change notification settings - Fork 29
236 lines (195 loc) · 6.33 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
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
name: Continuous Integration (SDK)
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches:
- '**'
tags:
- '[0-9].[0-9]+.[0-9]+'
pull_request:
branches:
- main
- develop
- '[0-9].[0-9]+.[0-9]+-rc'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
ba_linux:
name: "General Software Linux"
runs-on: ubuntu-latest
# if: false # disable this job
defaults:
run:
working-directory: scripts
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
# token: ${{ secrets.ALL_REPO_PAT }}
submodules: recursive
fetch-depth: 0 # Fetches full commit history, needed for repo info steps in build
- name: Install dependencies
run: |
./install_sdk_dependencies.sh
./install_gtest.sh
- name: Clean All
run: ./clean_all.sh
- name: Build SDK
run: ./build_is_sdk.sh
- name: Build Unit Tests
run: ./build_unit_tests.sh
- name: Run Unit Tests
run: ./build_unit_tests.sh --nobuild --test
- name: Build cltool
run: ./build_cltool.sh
- name: Build LogInspector
run: ./build_log_inspector.sh
- name: Build SDK Examples
run: python3 build_manager.py SDK_Examples ../ExampleProjects
ba_windows:
name: "General Software Windows"
runs-on: [self-hosted, windows, x64]
# if: false # disable this job
# if: (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/develop') # Only run job on these branches
defaults:
run:
working-directory: scripts/windows
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
# token: ${{ secrets.ALL_REPO_PAT }}
submodules: recursive
fetch-depth: 0 # Fetches full commit history, needed for repo info steps in build
- name: Clean all
run: ./clean_all.bat
- name: Build IS SDK library
run: ./build_is_sdk.bat
- name: Build Unit Tests
run: ./build_unit_tests.bat
- name: Build CLTool
run: ./build_cltool.bat
- name: Build LogInspector
run: ./build_log_inspector.bat
- name: Build SDK Examples
run: ./build_sdk_examples.bat
ros1-bridge-tests:
name: "ROS1 Bridge Tests"
runs-on: [self-hosted, Linux, X64, docker, focal]
# if: false # disable this job
env:
ROS_CI_DESKTOP: "`lsb_release -cs`" # e.g. [trusty|xenial|...]
ROS_DISTRO: noetic
container:
image: ros:noetic
#options: --privileged -v /dev:/dev
options: --device-cgroup-rule="c 166:* rmw"
volumes:
- "/dev:/dev"
defaults:
run:
working-directory: ../ROS/catkin_ws
shell: bash
steps:
- name: Update Git version to make actions/checkout happy
working-directory: .
run: |
echo "::group::Install software-properties-common and dependencies."
apt-get update && apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates libyaml-cpp-dev
echo "::endgroup::"
echo "::group::Configure git-core ppa and install latest."
add-apt-repository ppa:git-core/ppa -y && apt -y install git
echo "::endgroup::"
git --version
- name: Checkout source and submodules
uses: actions/checkout@v4
with:
# token: ${{ secrets.ALL_REPO_PAT }}
submodules: recursive
- name: Install dependencies
working-directory: scripts
run: |
./install_sdk_dependencies.sh
./install_gtest.sh
- name: Setup ROS environment
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
echo "::group::Install ROS packages."
apt -y install ros-${ROS_DISTRO}-tf libusb-1.0-0-dev
echo "::endgroup::"
- name: Setup Catkin Workspace and Build
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
catkin_make -DCATKIN_BLACKLIST_PACKAGES="inertial_sense_ros2"
catkin_make test_unit_tests
catkin_make test_ros_bridge
- name: Run Unit Tests
run: |
source devel/setup.bash
rm -rf build/test_results
roscore &
catkin_make run_tests_inertial_sense_ros_gtest_test_unit_tests
catkin_test_results
pkill roscore
- name: Run Functional/Integration Tests (via hardware)
run: |
source devel/setup.bash
roscore &
catkin_make run_tests_inertial_sense_ros_gtest_test_ros_bridge
catkin_test_results
ros2-bridge-tests:
name: "ROS2 Bridge Tests"
runs-on: [self-hosted, Linux, X64, docker, focal]
# if: false # disable this job
container:
image: osrf/ros:jazzy-desktop
options: --device-cgroup-rule="c 166:* rmw"
volumes:
- "/dev:/dev"
defaults:
run:
working-directory: ../ROS/ros2_ws # This is outside the scope of git
shell: bash
steps:
- name: Install libboost
run: |
/ros_entrypoint.sh /bin/bash -e -c "
rm -rf ../../inertial-sense-sdk/* log/ build/ install/ &>/dev/null || true
apt-get update && apt-get -y install libboost-all-dev
"
- name: Checkout source and submodules
uses: actions/checkout@v4
with:
submodules: recursive
# - name: Install dependencies
# run: |
# /ros_entrypoint.sh /bin/bash -e -c "
# ../../inertial-sense-sdk/scripts/install_python_dependencies.sh
# "
- name: Build IS SDK library
run: |
/ros_entrypoint.sh /bin/bash -e -c "
../../inertial-sense-sdk/scripts/build_is_sdk.sh
"
- name: Build ROS2 bridge
run: |
/ros_entrypoint.sh /bin/bash -e -c "
colcon build
"
- name: Run Functional/Integration Tests (via hardware)
run: |
/ros_entrypoint.sh /bin/bash -e -c "
source install/setup.bash
ros2 run inertial_sense_ros2 test_inertial_sense_ros2
"