freebsd_task:
name: FBSD+BM
+ only_if: $CIRRUS_BRANCH == master || $CIRRUS_BRANCH == tcpdump-4.99
freebsd_instance:
# FreeBSD fails to start with 1 GB. 8 CPUs max concurrency.
matrix:
linux_task:
name: LNX+BM
+ only_if: $CIRRUS_BRANCH == master || $CIRRUS_BRANCH == tcpdump-4.99
container:
# Linux works just fine with 1 GB. 16 CPUs max concurrency.
cpu: 4
macos_task:
name: MAC+BM
+ only_if: $CIRRUS_BRANCH == master || $CIRRUS_BRANCH == tcpdump-4.99
macos_instance:
image: big-sur-xcode
# "cpu" and "memory" are invalid keywords for macOS tasks now
- brew install libsmi | grep -v '%'
- (cd .. && echo '$ git clone [...] libpcap.git' && git clone --depth ${CIRRUS_CLONE_DEPTH} --branch=master --quiet ${LIBPCAP_GIT})
- ./build_matrix.sh
+
+coverity_task:
+ name: Coverity Scan
+ only_if: $CIRRUS_BRANCH == coverity_scan
+ container:
+ cpu: 4
+ memory: 2G
+ image: ubuntu:20.04
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ MAKEFLAGS: -j 5
+ COVERITY_SCAN_PROJECT_NAME: $CIRRUS_REPO_FULL_NAME
+ COVERITY_SCAN_TOKEN: ENCRYPTED[1b6f994cabfe74267ce2dce81fd9e49f694e9cfe69fb99f7d1580907bec1266efd7b38df3a47ccab53d5af98636f8e9c]
+ COVERITY_SCAN_BUILD_COMMAND_PREPEND: ./configure
+ COVERITY_SCAN_BUILD_COMMAND: make
+ COVERITY_SCAN_BRANCH_PATTERN: $CIRRUS_BRANCH
+ TRAVIS_BRANCH: $CIRRUS_BRANCH
+ TRAVIS_PULL_REQUEST: ${CIRRUS_BASE_BRANCH:+true}
+ script:
+ - apt-get -qy update
+ - apt-get -qy install autoconf make gcc
+ - apt-get -qy install libssl-dev libsmi2-dev libcap-ng-dev libpcap-dev
+ - apt-get -qy install git curl wget ruby rubygems ruby-json # for the coverity script
+ - apt list --installed 'lib*-dev'
+ - /bin/bash .travis-coverity-scan-build.sh # Not executable, depends on bashisms.
jobs:
fast_finish: true
include:
- - name: "amd64"
- arch: amd64
- if: branch = coverity_scan
- name: "arm64"
arch: arm64
- if: branch != coverity_scan
+ if: branch IN (master, tcpdump-4.99)
- name: "ppc64le"
arch: ppc64le
- if: branch != coverity_scan
+ if: branch IN (master, tcpdump-4.99)
- name: "s390x"
arch: s390x
- if: branch != coverity_scan
+ if: branch IN (master, tcpdump-4.99)
allow_failures:
- arch: ppc64le # Since 20 Feb 2021 often times out trying to boot.
env:
global:
- # 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_CPU_ARCH" = amd64 -a "$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
- MAKEFLAGS='-j 2' # Travis CI VMs come with 2 cores
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
- # 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:
- libdbus-1-dev
- (cd .. && echo '$ git clone [...] libpcap.git' && git clone --depth 3 --branch=master --quiet git://github.com/the-tcpdump-group/libpcap.git)
script:
- # On the other hand, using travis_terminate on macOS appears to
- # *cause* the problem, so we do so only on Linux.
- #
- - if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then if [ "$TRAVIS_OS_NAME" = linux ]; then travis_terminate 0; else exit 0; fi; fi
- ./build_matrix.sh