forked from intel/ad-rss-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
167 lines (147 loc) · 5.35 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
# ----------------- BEGIN LICENSE BLOCK ---------------------------------
#
# Copyright (c) 2019-2020 Intel Corporation
#
# SPDX-License-Identifier: LGPL-2.1-only
#
# ----------------- END LICENSE BLOCK -----------------------------------
##
language: cpp
dist: xenial
os: linux
git:
submodules: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- castxml
- cmake
- libboost-all-dev
- libgtest-dev
- liblapacke-dev
- libopenblas-dev
- libproj-dev
- libpugixml-dev
- libpython3-dev
- python
- python-setuptools
- python-pip
- python-wheel
- python3
- python3-setuptools
- python3-pip
- python3-wheel
before_install:
- if [ "${EXTRA_PACKAGES}" != "" ]; then sudo apt-get -f -y install ${EXTRA_PACKAGES}; fi
- pip3 install --user -U colcon-common-extensions
- pip3 install --user xmlrunner
- pip2 install --user pygccxml https://bitbucket.org/ompl/pyplusplus/get/1.8.1.zip xmlrunner
env:
global:
GTEST_OUTPUT="xml:test_results"
BUILDCMD="colcon build --event-handlers console_direct+ --executor sequential --packages-up-to ad_rss ad_rss_map_integration --cmake-args -DBUILD_HARDENING=ON -DBUILD_TESTING=ON -DBUILD_PYTHON_BINDING=ON && colcon test --event-handlers console_direct+ --packages-select ad_rss ad_rss_map_integration && colcon test-result"
script:
- git submodule update --init
- if [ "${CC0}" == "" ]; then eval ${BUILDCMD}; else eval CC=${CC0} CXX=${CXX0} ${BUILDCMD}; fi
- if [ "${CC1}" != "" ]; then rm -rf log build install && eval CC=${CC1} CXX=${CXX1} ${BUILDCMD}; fi
after_failure:
- tail --lines=2000 log/latest_build/events.log
- tail --lines=2000 log/latest_test/events.log
jobs:
include:
- name: "Build and Unit Tests gcc-5 (Ubuntu 16.04)"
dist: xenial
compiler: gcc
- name: "Build and Unit Tests gcc-6 (Ubuntu 16.04)"
dist: xenial
compiler: gcc
env:
EXTRA_PACKAGES="g++-6"
CC0=/usr/bin/gcc-6
CXX0=/usr/bin/g++-6
- name: "Build and Unit Tests clang-5.0 (Ubuntu 16.04)"
dist: xenial
compiler: clang
env:
EXTRA_PACKAGES="clang-5.0"
CC0=/usr/bin/clang-5.0
CXX0=/usr/bin/clang++-5.0
- name: "Build and Unit Tests clang-6.0 (Ubuntu 16.04)"
dist: xenial
compiler: clang
env:
EXTRA_PACKAGES="clang-6.0"
CC0=/usr/bin/clang-6.0
CXX0=/usr/bin/clang++-6.0
- name: "Build and Unit Tests gcc-7 (Ubuntu 18.04)"
dist: bionic
compiler: gcc
- name: "Build and Unit Tests gcc-8 (Ubuntu 18.04)"
dist: bionic
compiler: gcc
env:
EXTRA_PACKAGES="g++-8"
CC0=/usr/bin/gcc-8
CXX0=/usr/bin/g++-8
- name: "Build and Unit Tests gcc-9 (Ubuntu 18.04)"
dist: bionic
compiler: gcc
env:
EXTRA_PACKAGES="g++-9 gcc-9 libstdc++-9-dev"
CC0=/usr/bin/gcc-9
CXX0=/usr/bin/g++-9
- name: "Build and Unit Tests clang-7 (Ubuntu 18.04)"
dist: bionic
compiler: clang
- name: "Build and Unit Tests clang-8 (Ubuntu 18.04)"
dist: bionic
compiler: clang
env:
EXTRA_PACKAGES="clang-8"
CC0=/usr/bin/clang-8
CXX0=/usr/bin/clang++-8
- name: "Check Code Formatting"
addons:
apt:
packages:
- clang-format-3.9
before_install:
script:
- res=`find -iname *.cpp -o -iname *.hpp | xargs clang-format-3.9 -output-replacements-xml | grep -c "<replacement "`; if [ $res -ne 0 ]; then echo "Your code does not comply to clang-format"; exit 1; fi
after_failure:
- name: "Build Documentation"
env:
EXTRA_PACKAGES="doxygen graphviz lcov"
before_script:
- pip install --user mkdocs>=1.0 markdown-include pymdown-extensions==6.2 pygments mdx_truly_sane_lists
script:
- git submodule update --init
- colcon build --event-handlers console_direct+ --executor sequential --packages-up-to ad_rss ad_rss_map_integration --cmake-args -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DBUILD_COVERAGE=ON -DBUILD_APIDOC=ON
- colcon test --event-handlers console_direct+ --packages-select ad_rss ad_rss_map_integration
- colcon test-result
- export PATH=$PATH:~/.local/lib/python2.7/site-packages/mkdocs/
- mkdocs build
after_script:
- bash .github/.travis/code_coverage.sh
- bash .github/.travis/deploy.sh false
- name: "Documentation Deployment"
if: branch = master AND type != pull_request
env:
EXTRA_PACKAGES="doxygen graphviz lcov"
before_script:
- pip install --user mkdocs>=1.0 markdown-include pymdown-extensions==6.2 pygments mdx_truly_sane_lists
script:
- git submodule update --init
- colcon build --event-handlers console_direct+ --executor sequential --packages-up-to ad_rss ad_rss_map_integration --cmake-args -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DBUILD_COVERAGE=ON -DBUILD_APIDOC=ON
- colcon test --event-handlers console_direct+ --packages-select ad_rss ad_rss_map_integration
- colcon test-result
- export PATH=$PATH:~/.local/lib/python2.7/site-packages/mkdocs/
- mkdocs build
after_script:
- bash .github/.travis/code_coverage.sh
- bash .github/.travis/deploy.sh true
notifications:
email: false