forked from OpenDataPlane/odp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
290 lines (281 loc) · 13 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
# Copyright (c) 2016-2018, Linaro Limited
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
#
# Please update xxxx for your coverity token and notification email if required
# pushing to github/master will run make check
# pushing to github/coverity_scan will also launch a static analysis
# See https://scan.coverity.com/travis_ci
#
# Travis uses Docker images which mainained here:
# https://github.com/OpenDataPlane/odp-docker-images
# CI scirpts are maintained under ./scripts/ci/ directory
# which passed into container during the test run.
language: c
sudo: required
dist: trusty
stages:
- "build only"
- test
#addons:
# coverity_scan:
# project:
# name: "$TRAVIS_REPO_SLUG"
# notification_email: xxxx
# build_command_prepend: "./bootstrap && ./configure --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example"
# build_command: "make"
# branch_pattern: coverity_scan
cache:
ccache: true
pip: true
directories:
- netmap
- $HOME/doxygen-install
compiler:
- gcc
- clang
env:
global:
#
# By default Linaro CODECOV_TOKEN token is used. It's ok to use it to see
# for individual commit validation. But you you want to track tests history
# you need generated new one at https://codecov.io specific for your repo.
- CODECOV_TOKEN=a733c34c-5f5c-4ff1-af4b-e9f5edb1ab5e
- OS="ubuntu_16.04"
- CHECK=1
- NETMAP=0
matrix:
- CONF=""
- CONF="--disable-abi-compat"
- NETMAP=1 CONF=""
- CHECK=0 ARCH="arm64"
- CHECK=0 ARCH="armhf"
- CHECK=0 ARCH="powerpc"
- CHECK=0 ARCH="i386"
- CHECK=0 ARCH="arm64" CONF="--disable-abi-compat"
- CHECK=0 ARCH="armhf" CONF="--disable-abi-compat"
- CHECK=0 ARCH="powerpc" CONF="--disable-abi-compat"
- CHECK=0 ARCH="i386" CONF="--disable-abi-compat"
- CONF="--enable-deprecated"
- CONF="--enable-dpdk-zero-copy --disable-static-applications"
- NETMAP=1 CONF="--disable-static-applications"
- CONF="--disable-host-optimization"
- CONF="--disable-host-optimization --disable-abi-compat"
- CHECK=0 ARCH="x86_64" CONF="--enable-pcapng-support"
- CHECK=0 ARCH="x86_64" OS="centos_7"
- CONF="--without-openssl"
- OS="ubuntu_18.04"
matrix:
exclude:
- compiler: gcc
env: CHECK=0 ARCH="arm64"
- compiler: gcc
env: CHECK=0 ARCH="i386"
install:
- if [ ${NETMAP} -eq 1 ] ; then
echo "Installing NETMAP";
sudo apt-get install linux-headers-`uname -r` ;
CDIR=`pwd` ;
git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v11.2 https://github.com/luigirizzo/netmap.git;
pushd netmap/LINUX;
./configure --drivers= ;
make -j $(nproc);
popd;
sudo insmod ./netmap/LINUX/netmap.ko;
CONF="$CONF --with-netmap-path=/odp/netmap";
fi
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- if [ ${CHECK} -eq 0 ] ; then
docker run -i -t -v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF="${CONF}"
${DOCKER_NAMESPACE}/travis-odp-lng-${OS} /odp/scripts/ci/build_${ARCH}.sh ;
else
echo "Running test" ;
docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF="${CONF}"
${DOCKER_NAMESPACE}/travis-odp-lng-${OS} /odp/scripts/ci/check.sh ;
fi
jobs:
include:
- stage: test
env: TEST=coverage
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CODECOV_TOKEN="${CODECOV_TOKEN}"
-e CC="${CC}"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/coverage.sh
- stage: test
env: TEST=scheduler_sp
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF=""
-e ODP_SCHEDULER=sp
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/check.sh
- stage: test
env: TEST=scheduler_scalable
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF=""
-e ODP_SCHEDULER=scalable
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/check.sh
- stage: test
env: TEST=process_mode
install:
- true
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF=""
-e ODP_CONFIG_FILE=/odp/platform/linux-generic/test/process-mode.conf
-e ODPH_PROC_MODE=1
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/check.sh
- stage: test
env: TEST=dpdk_18.11
install:
- true
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF=""
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04-dpdk_18.11 /odp/scripts/ci/check.sh
- stage: test
env: TEST=inline_timer
install:
- true
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF=""
-e ODP_CONFIG_FILE=/odp/platform/linux-generic/test/inline-timer.conf
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/check_inline_timer.sh
- stage: test
env: TEST=distcheck
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF="--enable-user-guides"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/distcheck.sh
- stage: test
env: TEST=distcheck_nonabi
compiler: gcc
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
-e CONF="--enable-user-guides --disable-abi-compat"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/distcheck.sh
- stage: "build only"
env: TEST=doxygen
compiler: gcc
addons:
apt:
packages:
- libconfig-dev
- libssl-dev
- cmake
- graphviz
install:
# Updated Doxygen
- |
if [ ! -f "$HOME/doxygen-install/bin/doxygen" ]; then
wget https://github.com/doxygen/doxygen/archive/Release_1_8_13.tar.gz
tar xpvf Release_1_8_13.tar.gz
pushd doxygen-Release_1_8_13
cmake -DCMAKE_INSTALL_PREFIX=$HOME/doxygen-install .
make -j $(nproc)
make install
popd
fi
- export PATH=$HOME/doxygen-install/bin:$PATH
script:
- ./bootstrap
- ./configure
# doxygen does not trap on warnings, check for them here.
- make doxygen-doc 2>&1 |tee doxygen.log
- |
fgrep -rq warning ./doxygen.log
if [ $? -eq 0 ]; then
false
else
true
fi
- stage: "build only"
env: ARCH=x86_64
install:
- true
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run -i -t -v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_${ARCH}.sh
- stage: "build only"
env: ARCH=x86_64
compiler: clang
install:
- true
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run -i -t -v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_${ARCH}.sh
- stage: "build only"
env: ARCH=arm64
install:
- true
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run -i -t -v `pwd`:/odp
-e CC="${CC}"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_${ARCH}.sh
- stage: "build only"
env: ARCH=i386
install:
- true
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run -i -t -v `pwd`:/odp --shm-size 8g
-e CC="${CC}"
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_${ARCH}.sh
- stage: test
canfail: yes
env: TEST=checkpatch
compiler: gcc
install:
- true
script:
- echo ${TRAVIS_COMMIT_RANGE};
- ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 's/\.//'`;
- ./scripts/ci-checkpatches.sh ${ODP_PATCHES};
allow_failures:
- canfail: yes
after_failure:
- cat config.log
- find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done