-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
103 lines (93 loc) · 3.56 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
sudo: false
language: c
os:
- linux
- osx
compiler:
- gcc
- clang
env:
global:
# encrypted COVERITY_SCAN_TOKEN from
# https://scan.coverity.com/projects/<project_id>/submit_build?tab=travis_ci
- secure: "SwNcek+I4lMVcnb5EGGmNm6ljWN6C/mnXzBr82a5rEQNKxAoJfdvvPpKIp0iEfg5j0PtYlcRHoIDyVZ/6QM/WEw0wrio9Z0cio9hkOS6kV8g2QouXfnoNtKJ5nNso7UD2GPJ9+M0GIR1GZ0Edvxr81sHlNAkpVKydYGBwCIMGyg="
# Coverity run condition (avoid matrix multiple runs), need customized
# build script. Need an update if new matrix cases.
- coverity_scan_run_condition='"$TRAVIS_OS_NAME" = linux -a "$CC" = gcc -a "$REMOTE" = enable -a "$CMAKE" = no'
# Coverity script test mode (if true no uploading, avoid reaching the quota)
# usual processing: false.
- coverity_scan_script_test_mode=false
matrix:
- REMOTE=disable CMAKE=no
- ENABLE_REMOTE="" CMAKE=yes
- REMOTE=enable CMAKE=no
- ENABLE_REMOTE="-DENABLE_REMOTE=ON" CMAKE=yes
matrix:
fast_finish: true
addons:
coverity_scan:
# customized build script URL
# TRAVIS_REPO_SLUG: owner_name/repo_name of repository currently being built
# TRAVIS_BRANCH: name of the branch currently being built
build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis-coverity-scan-build.sh
# project metadata
project:
name: $TRAVIS_REPO_SLUG
# Where email notification of build analysis results will be sent
#notification_email: [email protected]
# Commands to prepare for build_command
build_command_prepend: ./configure --enable-remote
# This command will be added as an argument to "cov-build" to compile
# the project for analysis
build_command: make
# Pattern to match selecting branches that will run analysis
branch_pattern: coverity_scan
apt:
#
# These are the packages we want from the standard repository for
# Trusty. Trusty didn't have a DPDK package, so we can't install
# it from that repository (and Xenial's is DPDK 2.2, which is too
# old to support the libpcap DPDK code).
#
packages:
- libusb-1.0-0-dev
- libdbus-glib-1-dev
- libbluetooth-dev
- libnl-genl-3-dev
- libibverbs-dev
- libnuma-dev
#
# Try installing DPDK from the jessie-backports repository, as it's
# DPDK 16.11.
#
sources:
- sourceline: 'deb [trusted=yes] http://ftp.debian.org/debian jessie-backports main'
packages:
- libdpdk-dev
git:
quiet: true
depth: 3
before_install:
- uname -a
- date
install:
before_script:
script:
- if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then exit 0; fi
- touch .devel configure
- if [ "$CMAKE" = no ]; then echo '$ ./configure [...]' && echo -n travis_fold:start:script.configure; fi
- if [ "$CMAKE" = no ]; then ./configure --prefix=/tmp "--${REMOTE}-remote"; fi
- if [ "$CMAKE" = no ]; then echo -n travis_fold:end:script.configure; fi
- if [ "$CMAKE" = yes ]; then mkdir build; fi
- if [ "$CMAKE" = yes ]; then cd build; fi
- if [ "$CMAKE" = yes ]; then echo -n travis_fold:start:script.cmake; fi
- if [ "$CMAKE" = yes ]; then cmake -DCMAKE_INSTALL_PREFIX=/tmp $ENABLE_REMOTE ..; fi
- if [ "$CMAKE" = yes ]; then echo -n travis_fold:end:script.cmake; fi
- make -s all
- make -s testprogs
- echo '$ make install [...]' && echo -n travis_fold:start:script.make_install
- PATH=$PATH make install
- echo -n travis_fold:end:script.make_install
- if [ "$CMAKE" = no ]; then testprogs/findalldevstest; fi
- if [ "$CMAKE" = yes ]; then run/findalldevstest; fi
- if [ "$CMAKE" = no ]; then make releasetar; fi