]> The Tcpdump Group git mirrors - tcpdump/blob - .travis.yml
Add '-Wunreachable-code-return' warning option in devel mode for cmake
[tcpdump] / .travis.yml
1 sudo: false
2 language: c
3
4 os:
5 - linux
6 - osx
7
8 compiler:
9 - gcc
10 - clang
11
12 env:
13 global:
14 - BUILD_LIBPCAP=true
15 # encrypted COVERITY_SCAN_TOKEN from
16 # https://scan.coverity.com/projects/<project_id>/submit_build?tab=travis_ci
17 - secure: "DwUeukcRGl1vXNZDDt2237zCA58ZzmzWpCkPcb/Hpeh8OvRw1eBZJiu4L8iD2qtY4A/dPDvOeBiml5MF6bVri9Dui1yPkvkvFqIXzbK5CWS6Ye+NgSBNMwqnAjhTMv/x8I4Bvy9IhDGwj/2JXVUvjBddRMLRyr/ag+MDRB1IVAI="
18 # Coverity run condition (avoid matrix multiple runs), need customized
19 # build script. Need an update if new matrix cases.
20 - coverity_scan_run_condition='"$TRAVIS_OS_NAME" = linux -a "$CC" = gcc -a "$REMOTE" = enable -a "$CMAKE" = no -a "$CRYPTO" = yes'
21 # Coverity script test mode (if true no uploading, avoid reaching the quota)
22 # usual processing: false.
23 - coverity_scan_script_test_mode=false
24 matrix:
25 # NOTE: REMOTE= is for the libpcap build, which is done with autotools
26 # even if we're building tcpdump with CMake.
27 - CMAKE=no REMOTE=disable CRYPTO=no
28 - CMAKE=no REMOTE=disable CRYPTO=yes
29 - CMAKE=no REMOTE=enable CRYPTO=no
30 - CMAKE=no REMOTE=enable CRYPTO=yes
31 - CMAKE=yes REMOTE=disable CRYPTO=no
32 - CMAKE=yes REMOTE=disable CRYPTO=yes
33 - CMAKE=yes REMOTE=enable CRYPTO=no
34 - CMAKE=yes REMOTE=enable CRYPTO=yes
35
36 matrix:
37 fast_finish: true
38
39 addons:
40 coverity_scan:
41 # customized build script URL
42 # TRAVIS_REPO_SLUG: owner_name/repo_name of repository currently being built
43 # TRAVIS_BRANCH: name of the branch currently being built
44 build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis-coverity-scan-build.sh
45 # project metadata
46 project:
47 name: $TRAVIS_REPO_SLUG
48 # Where email notification of build analysis results will be sent
49 #notification_email: tcpdump-workers@lists.tcpdump.org
50 # Commands to prepare for build_command
51 build_command_prepend: ./configure
52 # This command will be added as an argument to "cov-build" to compile
53 # the project for analysis
54 build_command: make
55 # Pattern to match selecting branches that will run analysis
56 branch_pattern: coverity_scan
57 apt:
58 packages:
59 - libusb-1.0-0-dev
60 - libdbus-glib-1-dev
61 - libbluetooth-dev
62 - libnl-genl-3-dev
63 - libibverbs-dev
64 - libssl-dev
65 - libssl0.9.8
66 - libssl1.0.0
67 - libdnet-dev
68 - libsmi2-dev
69 - libcap-ng-dev
70 - libpcap-dev
71
72 git:
73 quiet: true
74 depth: 3
75
76 before_install:
77 - uname -a
78 - date
79 - if [ "$TRAVIS_OS_NAME" = osx ]; then brew update >/dev/null; fi
80
81 install:
82 - if [ "$TRAVIS_OS_NAME" = osx ]; then brew install libsmi | grep -v '%'; fi
83
84 before_script:
85 - if [ "$BUILD_LIBPCAP" = true ]; then (cd .. && echo '$ git clone [...] libpcap.git' && git clone --depth=50 --branch=master --quiet git://github.com/the-tcpdump-group/libpcap.git && cd libpcap && ./configure "--${REMOTE}-remote" --prefix=/tmp && make && make install); fi
86
87 script:
88 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then touch .devel configure; fi
89 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then echo '$ ./configure [...]' && echo -n travis_fold:start:script.configure; fi
90 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then ./configure --with-crypto=${CRYPTO} CPPFLAGS="-I/usr/local/Cellar/openssl/1.0.2l/include/" --prefix=/tmp; fi
91 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes ]; then mkdir build; fi
92 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes ]; then cd build; fi
93 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes ]; then cmake -DCMAKE_PREFIX_PATH=/tmp -DCMAKE_INSTALL_PREFIX=/tmp ..; fi
94 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo -n travis_fold:end:script.configure; fi
95 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -s; fi
96 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo '$ make install [...]' && echo -n travis_fold:start:script.make_install; fi
97 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then PATH=$PATH make install; fi
98 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo -n travis_fold:end:script.make_install; fi
99 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then make check; fi
100 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./tcpdump -D; fi
101 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./tcpdump -J; fi
102 - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./tcpdump --version; fi
103 - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then make releasetar; fi