travis: use gcc-7 on cocci build

Catches more errors, like switch statements fall throughs
that are caught in private QA.
pull/3401/head
Jason Ish 7 years ago committed by Victor Julien
parent 1e8959b465
commit 55ad4e4ece

@ -57,17 +57,21 @@ matrix:
include: include:
# Linux, gcc, coccinelle. # Linux, gcc, coccinelle.
- os: linux - os: linux
compiler: gcc compiler: gcc-7
env: env:
- NAME="linux,gcc,cocci" - NAME="linux,gcc-7,cocci"
- *default-cflags - *default-cflags
- NO_UNITTESTS=yes
addons: addons:
apt: apt:
sources: sources:
- sourceline: ppa:npalix/coccinelle - sourceline: ppa:npalix/coccinelle
# For gcc-7.
- sourceline: ppa:ubuntu-toolchain-r/test
packages: packages:
- *packages - *packages
- coccinelle - coccinelle
- gcc-7
# Linux, gcc, Rust (latest stable). # Linux, gcc, Rust (latest stable).
# This is allowed to fail, update allow_failures if the env changes. # This is allowed to fail, update allow_failures if the env changes.
- os: linux - os: linux
@ -152,21 +156,22 @@ matrix:
script: script:
- sh ./autogen.sh - sh ./autogen.sh
- | - |
if [[ "${NO_UNITTESTS}" != "yes" ]]; then
ARGS="${ARGS} --enable-unittests"
fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
./configure --enable-nfqueue --enable-unittests --enable-hiredis ${ARGS} ./configure --enable-nfqueue --enable-hiredis ${ARGS}
fi elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
./configure --enable-unittests --enable-hiredis --enable-ipfw \ ./configure --enable-hiredis --enable-ipfw \
--enable-lua --with-libpcre-includes=/usr/local/include \ --enable-lua --with-libpcre-includes=/usr/local/include \
--with-libpcre-includes=/usr/local/include \ --with-libpcre-includes=/usr/local/include \
--with-libpcre-libraries=/usr/local/lib \ --with-libpcre-libraries=/usr/local/lib \
--with-libnss-includes=/usr/local/opt/nss/include/nss \ --with-libnss-includes=/usr/local/opt/nss/include/nss \
--with-libnss-libraries=/usr/local/opt/nss/lib \ --with-libnss-libraries=/usr/local/opt/nss/lib \
--with-libnspr-includes=/usr/local/opt/nspr/include/nspr \ --with-libnspr-includes=/usr/local/opt/nspr/include/nspr \
--with-libnspr-libraries=/usr/local/opt/nspr/lib --with-libnspr-libraries=/usr/local/opt/nspr/lib ${ARGS}
fi fi
- | - |
# Linux container builds have 2 cores, make use of them. # Linux container builds have 2 cores, make use of them.
@ -177,6 +182,7 @@ script:
- | - |
# Like "make check", but fail on first error. We redirect the output # Like "make check", but fail on first error. We redirect the output
# so Travis doesn't fail the build with a too much output error. # so Travis doesn't fail the build with a too much output error.
if [[ "${NO_UNITTESTS}" != "yes" ]]; then
mkdir -p ./qa/log mkdir -p ./qa/log
./src/suricata -u -l ./qa/log --fatal-unittests > unittests.log 2>&1 ./src/suricata -u -l ./qa/log --fatal-unittests > unittests.log 2>&1
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
@ -184,6 +190,7 @@ script:
tail -n 500 unittests.log tail -n 500 unittests.log
exit 1 exit 1
fi fi
fi
- | - |
if [[ "$DO_DISTCHECK" == "yes" ]]; then if [[ "$DO_DISTCHECK" == "yes" ]]; then
make distcheck DISTCHECK_CONFIGURE_FLAGS="${ARGS}" make distcheck DISTCHECK_CONFIGURE_FLAGS="${ARGS}"

Loading…
Cancel
Save