mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-24 18:43:39 +08:00
81 lines
3.2 KiB
YAML
81 lines
3.2 KiB
YAML
sudo: false
|
|
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: "DwUeukcRGl1vXNZDDt2237zCA58ZzmzWpCkPcb/Hpeh8OvRw1eBZJiu4L8iD2qtY4A/dPDvOeBiml5MF6bVri9Dui1yPkvkvFqIXzbK5CWS6Ye+NgSBNMwqnAjhTMv/x8I4Bvy9IhDGwj/2JXVUvjBddRMLRyr/ag+MDRB1IVAI="
|
|
# 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'
|
|
# Coverity script test mode (if true no uploading, avoid reaching the quota)
|
|
# usual processing: false.
|
|
- coverity_scan_script_test_mode=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: tcpdump-workers@lists.tcpdump.org
|
|
# 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
|
|
apt:
|
|
packages:
|
|
- libssl-dev
|
|
- libssl0.9.8
|
|
- libssl1.0.0
|
|
- libdnet-dev
|
|
- libsmi2-dev
|
|
- libcap-ng-dev
|
|
- libpcap-dev
|
|
|
|
git:
|
|
quiet: true
|
|
depth: 3
|
|
|
|
before_install:
|
|
- uname -a
|
|
- date
|
|
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew update >/dev/null; fi
|
|
|
|
install:
|
|
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew install libsmi | grep -v '%'; fi
|
|
|
|
before_script:
|
|
- 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 && make); fi
|
|
|
|
script:
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then touch .devel configure; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo '$ ./configure [...]' && echo -n travis_fold:start:script.configure; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./configure --prefix=/tmp; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo -n travis_fold:end:script.configure; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -s; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo '$ make install [...]' && echo -n travis_fold:start:script.make_install; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then PATH=$PATH make install; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo -n travis_fold:end:script.make_install; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make check; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./tcpdump -D; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./tcpdump -J; fi
|
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./tcpdump --version; fi
|