forked from the-tcpdump-group/tcpdump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (55 loc) · 2.58 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
language: c
os:
- linux
- osx
compiler:
- gcc
- clang
env:
global:
- BUILD_LIBPCAP=true
# encrypted COVERITY_SCAN_TOKEN from
# https://scan.coverity.com/projects/<project_id>/submit_build?tab=travis_ci
- secure: "V3k6MtUxrZmzpzJrNdRGcv2PV3WpvIyxYhK3MR8mDmHANXGkRM3qvuTLyiWHfyYxX2KMkEnfYG8b8PPzNNyEXbFdRN9mhHWRyIYduimqdfZLpIz+/c8E/JnMdPo/N5ghPuD/d7pFEsbsWotpZUDyfMsif8QrqqbXDDWFqTgtQg0="
# 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 "$BUILD_IPV6" = true'
# Coverity script test mode (if true no uploading, avoid reaching the quota)
# usual processing: false.
- coverity_scan_script_test_mode=false
matrix:
- BUILD_IPV6=true
- BUILD_IPV6=false
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
# 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
before_install:
- uname -a
- env | sort -f
- if [ "$TRAVIS_OS_NAME" = linux ]; then sudo apt-get update; fi
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew update; fi
install:
- if [ "$TRAVIS_OS_NAME" = linux ]; then sudo apt-get install libssl-dev libssl0.9.8 libssl1.0.0 libdnet-dev libsmi2-dev; fi
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew install libsmi; fi
before_script:
- if [ "$BUILD_LIBPCAP" = true ]; then (cd .. && git clone git://github.com/the-tcpdump-group/libpcap.git && cd libpcap && ./configure && make); else sudo apt-get install libpcap-dev; fi
script:
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then touch .devel configure; fi
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then if [ "$BUILD_IPV6" = true ]; then ./configure; else ./configure --disable-ipv6; fi; fi
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -s; fi
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then if [ "$BUILD_IPV6" = true ]; then make check; fi; fi