dist: trusty sudo: false language: c addons: apt: # Define the required packages without nss/nspr so we can do a # build without nss/nspr packages-without-nssnspr: &packages-without-nssnspr - libpcre3 - libpcre3-dbg - libpcre3-dev - build-essential - autoconf - automake - libtool - libpcap-dev - libnet1-dev - libyaml-0-2 - libyaml-dev - zlib1g - zlib1g-dev - libcap-ng-dev - libcap-ng0 - make - libmagic-dev - libnetfilter-queue-dev - libnetfilter-queue1 - libnfnetlink-dev - libnfnetlink0 - libhiredis-dev - libjansson-dev - libevent-dev - libevent-pthreads-2.0-5 # Define the required packages without libjansson so we can do a # build without libjansson. packages-without-jansson: &packages-without-jansson - libnss3-dev - libpcre3 - libpcre3-dbg - libpcre3-dev - build-essential - autoconf - automake - libtool - libpcap-dev - libnet1-dev - libyaml-0-2 - libyaml-dev - zlib1g - zlib1g-dev - libcap-ng-dev - libcap-ng0 - make - libmagic-dev - libnetfilter-queue-dev - libnetfilter-queue1 - libnfnetlink-dev - libnfnetlink0 - libhiredis-dev - libevent-dev - libevent-pthreads-2.0-5 # Now define the default set of packages which is those above, and # libjansson. packages: &packages - *packages-without-jansson - libjansson-dev cache: directories: - /home/travis/.rustup - /home/travis/.cargo - /home/travis/.multirust # Define the default CFLAGS used by all builds as a YAML anchor. default-cflags: &default-cflags CFLAGS="-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function" matrix: allow_failures: # Allow the rust-stable build to fail. These entries must match # the env entry in the build matrix exactly. - env: - NAME="linux,gcc,rust-stable" - *default-cflags - RUST_VERSION="stable" - ARGS="--enable-rust --enable-rust-strict" - DO_CHECK_SETUP_SCRIPTS="yes" - DO_DISTCHECK="yes" include: # Linux, gcc, coccinelle. - os: linux compiler: gcc-7 env: - NAME="linux,gcc-7,cocci" - *default-cflags - NO_UNITTESTS=yes addons: apt: sources: - sourceline: ppa:npalix/coccinelle # For gcc-7. - sourceline: ppa:ubuntu-toolchain-r/test packages: - *packages - coccinelle - gcc-7 - python3-sphinx # Linux, gcc, Rust (latest stable). # This is allowed to fail, update allow_failures if the env changes. - os: linux compiler: gcc env: - NAME="linux,gcc,rust-stable" - *default-cflags - RUST_VERSION="stable" - ARGS="--enable-rust --enable-rust-strict" - DO_CHECK_SETUP_SCRIPTS="yes" - DO_DISTCHECK="yes" # Linux, gcc, Rust (auto detect). # - Rust 1.31.0, the latest known working version. - os: linux compiler: gcc env: - NAME="linux,gcc,rust-1.31.0-disabled" - *default-cflags - RUST_VERSION="1.31.0" - ARGS="--disable-rust" - DO_DISTCHECK="yes" # Linux, gcc, Rust (auto detect). # - Rust 1.31.0, the latest known working version. - os: linux compiler: gcc env: - NAME="linux,gcc,rust-1.31.0-auto" - *default-cflags - RUST_VERSION="1.31.0" - ARGS="" - DO_DISTCHECK="yes" # Linux, gcc, Rust. # - Rust 1.31.0, the latest known working version. - os: linux compiler: gcc env: - NAME="linux,gcc,rust-1.31.0" - *default-cflags - RUST_VERSION="1.31.0" - ARGS="--enable-rust --enable-rust-strict" - DO_DISTCHECK="yes" # Linux, gcc, Rust (1.24.1 - oldest supported). - os: linux compiler: gcc env: - NAME="linux,gcc,rust-1.24.1" - *default-cflags - RUST_VERSION="1.24.1" - ARGS="--enable-rust --enable-rust-strict" - DO_DISTCHECK="yes" # Linux, gcc, -DNDEBUG. - os: linux compiler: gcc env: - NAME="linux,gcc,ndebug" - *default-cflags - EXTRA_CFLAGS="-DNDEBUG" # Linux, clang. For this build we'll also enable -Wshadow. - os: linux compiler: clang env: - NAME="linux,clang" - *default-cflags - EXTRA_CFLAGS="-Wshadow" # Linux, gcc, profiling. - os: linux compiler: gcc env: - NAME="linux,gcc,profiling" - *default-cflags - ARGS="--enable-profiling" # Linux, gcc, debug. - os: linux compiler: gcc env: - NAME="linux,gcc,debug" - *default-cflags - ARGS="--enable-debug" - ENABLE_DEBUG="yes" # Linux, gcc, no jansson. - os: linux compiler: gcc env: - NAME="linux,gcc,no-jansson" - *default-cflags - CONFIGURE_SHOULD_FAIL="yes" addons: apt: packages: - *packages-without-jansson # OSX 10.13, XCode 8.3 - os: osx compiler: gcc osx_image: xcode8.3 sudo: true env: - NAME="osx,gcc" - *default-cflags # Linux, gcc, no nss/nspr. - os: linux compiler: gcc env: - NAME="linux,gcc,no-nssnspr" - *default-cflags - ARGS="--disable-nss --disable-nspr" addons: apt: packages: - *packages-without-nssnspr script: ./qa/travis.sh before_install: - export PATH=$HOME/.cargo/bin:$PATH - | curl https://sh.rustup.rs -sSf | sh -s -- -y if [[ "$RUST_VERSION" != "" ]]; then rustup override set $RUST_VERSION fi rustc --version - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update # Unlink and install each dependency to avoid errors where a # formula might already be installed but is not the current # version. packages="" packages="$packages pkg-config" packages="$packages libmagic" packages="$packages libyaml" packages="$packages nss" packages="$packages nspr" packages="$packages jansson" packages="$packages libnet" packages="$packages lua" packages="$packages pcre" packages="$packages hiredis" packages="$packages jq" for package in $packages; do if brew ls $package --versions > /dev/null; then brew unlink $package fi done # Now install. brew install $packages # Now relink, becuase if a newer version of a package wasn't # installed above, it will remain unlinked. brew link $packages curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python ./get-pip.py sudo pip install PyYAML fi - ./qa/travis-libhtp.sh