-
Notifications
You must be signed in to change notification settings - Fork 38
510 lines (453 loc) · 22 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
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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
name: C++ CI Workflow
on:
push:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'
env:
vcpkg_robotology_TAG: v0.7.0
YCM_TAG: v0.12.1
YARP_TAG: v3.4.2
iDynTree_TAG: v3.1.0
Catch2_TAG: v2.13.4
Qhull_TAG: 2020.2
CasADi_TAG: 3.5.5.2
manif_TAG: 0.0.4
matioCpp_TAG: v0.1.0
LieGroupControllers_TAG: v0.1.1
osqp_TAG: v0.6.2
OsqpEigen_TAG: v0.6.3
tomlplusplus_TAG: 4f21332bdd7555bbf9add1aafe82909a2f8aa52b~
# Overwrite the VCPKG_INSTALLATION_ROOT env variable defined by GitHub Actions to point to our vcpkg
VCPKG_INSTALLATION_ROOT: C:\robotology\vcpkg
jobs:
check-style:
name: Find Trailing Whitespace
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Find Trailing Whitespace
run: |
set +e
lines=$(git grep --cached -In '[[:blank:]]$')
if [ ! -z "$lines" ]; then
echo -e "\n The following lines contain trailing whitespace: \n"
echo -e "${lines}"
echo -e "\nFailed.\n"
exit 1
fi
exit 0
build:
needs: check-style
name: '[${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_type: [Release, Debug]
os: [ubuntu-20.04, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@master
# Print environment variables to simplify development and debugging
- name: Environment Variables
shell: bash
run: env
# ============
# DEPENDENCIES
# ============
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos [Ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: Dependencies [Windows]
if: matrix.os == 'windows-latest'
run: |
# To avoid spending a huge time compiling vcpkg dependencies, we download a root that comes precompiled with all the ports that we need
choco install -y wget unzip
# To avoid problems with non-relocatable packages, we unzip the archive exactly in the same C:/robotology/vcpkg
# that has been used to create the pre-compiled archive
cd C:/
wget https://github.com/robotology/robotology-superbuild-dependencies-vcpkg/releases/download/${env:vcpkg_robotology_TAG}/vcpkg-robotology.zip
unzip vcpkg-robotology.zip -d C:/
rm vcpkg-robotology.zip
# Also re-bootstrap to avoid problems
cd C:/robotology/vcpkg
./bootstrap-vcpkg.bat
# Install Catch2
cd C:/robotology/vcpkg
./vcpkg.exe --overlay-ports=C:/robotology/robotology-vcpkg-ports install catch2:x64-windows
# Install pybind11 and tomlplusplus
./vcpkg.exe --overlay-ports=C:/robotology/robotology-vcpkg-ports install pybind11:x64-windows tomlplusplus:x64-windows
- name: Dependencies [macOS]
if: matrix.os == 'macos-latest'
run: |
brew update
brew install ace boost eigen swig qt5 orocos-kdl catch2 qhull ipopt cppad pkg-config pybind11 libmatio spdlog librealsense nlohmann-json
- name: Dependencies [Ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install git build-essential cmake libace-dev coinor-libipopt-dev libboost-system-dev libboost-filesystem-dev \
libboost-thread-dev liborocos-kdl-dev libeigen3-dev swig qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev \
libxml2-dev liburdfdom-dev libtinyxml-dev liburdfdom-dev liboctave-dev python3-dev valgrind coinor-libipopt-dev \
libmatio-dev python3-pytest python3-numpy python3-scipy python3-setuptools libspdlog-dev libopencv-dev libpcl-dev python3-pybind11 nlohmann-json3-dev
# install realsense from apt (see https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCD
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
# please see https://github.com/IntelRealSense/realsense-ros/blob/a161efb84c9cf8077fbd37d6a78ef1fad0b677d0/.travis.yml#L17-L19
sudo apt-get update -qq
# please see https://github.com/IntelRealSense/librealsense/issues/9607#issuecomment-896789179
mkdir -p /usr/share/librealsense2/presets
sudo apt-get install librealsense2-dev
- name: Cache Source-based Dependencies
id: cache-source-deps
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/install/deps
# Including ${{ runner.temp }} is a workaround taken from https://github.com/robotology/whole-body-estimators/pull/62 to fix macos configuration failure on https://github.com/dic-iit/bipedal-locomotion-framework/pull/45
key: source-deps-${{ runner.os }}-${{runner.temp}}-os-${{ matrix.os }}-build-type-${{ matrix.build_type }}-vcpkg-robotology-${{ env.vcpkg_robotology_TAG }}-ycm-${{ env.YCM_TAG }}-yarp-${{ env.YARP_TAG }}-iDynTree-${{ env.iDynTree_TAG }}-catch2-${{ env.Catch2_TAG }}-qhull-${{ env.Qhull_TAG }}-casADi-${{ env.CasADi_TAG }}-manif-${{ env.manif_TAG }}-matioCpp-${{ env.matioCpp_TAG }}-LieGroupControllers-${{ env.LieGroupControllers_TAG }}-osqp-${{ env.osqp_TAG }}-osqp-eigen-${{ env.OsqpEigen_TAG }}-tomlplusplus-${{ env.tomlplusplus_TAG }}
- name: Source-based Dependencies [Windows]
if: steps.cache-source-deps.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
shell: bash
run: |
# YCM
cd ${GITHUB_WORKSPACE}
git clone -b ${YCM_TAG} https://github.com/robotology/ycm
cd ycm
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target INSTALL
# YARP
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/yarp
cd yarp
git checkout ${YARP_TAG}
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target INSTALL
# Workaround for https://github.com/robotology-dependencies/robotology-vcpkg-binary-ports/issues/3
export IPOPT_DIR=${VCPKG_INSTALLATION_ROOT}/installed/x64-windows
# iDynTree
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/iDynTree
cd iDynTree
git checkout ${iDynTree_TAG}
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# Qhull
cd ${GITHUB_WORKSPACE}
git clone https://github.com/qhull/qhull
cd qhull
git checkout ${Qhull_TAG}
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# osqp
cd ${GITHUB_WORKSPACE}
git clone --recursive -b ${osqp_TAG} https://github.com/oxfordcontrol/osqp
cd osqp
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# osqp-eigen
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/osqp-eigen
cd osqp-eigen
git checkout ${OsqpEigen_TAG}
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# CasADi
# We override the casadi installation structure to be compliant with the folder structure used for
# the other dependencies. Please check:
# https://github.com/casadi/casadi/blob/6f122ca22e2a869903628c5738f154c8ac0f7455/CMakeLists.txt#L317
cd ${GITHUB_WORKSPACE}
git clone https://github.com/dic-iit/casadi.git -b ${CasADi_TAG} casadi
cd casadi
mkdir build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps \
-DINCLUDE_PREFIX:PATH="include" \
-DCMAKE_PREFIX:PATH="lib/cmake/casadi" \
-DLIB_PREFIX:PATH="lib" \
-DBIN_PREFIX:PATH="bin" \
-DWITH_IPOPT=BOOL:ON \
-DWITH_OSQP:BOOL=ON -DUSE_SYSTEM_WISE_OSQP=BOOL:ON ..
cmake --build . --config ${{ matrix.build_type }} --target install
# manif
cd ${GITHUB_WORKSPACE}
git clone https://github.com/artivis/manif.git
cd manif
git checkout ${manif_TAG}
mkdir build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# matioCpp
cd ${GITHUB_WORKSPACE}
git clone https://github.com/dic-iit/matio-cpp
cd matio-cpp
git checkout ${matioCpp_TAG}
mkdir build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# LieGroupControllers
cd ${GITHUB_WORKSPACE}
git clone https://github.com/dic-iit/lie-group-controllers
cd lie-group-controllers
git checkout ${LieGroupControllers_TAG}
mkdir build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Source-based Dependencies [Ubuntu/macOS]
if: steps.cache-source-deps.outputs.cache-hit != 'true' && (startsWith(matrix.os, 'ubuntu') || matrix.os == 'macos-latest')
shell: bash
run: |
# Tomlplusplus
cd ${GITHUB_WORKSPACE}
git clone https://github.com/marzer/tomlplusplus
cd tomlplusplus
git checkout ${tomlplusplus_TAG}
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# YCM
cd ${GITHUB_WORKSPACE}
git clone -b ${YCM_TAG} https://github.com/robotology/ycm
cd ycm
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# YARP
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/yarp
cd yarp
git checkout ${YARP_TAG}
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# iDynTree
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/iDynTree
cd iDynTree
git checkout ${iDynTree_TAG}
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# osqp
cd ${GITHUB_WORKSPACE}
git clone --recursive -b ${osqp_TAG} https://github.com/oxfordcontrol/osqp
cd osqp
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# osqp-eigen
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/osqp-eigen
cd osqp-eigen
git checkout ${OsqpEigen_TAG}
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# CasADi
cd ${GITHUB_WORKSPACE}
git clone https://github.com/dic-iit/casadi.git -b ${CasADi_TAG} casadi
cd casadi
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps -DWITH_IPOPT=BOOL:ON \
-DWITH_OSQP:BOOL=ON -DUSE_SYSTEM_WISE_OSQP=BOOL:ON ..
cmake --build . --config ${{ matrix.build_type }} --target install
# manif
cd ${GITHUB_WORKSPACE}
git clone https://github.com/artivis/manif.git
cd manif
git checkout ${manif_TAG}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# matioCpp
cd ${GITHUB_WORKSPACE}
git clone https://github.com/dic-iit/matio-cpp
cd matio-cpp
git checkout ${matioCpp_TAG}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# LieGroupControllers
cd ${GITHUB_WORKSPACE}
git clone https://github.com/dic-iit/lie-group-controllers
cd lie-group-controllers
git checkout ${LieGroupControllers_TAG}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Source-based Dependencies [Ubuntu]
if: steps.cache-source-deps.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
# Catch2
git clone -b ${Catch2_TAG} https://github.com/catchorg/Catch2.git
cd Catch2
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps \
-DBUILD_TESTING=OFF ..
cmake --build . --config ${{ matrix.build_type }} --target install
# Qhull
cd ${GITHUB_WORKSPACE}
git clone https://github.com/qhull/qhull
cd qhull
git checkout ${Qhull_TAG}
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: CppAD [Ubuntu]
if: startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
# CppAD
git clone https://github.com/coin-or/CppAD.git
cd CppAD
mkdir -p build
cd build
cmake -Dcppad_prefix=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps \
-DBUILD_TESTING=OFF ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Install manifpy [Ubintu/macOS]
if: startsWith(matrix.os, 'ubuntu') || matrix.os == 'macos-latest'
run: |
git clone https://github.com/artivis/manif.git manifpy
cd manifpy
git checkout ${manif_TAG}
python3 -m pip install .
- name: Check Python setup
shell: bash
run: |
echo "Default interpreter: $(which python)"
python3 -c 'import sys; print(sys.prefix)'
# ===================
# CMAKE-BASED PROJECT
# ===================
- name: Configure [Windows]
# Use bash also on Windows (otherwise cd, mkdir, ... do not work)
if: matrix.os == 'windows-latest'
shell: bash
run: |
mkdir -p build
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install \
-DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=OFF \
-DBUILD_TESTING:BOOL=ON ..
- name: Configure [Ubuntu]
if: startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install \
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON \
-DPython3_ROOT_DIR=$(python -c "import sys; print(sys.prefix)") -DFRAMEWORK_USE_Python3:BOOL=ON -DFRAMEWORK_USE_pybind11:BOOL=ON \
-DFRAMEWORK_RUN_Valgrind_tests:BOOL=ON ..
- name: Configure [macOS]
if: matrix.os == 'macos-latest'
shell: bash
run: |
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON \
-DPython3_ROOT_DIR=$(python -c "import sys; print(sys.prefix)") -DFRAMEWORK_USE_Python3:BOOL=ON -DFRAMEWORK_USE_pybind11:BOOL=ON \
-DFRAMEWORK_TEST_PYTHON_BINDINGS:BOOL=OFF \
-DBUILD_TESTING:BOOL=ON ..
- name: Check build if some dependencies are not enabled [Ubuntu]
if: github.event_name != 'push' && github.event_name != 'release' && matrix.os == 'ubuntu-20.04'
shell: bash
run: |
cd build
for missing_dep in YARP Qhull casadi cppad manif Python3 pybind11 pytest matioCpp LieGroupControllers; do
echo "Testing ${missing_dep} as missing dependency."
# Deselect missing dependency and build
cmake -DFRAMEWORK_USE_${missing_dep}:BOOL=OFF .
cmake --build . --config ${{ matrix.build_type }}
# Enable again dependency
cmake -DFRAMEWORK_USE_${missing_dep}:BOOL=ON .
done
- name: Build
shell: bash
run: |
cd build
# Attempt of fix for using YARP idl generators (that link ACE) in Windows
# See https://github.com/robotology/idyntree/issues/569
export PATH=$PATH:/d/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/bin:/d/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/bin:/c/robotology/vcpkg/installed/x64-windows/bin:/c/robotology/vcpkg/installed/x64-windows/debug/bin
cmake --build . --config ${{ matrix.build_type }}
- name: Test
shell: bash
run: |
cd build
export PATH=$PATH:/d/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/bin:/d/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/bin:/c/robotology/vcpkg/installed/x64-windows/bin:/c/robotology/vcpkg/installed/x64-windows/debug/bin
ctest --output-on-failure -C ${{ matrix.build_type }} .