aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 03e61b185c1b0d825c408696febbe36d645b316a (plain)
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
# Copyright (c) 2016, 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

env:
  global:
    # COVERITY_SCAN_TOKEN
    # ** specific to your project **
    - secure: "xxxx"

language: c
compiler: clang
sudo: required

before_install:
        - sudo apt-get -qq update
        - sudo apt-get install automake autoconf libtool libssl-dev graphviz mscgen doxygen
        - sudo apt-get install libpcap-dev linux-headers-`uname -r`
        - gem install asciidoctor

#       Install cunit for the validation tests because distro version is too old and fails C99 compile
        - export CUNIT_VERSION=2.1-3
        - curl -sSOL http://sourceforge.net/projects/cunit/files/CUnit/${CUNIT_VERSION}/CUnit-${CUNIT_VERSION}.tar.bz2
        - tar -jxf *.bz2
        - cd CUnit*
        - ./bootstrap
        - ./configure --enable-debug --enable-automated --enable-basic --enable-console --enable-examples --enable-test
        - make
        - sudo make install
        - cd ..
        - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
#	DPDK pktio
        - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
        - git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v16.07 http://dpdk.org/git/dpdk dpdk
        - pushd dpdk
        - git log --oneline --decorate
        - make config T=${TARGET} O=${TARGET}
        - pushd ${TARGET}
        - sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
        - popd
        - make install T=${TARGET} EXTRA_CFLAGS="-fPIC" > /dev/null
        - popd

script:

        - ./bootstrap
        - ./configure --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example --with-dpdk-path=`pwd`/dpdk/${TARGET}
        - make check
        - git clean -f -d -x && rm -rf dpdk
        - ./bootstrap
        - ./configure
        - make doxygen-doc
        - make distcheck

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