-
Notifications
You must be signed in to change notification settings - Fork 16
381 lines (322 loc) · 13.8 KB
/
ubuntu_22_04.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
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
name: Ubuntu 22.04 build with debian ros packages along with source packages
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ubuntu2204:
strategy:
fail-fast: false
matrix:
build_type: [install, devel]
build_all: [minimal, full]
runs-on: ubuntu-22.04
# env:
steps:
- name: git clone ros_from_src
uses: actions/checkout@v3
with:
path: other/src/ros_from_src
- name: os version
run: |
lsb_release -a
- name: apt update
run: |
sudo add-apt-repository universe
sudo apt-get update
- name: apt upgrade
run: |
echo "skip"
# sudo apt-get upgrade
- name: needrestart
run: |
sudo needrestart -v
# sudo needrestart -r a
# sudo systemctl restart packagekit
# sudo systemctl restart php8.1-fpm
# sudo systemctl restart ssh
- name: apt library installs 1
run: |
sudo apt-get install -o Debug::pkgProblemResolver=true -yqq libunwind-dev
dpkg -l | grep libunwind
sudo apt-get install -o Debug::pkgProblemResolver=true -yqq libceres-dev
sudo apt-get install -yqq devscripts dh-make
- name: apt library installs 2
run: |
sudo apt-get install -yqq libgeographic-dev
sudo apt-get install -yqq libgmock-dev libgoogle-glog-dev
sudo apt-get install -yqq liborocos-bfl-dev
sudo apt-get install -yqq libprotobuf-dev libprotoc-dev
- name: apt library installs 3
run: |
sudo apt-get install -yqq libspnav-dev liburdfdom-dev
sudo apt-get install -yqq libyaml-cpp-dev
sudo apt-get install -yqq cython3
sudo apt-get install -yqq freeglut3-dev
sudo apt-get install -yqq libapriltag-dev
sudo apt-get install -yqq libcgal-dev
sudo apt-get install -yqq libfmt-dev
sudo apt-get install -yqq libgsl-dev
sudo apt-get install -yqq libhdf5-dev
sudo apt-get install -yqq libturbojpeg0-dev
sudo apt-get install -yqq libzmq3-dev
sudo apt-get install -yqq ocl-icd-opencl-dev opencl-headers
sudo apt-get install -yqq libopenvdb-dev
- name: apt sdl installs
run: |
sudo apt-get install -o Debug::pkgProblemResolver=true -yqq libsdl2-* libsdl-image1.2-dev python3-sdl2
sudo apt-get install -yqq frei0r-plugins-dev libfrei0r-ocaml-dev
- name: apt video installs
run: |
sudo apt-get install -yqq libgst-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
sudo apt-get install -yqq libuvc-dev libv4l-dev
- name: apt qt installs
run: |
sudo apt-get install -yqq libqt5svg5-dev libqt5websockets5-dev libqt5x11extras5-dev libqwt-qt5-dev
sudo apt-get install -yqq libqtav-dev
- name: apt tool installs
run: |
sudo apt-get install -yqq git
sudo apt-get install -yqq vim curl jq
sudo apt-get install -yqq python-is-python3 python3-venv
- name: apt ros installs
run: |
sudo apt-get install -yqq ros-*
sudo apt-get install -yqq catkin-lint
sudo apt-get install -yqq libimage-view-dev
sudo apt-get install -yqq libpcl-ros-dev
sudo apt-get install -yqq python3-tf2-geometry-msgs
- name: setup
run: |
mkdir -p other/src
echo "DEST=$HOME/other/install" >> $GITHUB_ENV
# echo "$DEST/bin" >> $GITHUB_PATH
echo PYTHON_MAJOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f1` >> $GITHUB_ENV
echo PYTHON_MINOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f2` >> $GITHUB_ENV
- name: setup 2
run: |
echo "PATH=$PATH:$DEST/bin" >> $GITHUB_ENV
echo "PYTHONPATH=$DEST/lib/python$PYTHON_MAJOR_VERSION.$PYTHON_MINOR_VERSION/site-packages/" >> $GITHUB_ENV
echo "CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$DEST/lib/cmake" >> $GITHUB_ENV
- name: check setup
run: |
echo $HOME
echo $GITHUB_PATH
echo $PATH
echo $PYTHONPATH
- name: git clone vcstool
uses: actions/checkout@v3
with:
repository: dirk-thomas/vcstool
path: other/src/vcstool
- name: vcs
run: |
cd other/src
cd vcstool
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed
vcs --help
- name: git clone pycommon
uses: actions/checkout@v3
with:
repository: osrf/osrf_pycommon
path: other/src/osrf_pycommon
- name: pycommon
run: |
cd other/src
cd osrf_pycommon
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed
- name: git clone catkin tools
uses: actions/checkout@v3
with:
repository: lucasw/catkin_tools
path: other/src/catkin_tools
ref: sanitize_cmake_prefix_path
- name: catkin tools
run: |
cd other/src
cd catkin_tools
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed
which catkin
catkin --version
- name: setup base_catkin_ws
run: |
mkdir -p ${{ matrix.build_type }}_base_catkin_ws/src
cd ${{ matrix.build_type }}_base_catkin_ws/src
ln -s ../../other/src/ros_from_src/ubuntu_2204/base_repos.yaml
# need https instead of git@github
sed -i 's/[email protected]:/https:\/\/github.com\//' base_repos.yaml
ls -l
vcs import --shallow < base_repos.yaml
# show which versions were imported
vcs export --exact
# ignore repos that aren't yet building in 22.04
../../other/src/ros_from_src/ubuntu_2204/ignore.sh
# the newer openvdb that doesn't have tbb error that the apt install version has
- name: install build openvdb
if: ${{ matrix.build_all == 'full' }}
run: |
mkdir -p other/build/openvdb
cd other/build/openvdb
cmake ../../../${{ matrix.build_type }}_base_catkin_ws/src/other/vdb/openvdb/ -DCMAKE_INSTALL_PREFIX=$DEST
make -j3 # it's a slow build
make install
# TODO(lucasw) later have an entirely separately layer for the larger slow building packages
- name: ignore large slow packages
if: ${{ matrix.build_all == 'minimal' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws/src
touch other/PlotJuggler/CATKIN_IGNORE
touch other/plotjuggler_msgs/CATKIN_IGNORE
touch other/plotjuggler-ros-plugins/CATKIN_IGNORE
touch other/jsk_common/CATKIN_IGNORE
touch other/jsk_common_msgs/CATKIN_IGNORE
touch other/jsk_recognition/CATKIN_IGNORE
touch other/jsk_roseus/CATKIN_IGNORE
touch other/jsk_visualization/CATKIN_IGNORE
touch other/fiducials/CATKIN_IGNORE
touch other/fuse/CATKIN_IGNORE
touch other/lvr2/CATKIN_IGNORE
touch other/mesh_tools/CATKIN_IGNORE
touch other/rtabmap/CATKIN_IGNORE
touch other/rtabmap_ros/CATKIN_IGNORE
touch ros/grid_map/CATKIN_IGNORE
touch other/anybotics/CATKIN_IGNORE
touch other/octomap_mapping/CATKIN_IGNORE
touch other/octomap_ros/CATKIN_IGNORE
touch other/vdb/CATKIN_IGNORE
- name: devel setup
if: ${{ matrix.build_type == 'devel' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -Wno-dev -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$DEST/include -DCMAKE_LIBRARY_PATH=$DEST/lib
# TODO(lucasw) lvr2 not building in devel, but could build it
# outside of catkin entirely and install to DEST
touch src/other/lvr2/CATKIN_IGNORE
touch src/other/mesh_tools/CATKIN_IGNORE
- name: install setup
if: ${{ matrix.build_type == 'install' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
catkin config --install --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -Wno-dev -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$DEST/include -DCMAKE_LIBRARY_PATH=$DEST/lib
# individual packages or sets of packages built separately
# this first one sources last because nothing has been built yet
- name: build qt_gui_core
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
catkin build --no-status qt_gui_core
source ${{ matrix.build_type }}/setup.bash
- name: build vdb mapping
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status vdb_mapping* --verbose
- name: build fiducials
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status fiducials
- name: build grid_map
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status grid_map*
- name: build rtabmap_ros
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status rtabmap_ros
- name: build joint_trajectory_controller
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status joint_trajectory_controller
- name: test joint_trajectory_controller
# TODO(lucasw) this test is slow, maybe don't do it at all
if: ${{ (matrix.build_type == 'devel' && matrix.build_all == 'full') }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build joint_trajectory_controller --no-status --no-deps --catkin-make-args tests
rostest joint_trajectory_controller joint_trajectory_controller.test
# catkin test --no-status joint_trajectory_controller
- name: test install joint_trajectory_controller
if: ${{ (matrix.build_type == 'devel' && matrix.build_all == 'full') }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin test --no-status joint_trajectory_controller
- name: build plotjuggler
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
# Does building plotjuggler before plotjuggler_ros mess up in install?
# catkin build --no-status plotjuggler
catkin build --no-status plotjuggler_ros
source ${{ matrix.build_type }}/setup.bash
- name: build rviz
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status rviz
source ${{ matrix.build_type }}/setup.bash
- name: build rviz_map_plugin
if: ${{ matrix.build_all == 'full' && matrix.build_type == 'install' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status rviz_map_plugin
- name: build jsk
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status jsk*
- name: build fuse
if: ${{ matrix.build_all == 'full' }}
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status fuse_models fuse_optimizers
- name: build rest of ${{ matrix.build_type }}_base_catkin_ws
run: |
cd ${{ matrix.build_type }}_base_catkin_ws
source ${{ matrix.build_type }}/setup.bash
catkin build --no-status
- name: tar up install_catkin_ws
if: ${{ matrix.build_type == 'install' }}
run: |
tar cvzf install_catkin_ws_2204.tgz install_base_catkin_ws/install
tar cvzf install_dest_2204.tgz $DEST
ls -l
- name: upload install_catkin_ws_2204.tgz
if: ${{ matrix.build_type == 'install' }}
uses: actions/upload-artifact@v4
with:
name: install_dest_2204_${{ matrix.build_all }}
path: install_dest_2204.tgz
- name: upload install_catkin_ws_2204.tgz
if: ${{ matrix.build_type == 'install' }}
uses: actions/upload-artifact@v4
with:
name: install_catkin_ws_2204__${{ matrix.build_all }}
path: install_catkin_ws_2204.tgz
- name: make a deb from the entirety of install_catkin_ws/install
if: ${{ matrix.build_type == 'install' }}
run: |
cd other/src/ros_from_src/debian
ln -s ../../../../install_base_catkin_ws/install
dpkg-buildpackage -A -uc
- name: upload .deb
if: ${{ matrix.build_type == 'install' }}
uses: actions/upload-artifact@v4
with:
name: install_catkin_ws_2204_${{ matrix.build_all }}.deb
# TODO(lucasw) extract name from debian files, VERSION?
path: other/src/ros_from_src/rosone_0.0.6-1_all.deb