tcpdump/.travis.yml

108 lines
4.1 KiB
YAML
Raw Normal View History

2015-07-11 03:47:30 +08:00
sudo: false
language: c
2014-05-16 22:09:42 +08:00
os:
- linux
- osx
compiler:
- gcc
- clang
env:
2014-02-28 20:48:49 +08:00
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 -a "$REMOTE" = enable -a "$CMAKE" = no -a "$CRYPTO" = yes'
# Coverity script test mode (if true no uploading, avoid reaching the quota)
# usual processing: false.
- coverity_scan_script_test_mode=false
matrix:
# NOTE: REMOTE= is for the libpcap build, which is done with autotools
# even if we're building tcpdump with CMake.
- CMAKE=no REMOTE=disable CRYPTO=no
- CMAKE=no REMOTE=disable CRYPTO=yes
- CMAKE=no REMOTE=enable CRYPTO=no
- CMAKE=no REMOTE=enable CRYPTO=yes
- CMAKE=yes REMOTE=disable CRYPTO=no
- CMAKE=yes REMOTE=disable CRYPTO=yes
- CMAKE=yes REMOTE=enable CRYPTO=no
- CMAKE=yes REMOTE=enable CRYPTO=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: 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
2015-07-11 03:47:30 +08:00
apt:
packages:
- libusb-1.0-0-dev
- libdbus-glib-1-dev
- libbluetooth-dev
- libnl-genl-3-dev
- libibverbs-dev
- libssl-dev
- libssl0.9.8
- libssl1.0.0
- libdnet-dev
- libsmi2-dev
2015-07-11 03:47:30 +08:00
- libcap-ng-dev
- libpcap-dev
git:
quiet: true
2017-03-12 15:40:32 +08:00
depth: 3
2014-05-16 22:09:42 +08:00
before_install:
- uname -a
- date
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew update >/dev/null; fi
2014-05-16 22:09:42 +08:00
install:
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew install libsmi | grep -v '%'; fi
2014-05-16 22:09:42 +08:00
before_script:
2018-08-31 22:03:51 +08:00
- if [ "$BUILD_LIBPCAP" = true ]; then (cd .. && echo '$ git clone [...] libpcap.git' && git clone --depth 3 --branch=master --quiet git://github.com/the-tcpdump-group/libpcap.git && cd libpcap && ./configure "--${REMOTE}-remote" --prefix=/tmp && make && make install); fi
script:
2018-08-15 04:52:02 +08:00
- if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then exit 0; fi
- if [ "$TRAVIS_OS_NAME" = osx ]; then OSX_SSL_DIR=$(ls /usr/local/Cellar/openssl); echo "OSX_SSL_DIR=$OSX_SSL_DIR"; fi
- touch .devel configure
2018-08-15 04:52:02 +08:00
- if [ "$CMAKE" = no ]; then echo '$ ./configure [...]' && echo -n travis_fold:start:script.configure; fi
- if [ "$CMAKE" = no ]; then ./configure --with-crypto=${CRYPTO} CPPFLAGS="-I/usr/local/Cellar/openssl/$OSX_SSL_DIR/include/" --prefix=/tmp; fi
- if [ "$CMAKE" = no ]; then echo -n travis_fold:end:script.configure; fi
2018-08-15 04:52:02 +08:00
- 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
2018-08-15 04:52:02 +08:00
- if [ "$CMAKE" = yes ]; then cmake -DCMAKE_PREFIX_PATH=/tmp -DCMAKE_INSTALL_PREFIX=/tmp ..; fi
- if [ "$CMAKE" = yes ]; then echo -n travis_fold:end:script.cmake; fi
2018-08-15 04:52:02 +08:00
- make -s
- 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 make check; fi
- ./tcpdump -D
- ./tcpdump -J
- ./tcpdump --version
- if [ "$CMAKE" = no ]; then make releasetar; fi