forked from robotology/yarp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
1000 lines (927 loc) · 33.1 KB
/
.travis.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
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
branches:
except:
- /^.*appveyor.*$/
- /^devel$/
notifications:
irc:
channels:
- "chat.freenode.net#yarpers"
template:
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
use_notice: true
skip_join: true
slack:
secure: PFCRF5GqjLKAghKHz+Dl2yOlRM5Ud8uI8s4AvshsHVmW4VNDhJfLzi3cGqWGjptZ2CBSMSrd5noANQCfeKObqwpeW3na8vrEO/l0RrgqV0idpiDOMotSRbCTB6I7DNKL31ZsQ4qm7eOroWlauNSiC+CBLmwShE9+N2zWC25JXSo=
stages:
- check
- cmake
- test
- test-long
- test-expected-failures
env:
global:
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- TRAVIS_BUILD_TYPE=Release
# Force ccache to build the original cpp file instead of the pre-processed file
- CCACHE_CPP2=yes
# CMake/CTest variables
- CTEST_OUTPUT_ON_FAILURE=1
- CLICOLOR_FORCE=1
# Port 10010 is used by docker-containerd on travis-bionic
# See also https://travis-ci.community/t/port-10010-is-used-by-docker-containerd/3865
- YARP_PORT_RANGE=20000
git:
depth: 100
quiet: true
.linux_system_info_definition: &linux_system_info_cmd |-
# Print some more system information after installing all build tools
uname -a
lsb_release -a
cat /etc/apt/sources.list
ls -la --color=always /etc/apt/sources.list.d
which cmake
cmake --version
which $CC
$CC --version
which $CXX
$CXX --version
which ccache
ccache --version
ccache -s
ls -la --color=always /usr/lib/ccache
ls -la --color=always ${HOME}/lib/ccache || true
which swig3.0
swig3.0 -version
which javac
javac -version
sudo netstat -tulpn
env
.osx_system_info_definition: &osx_system_info_cmd |-
# Print some more system information after installing all build tools
uname -a
system_profiler SPSoftwareDataType
which cmake
cmake --version
which $CC
$CC --version
which $CXX
$CXX --version
which ccache
ccache --version
ccache -s
which javac
javac -version
env
.stop_docker_cmd_definition: &stop_docker_cmd |-
# Stop docker service
sudo service docker stop
.prepare_build_dir_cmd_definition: &prepare_build_dir_cmd |-
# Prepare build directory
mkdir -p build
.export_cmake_options_base_cmd_definition: &export_cmake_options_base_cmd |-
# Prepare cmake options
export YARP_INSTALL_PREFIX="${PWD}/install"
export YARP_CMAKE_OPTIONS="${CMAKE_OPTIONS} -C${PWD}/.ci/initial-cache.travis.cmake -DCMAKE_INSTALL_PREFIX=${YARP_INSTALL_PREFIX}"
.export_cmake_options_linux_cmd_definition: &export_cmake_options_linux_cmd |-
# export_cmake_options_linux_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpcar_h264:BOOL=ON"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_usbCamera:BOOL=ON -DENABLE_yarpmod_usbCameraRaw:BOOL=ON"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_ffmpeg_grabber:BOOL=ON -DENABLE_yarpmod_ffmpeg_writer:BOOL=ON"
#- export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_portaudio:BOOL=ON -DENABLE_yarpmod_portaudioPlayer:BOOL=ON -DENABLE_yarpmod_portaudioRecorder:BOOL=ON"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_opencv_grabber:BOOL=ON"
.export_cmake_options_linux_gcc_cmd_definition: &export_cmake_options_linux_gcc_cmd |-
# export_cmake_options_linux_gcc_cmd
# Build rplidar2 on linux
# FIXME gcc only, see https://github.com/robotology/yarp/issues/1984
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_rpLidar2:BOOL=ON"
.export_cmake_options_linux_clang_cmd_definition: &export_cmake_options_linux_clang_cmd |-
# export_cmake_options_linux_clang_cmd
# Nothing to do
.export_cmake_options_osx_cmd_definition: &export_cmake_options_osx_cmd |-
# export_cmake_options_osx_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_opencv_grabber:BOOL=OFF"
# Avoid building Qt5 guis twice on macOS.
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_DISABLE_MACOS_BUNDLES:BOOL=ON"
# Disable system SQLite (workaround for #2247)
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_USE_SYSTEM_SQLite:BOOL=OFF"
.export_cmake_options_skip_ace_cmd_definition: &export_cmake_options_skip_ace_cmd |-
# export_cmake_options_skip_ace_cmd_definition
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DSKIP_ACE:BOOL=ON"
.export_cmake_options_skip_math_cmd_definition: &export_cmake_options_skip_math_cmd |-
# export_cmake_options_skip_math_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_COMPILE_libYARP_math:BOOL=OFF"
.export_cmake_options_static_cmd_definition: &export_cmake_options_static_cmd |-
# export_cmake_options_static_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF"
.export_cmake_options_clean_api_cmd_definition: &export_cmake_options_clean_api_cmd |-
# export_cmake_options_clean_api_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_CLEAN_API:BOOL=ON -DYARP_COMPILE_TESTS:BOOL=OFF"
.export_cmake_options_no_deprecated_cmd_definition: &export_cmake_options_no_deprecated_cmd |-
# export_cmake_options_no_deprecated_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_NO_DEPRECATED:BOOL=ON"
.export_cmake_options_no_executables_cmd_definition: &export_cmake_options_no_executables_cmd |-
# export_cmake_options_no_executables_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_COMPILE_EXECUTABLES:BOOL=OFF -DYARP_COMPILE_TESTS:BOOL=OFF"
.export_cmake_options_valgrind_cmd_definition: &export_cmake_options_valgrind_cmd |-
# export_cmake_options_valgrind
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_VALGRIND_TESTS:BOOL=ON"
## These devices link to glib/gobject causing some memory leak on valgrind, therefore they are not enabled on valgrind builds
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpcar_h264:BOOL=OFF"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_usbCamera:BOOL=OFF -DENABLE_yarpmod_usbCameraRaw:BOOL=OFF"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_ffmpeg_grabber:BOOL=OFF -DENABLE_yarpmod_ffmpeg_writer:BOOL=OFF"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_portaudio:BOOL=OFF -DENABLE_yarpmod_portaudioPlayer:BOOL=OFF -DENABLE_yarpmod_portaudioRecorder:BOOL=OFF"
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DENABLE_yarpmod_opencv_grabber:BOOL=OFF"
.export_cmake_options_disable_failing_tests_cmd_definition: &export_cmake_options_disable_failing_tests_cmd |-
# export_cmake_options_disable_failing_tests_cmd
# Disable unit tests that randomly fail due to race conditions.
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_DISABLE_FAILING_TESTS:BOOL=ON"
.export_cmake_options_enable_broken_tests_cmd_definition: &export_cmake_options_enable_broken_tests_cmd |-
# export_cmake_options_enable_broken_tests_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_ENABLE_BROKEN_TESTS:BOOL=ON"
.export_cmake_options_disable_examples_as_tests_cmd_definition: &export_cmake_options_disable_examples_as_tests_cmd |-
# export_cmake_options_disable_examples_as_tests_cmd
export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_ENABLE_EXAMPLES_AS_TESTS:BOOL=OFF"
.print_cmake_flags_cmd_definition: &print_cmake_flags_cmd |-
# Print cmake flags
echo "-G\"${TRAVIS_CMAKE_GENERATOR}\" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ${YARP_CMAKE_OPTIONS}"
.run_cmake_cmd_definition: &run_cmake_cmd |-
# Run CMake
(cd build; cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ${YARP_CMAKE_OPTIONS} ..)
.print_cmake_cache_cmd_definition: &print_cmake_cache_cmd |-
# Print cmake cache
(cd build; cat CMakeCache.txt)
.build_yarp_cmd_definition: &build_yarp_cmd |-
# Build yarp
(cd build; cmake --build . --config ${TRAVIS_BUILD_TYPE}) || travis_terminate 1
.run_unit_tests_cmd_definition: &run_unit_tests_cmd |-
# Run unit tests
(cd build; ctest --build . -C ${TRAVIS_BUILD_TYPE} || ctest --build . -C ${TRAVIS_BUILD_TYPE} --rerun-failed) || travis_terminate 1
.install_yarp_cmd_definition: &install_yarp_cmd |-
# Test installation
(cd build; cmake --build . --config ${TRAVIS_BUILD_TYPE} --target install) || travis_terminate 1
.build_bindings_from_build_cmd_definition: &build_bindings_from_build_cmd |-
# Build bindings from build directory
export YARP_BINDINGS_OPTIONS="-DYARP_COMPILE_BINDINGS:BOOL=ON -DCREATE_LUA:BOOL=ON -DCREATE_RUBY:BOOL=ON -DCREATE_PYTHON:BOOL=ON -DCREATE_TCL:BOOL=ON -DCREATE_JAVA:BOOL=ON -DCREATE_CSHARP:BOOL=ON -DCREATE_PERL:BOOL=ON"
(cd build; cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ${YARP_CMAKE_OPTIONS} ${YARP_BINDINGS_OPTIONS} ..) || travis_terminate 1
(cd build; cmake --build . --config ${TRAVIS_BUILD_TYPE}) || travis_terminate 1
(cd build; ctest --build . -C ${TRAVIS_BUILD_TYPE} -R bindings) || travis_terminate 1
.build_bindings_from_install_cmd_definition: &build_bindings_from_install_cmd |-
# Build bindings from yarp installation
mkdir -p "${PWD}/install/share/yarp/bindings/build"
(cd "${PWD}/install/share/yarp/bindings/build" && cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DYARP_DIR=${YARP_INSTALL_PREFIX}/lib/cmake/YARP ${YARP_BINDINGS_OPTIONS} ..) || travis_terminate 1
(cd "${PWD}/install/share/yarp/bindings/build" && cmake --build . --config ${TRAVIS_BUILD_TYPE}) || travis_terminate 1
.addons_base_definition:
addons: &addons_base
apt: &addons_apt_base
update: true
sources:
- sourceline: 'ppa:robotology/ppa'
- sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
#- ubuntu-toolchain-r-test
#- llvm-toolchain-bionic-8
packages: &apt_packages_common
# Build tools
- cmake
- ccache
# Robotology dependencies
- ycm-cmake-modules
- librobottestingframework-dev
# Libraries
- libsqlite3-dev
- libtinyxml-dev
- libedit-dev
- qtbase5-dev
- qtdeclarative5-dev
- qtmultimedia5-dev
- libqt5opengl5-dev
- libqcustomplot-dev
- libopencv-dev
- libeigen3-dev
- libgraphviz-dev
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
- libpng-dev
- libv4l-dev
- libavcodec-dev
- libavdevice-dev
- libavformat-dev
- libavutil-dev
- portaudio19-dev
.apt_packages_ace_definition: &apt_packages_ace
- libace-dev
.apt_packages_bindings_definition: &apt_packages_bindings
# Bindings
- swig3.0
# C# bindings
- mono-mcs
# Lua bindings
- liblua5.3-dev
- lua5.3
# TCL/TK bindings
- tcl-dev
- tk-dev
# Python bindings
- python3-dev
# Octave bindings
- liboctave-dev
# Java bindings
- default-jdk
# Ruby bindings
- ruby-dev
- ruby
# Perl bindings and license check
- perl
.apt_packages_linux_gcc_definition: &apt_packages_linux_gcc
- gcc-8
- g++-8
.apt_packages_linux_clang_definition: &apt_packages_linux_clang
- clang-8
.apt_packages_ninja_definition: &apt_packages_ninja
- ninja-build
.apt_packages_valgrind_definition: &apt_packages_valgrind
- valgrind
.apt_packages_coverage_definition: &apt_packages_coverage
- lcov
homebrew: &addons_homebrew_base
update: true
taps:
- robotology/homebrew-formulae
packages:
# Build tools
- ccache
# Robotology dependencies
- ycm
# Libraries
- ace
- sqlite
- tinyxml
- libedit
- qt5
- opencv
- eigen
- graphviz
- libpng
.cmake_configure_definition: &cmake_configure_template
os: linux
dist: bionic
language: generic
services:
- docker
before_install:
- docker pull ghcr.io/robotology/ycm:cmake-${TRAVIS_CMAKE_VERSION}_ycm-${TRAVIS_YCM_VERSION}
- >-
docker run -it -d \
-v $TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR \
-v $HOME/.ccache:$HOME/.ccache \
-w $TRAVIS_BUILD_DIR \
--name yarp-builder \
ghcr.io/robotology/ycm:cmake-${TRAVIS_CMAKE_VERSION}_ycm-${TRAVIS_YCM_VERSION}
- >-
- docker exec -it yarp-builder cmake --version
- docker exec -it yarp-builder mkdir $TRAVIS_BUILD_DIR/build
install: skip
before_script: skip
script:
- docker exec -it yarp-builder sh -c "cd $TRAVIS_BUILD_DIR/build; cmake .. -DSKIP_ACE=ON"
after_success: skip
.linux_base_build_definition: &linux_base_build_template
os: linux
dist: bionic
language: cpp
compiler: gcc
cache:
ccache: true
install: skip
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- *build_bindings_from_build_cmd
- *build_bindings_from_install_cmd
after_success: skip
.linux_gcc_build_definition: &linux_gcc_build_template
<<: *linux_base_build_template
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_gcc
- *apt_packages_bindings
.force_gcc_cmd_definition: &force_gcc_cmd |-
# Force gcc-8
export CC=gcc-8
export CXX=g++-8
before_install:
- *stop_docker_cmd
- *force_gcc_cmd
- *linux_system_info_cmd
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
.linux_clang_build_definition: &linux_clang_build_template
<<: *linux_base_build_template
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_clang
- *apt_packages_bindings
.force_clang_cmd_definition: &force_clang_cmd |-
# Remove default clang from path
export PATH=$(echo $PATH | sed -e 's/\/usr\/local\/clang[^:]\+://')
# Force clang-8
export CC=clang-8
export CXX=clang++-8
# Use ccache also for clang and clang++ on linux
mkdir -p ${HOME}/lib/ccache
ln -s /usr/bin/ccache ${HOME}/lib/ccache/clang
ln -s /usr/bin/ccache ${HOME}/lib/ccache/clang++
ln -s /usr/bin/ccache ${HOME}/lib/ccache/clang-8
ln -s /usr/bin/ccache ${HOME}/lib/ccache/clang++-8
export PATH=${HOME}/lib/ccache:${PATH}
before_install:
- *stop_docker_cmd
- *force_clang_cmd
- *linux_system_info_cmd
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
.osx_build_definition: &osx_build_template
os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
cache:
ccache: true
directories:
- $HOME/Library/Caches/Homebrew
addons:
homebrew:
<<: *addons_homebrew_base
.osx_enable_ccache_cmd_definition: &osx_enable_ccache_cmd |-
# Enable ccache on osx
export PATH="/usr/local/opt/ccache/libexec:$PATH"
.osx_enable_qt5_cmd_definition: &osx_enable_qt5_cmd |-
# Enable automatic Qt5 detection on osx
export Qt5_DIR="/usr/local/opt/qt5/lib/cmake/Qt5"
before_install:
- *osx_enable_ccache_cmd
- *osx_system_info_cmd
install:
- *osx_enable_qt5_cmd
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_osx_cmd
- *export_cmake_options_disable_failing_tests_cmd
- *export_cmake_options_disable_examples_as_tests_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
after_success: skip
matrix:
fast_finish: true
include:
- stage: check
name: "Style check"
os: linux
dist: bionic
language: generic
addons:
apt:
packages:
- perl
before_install: skip
before_script: skip
script: tests/misc/check_style.pl
after_success: skip
- stage: check
name: "License check"
os: linux
dist: bionic
language: generic
addons:
apt:
packages:
- perl
before_install: skip
before_script: skip
script: tests/misc/check_license.pl
after_success: skip
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.12 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.12"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.13 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.13"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.14 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.14"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.15 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.15"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.16 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.16"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.17 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.17"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.18 and YCM 0.12.0"
env:
- TRAVIS_CMAKE_VERSION="3.18"
- TRAVIS_YCM_VERSION="0.12.0"
- stage: test
<<: *linux_gcc_build_template
name: "Standard build (linux, gcc)"
- stage: test
<<: *linux_clang_build_template
name: "Standard build (linux, clang)"
- stage: test
<<: *linux_gcc_build_template
name: "No ACE build (linux, gcc)"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_linux_gcc
- *apt_packages_bindings
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_skip_ace_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
- stage: test
<<: *linux_clang_build_template
name: "No ACE build (linux, clang)"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_linux_clang
- *apt_packages_bindings
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_skip_ace_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
- stage: test
<<: *linux_gcc_build_template
name: "No YARP_math build (linux, gcc) - bindings disabled"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_gcc
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_skip_math_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- stage: test
<<: *linux_clang_build_template
name: "No YARP_math build (linux, clang) - bindings disabled"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_clang
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_skip_math_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- stage: test
<<: *linux_gcc_build_template
name: "Standard build with CLEAN_API (linux, gcc) - unit tests and bindings disabled"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_gcc
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_clean_api_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *install_yarp_cmd
- stage: test
<<: *linux_clang_build_template
name: "Standard build with CLEAN_API (linux, clang) - unit tests and bindings disabled"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_clang
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_clean_api_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *install_yarp_cmd
- stage: test
<<: *linux_gcc_build_template
name: "Static build (linux, gcc)"
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_static_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
- stage: test
<<: *linux_clang_build_template
name: "Static build (linux, clang)"
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_static_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
- stage: test
<<: *linux_gcc_build_template
name: "Static build, no ACE (linux, gcc) - bindings disabled"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_linux_gcc
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_skip_ace_cmd
- *export_cmake_options_static_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- stage: test
<<: *linux_clang_build_template
name: "Static build, no ACE (linux, clang) - bindings disabled"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_linux_clang
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_skip_ace_cmd
- *export_cmake_options_static_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- stage: test
<<: *linux_gcc_build_template
name: "Standard build no deprecated (linux, gcc)"
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_no_deprecated_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
- stage: test
<<: *linux_clang_build_template
name: "Standard build no deprecated (linux, clang)"
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_no_deprecated_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
- stage: test
<<: *linux_gcc_build_template
name: "No-executables build (linux, gcc) - unit tests disabled"
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_no_executables_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *install_yarp_cmd
- *build_bindings_from_build_cmd
- *build_bindings_from_install_cmd
- stage: test
<<: *linux_clang_build_template
name: "No-executables build (linux, clang) - unit tests disabled"
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_clang_cmd
- *export_cmake_options_no_executables_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *install_yarp_cmd
- *build_bindings_from_build_cmd
- *build_bindings_from_install_cmd
- stage: test
<<: *linux_gcc_build_template
name: "Standard build with Ninja generator (linux, gcc)"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_gcc
- *apt_packages_bindings
- *apt_packages_ninja
env:
- TRAVIS_CMAKE_GENERATOR="Ninja"
- stage: test
<<: *linux_clang_build_template
name: "Standard build with Ninja generator (linux, clang)"
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_ace
- *apt_packages_linux_clang
- *apt_packages_bindings
- *apt_packages_ninja
env:
- TRAVIS_CMAKE_GENERATOR="Ninja"
- stage: test-long
<<: *linux_gcc_build_template
name: "Standard build with valgrind (linux, gcc) - bindings, failing tests and examples as tests disabled"
env:
- TRAVIS_BUILD_TYPE=Debug
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_linux_gcc
- *apt_packages_ace
- *apt_packages_valgrind
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_valgrind_cmd
- *export_cmake_options_disable_failing_tests_cmd
- *export_cmake_options_disable_examples_as_tests_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- stage: test-long
<<: *linux_gcc_build_template
name: "No ACE build with valgrind (linux, gcc) - bindings, failing tests and examples as tests disabled"
env:
- TRAVIS_BUILD_TYPE=Debug
addons:
apt:
<<: *addons_apt_base
packages:
- *apt_packages_common
- *apt_packages_linux_gcc
- *apt_packages_valgrind
before_script:
- *prepare_build_dir_cmd
- *export_cmake_options_base_cmd
- *export_cmake_options_linux_cmd
- *export_cmake_options_linux_gcc_cmd
- *export_cmake_options_skip_ace_cmd
- *export_cmake_options_valgrind_cmd
- *export_cmake_options_disable_failing_tests_cmd
- *export_cmake_options_disable_examples_as_tests_cmd
- *print_cmake_flags_cmd
- *run_cmake_cmd
- *print_cmake_cache_cmd
script:
- *build_yarp_cmd
- *run_unit_tests_cmd
- *install_yarp_cmd
- stage: test-long
<<: *osx_build_template
name: "Standard build (osx, xcode11.3, clang) - installation, bindings, failing tests and examples as tests disabled"
osx_image: xcode11.3
- stage: test-long
<<: *osx_build_template
name: "Standard build with Xcode (osx, xcode11.3, clang) - installation, bindings, failing tests and examples as tests disabled"
osx_image: xcode11.3
env:
- TRAVIS_CMAKE_GENERATOR="Xcode"
# - stage: test-long
# <<: *linux_gcc_build_template
# name: "Standard build with integration tests (linux, gcc)"
# addons:
# apt:
# <<: *addons_apt_base
# sources:
# - sourceline: 'ppa:robotology/ppa'
# #- ubuntu-toolchain-r-test
# #- llvm-toolchain-bionic-8
# - sourceline: 'deb http://packages.ros.org/ros/ubuntu bionic main'
# key_url: 'http://packages.ros.org/ros.key'
# packages:
# - *apt_packages_common
# - *apt_packages_ace
# - *apt_packages_linux_clang
# - *apt_packages_bindings
# - ros-melodic-desktop-full
# env:
# # ROS-related environment variables.
# - ROS_HOSTNAME=localhost
# - ROS_MASTER_URI=http://localhost:11311
# - ROBOT=sim
# install:
# ## Install swig stuff
# - wget https://github.com/robotology-dependencies/swigs/releases/download/v0.0.7/swigs.zip -O /tmp/swigs.zip
# - unzip -q /tmp/swigs.zip
# - mkdir -p build/cache
# - mv swigs cache/swig
# - ln -s ../cache build/cache
# ## Init ROS
# - source /opt/ros/melodic/setup.bash
# before_script:
# - *prepare_build_dir_cmd
# - *export_cmake_options_base_cmd
# - *export_cmake_options_linux_cmd
# - *export_cmake_options_linux_gcc_cmd
# - export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_ENABLE_INTEGRATION_TESTS:BOOL=ON"
# - *print_cmake_flags_cmd
# - *run_cmake_cmd
# - *print_cmake_cache_cmd
# script:
# - *build_yarp_cmd
# - build/bin/yarp conf 0 0 local
# - *run_unit_tests_cmd
# - *install_yarp_cmd
# - *build_bindings_from_build_cmd
# - *build_bindings_from_install_cmd
#
# - stage: test-long
# <<: *linux_gcc_build_template
# name: "Standard build with coverage (linux, gcc)"
# addons:
# apt:
# <<: *addons_apt_base
# packages:
# - *apt_packages_common
# - *apt_packages_linux_gcc
# - *apt_packages_ace
# - *apt_packages_bindings
# - *apt_packages_coverage
# env:
# - TRAVIS_BUILD_TYPE=Profile
# before_script:
# - *prepare_build_dir_cmd
# - *export_cmake_options_base_cmd
# - *export_cmake_options_linux_cmd
# - *export_cmake_options_linux_gcc_cmd
# - *print_cmake_flags_cmd
# - *run_cmake_cmd
# - *print_cmake_cache_cmd
# - (cd build; lcov --directory . --zerocounters)
# after_success:
# # Capture coverage info for Profile builds
# - (cd build; lcov --directory . --capture --output-file coverage.info)
# # Filter out system and test code
# - (cd build; lcov --remove coverage.info '/usr/*' 'tests/*' 'example/*' 'extern/*' 'build/*' --output-file coverage.info)
# # Debug before upload
# - (cd build; lcov --list coverage.info)
# # Uploads to coveralls
# - (cd build; coveralls-lcov --source-encoding=ISO-8859-1 coverage.info)
#
# - stage: test-long
# <<: *linux_gcc_build_template
# name: "Standard build with broken tests (linux, gcc)"
# before_script:
# - *prepare_build_dir_cmd
# - *export_cmake_options_base_cmd
# - *export_cmake_options_linux_cmd
# - *export_cmake_options_linux_gcc_cmd
# - *export_cmake_options_enable_broken_tests_cmd
# - *print_cmake_flags_cmd
# - *run_cmake_cmd
# - *print_cmake_cache_cmd
- stage: test-expected-failures
<<: *linux_gcc_build_template
name: "Standard build on s390x architecture (big endian) (linux, gcc)"
arch: s390x
allow_failures:
- arch: s390x
# - name: "Standard build with broken tests (linux, gcc)"