rsyslog/.travis.yml
2015-12-01 18:21:42 +01:00

62 lines
3.7 KiB
YAML

language: c
compiler:
- gcc
- clang
branches:
except:
- master-candidate
matrix:
exclude:
- compiler: "gcc"
- compiler: "clang"
include:
# - compiler: "gcc"
# env: CFLAGS="-g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute"
#- compiler: "gcc"
# env: CFLAGS="-g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute"
# dist: trusty
# - compiler: "clang"
# env: CFLAGS="-g -O1 -fsanitize=address"
- compiler: "clang"
env: STAT_AN="YES", CFLAGS="-g -O1 -std=c99"
dist: trusty
before_install:
#- travis_retry sudo apt-get install -qq python-software-properties
- travis_retry sudo add-apt-repository ppa:adiscon/v8-devel -y
- travis_retry sudo apt-get update -qq
install:
- travis_retry sudo apt-get install -qq build-essential automake pkg-config libtool autoconf autotools-dev gdb valgrind libdbi-dev libsnmp-dev
- travis_retry sudo apt-get install -qq libestr-dev librelp-dev libjson0-dev zlib1g-dev uuid-dev libgcrypt11-dev liblogging-stdlog-dev bison flex
- travis_retry sudo apt-get install -qq python-docutils liblognorm1-dev
- if [ "$CC" == "clang" ]; then travis_retry sudo apt-get install -qq clang; fi
script:
- autoreconf --force --verbose --install
# I don't know how to pass two env vars in the cinlude matrix, so
# I set the second one here via an "if"
- if [ "$CC" == "clang" ]; then export NO_VALGRIND="--without-valgrind-testbench"; fi
- ./configure --prefix=/opt/rsyslog --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --docdir=/usr/share/doc/rsyslog --disable-generate-man-pages --enable-testbench --enable-imdiag --enable-imfile --enable-impstats --enable-imptcp --enable-mmanon --enable-mmaudit --enable-mmfields --enable-mmjsonparse --enable-mmpstrucdata --enable-mmsequence --enable-mmutf8fix --enable-mail --enable-omprog --enable-omruleset --enable-omstdout --enable-omuxsock --enable-pmaixforwardedfrom --enable-pmciscoios --enable-pmcisconames --enable-pmlastmsg --enable-pmsnare --enable-libgcrypt --enable-mmnormalize --disable-omudpspoof --enable-relp --disable-snmp --disable-mmsnmptrapd --enable-gnutls $NO_VALGRIND
- export USE_AUTO_DEBUG="off" # set to "on" to enable this for travis
- if [ "x$STAT_AN" == "x" ] ; then make && make check && make distcheck; fi
#- if [ "x$STAT_AN" == "x" ] ; then cat tests/test-suite.log; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd compat; scan-build --status-bugs make && cd .. ; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd runtime; make ; cd .. ; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/imfile; make && cd ../..; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/imudp; make && cd ../..; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/imptcp; make && cd ../..; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/omrelp; make && cd ../..; fi
#- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/omkafka; make && cd ../..; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/ommail; make && cd ../..; fi
#- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/pmciscoios; make && cd ../..; fi
- if [ "x$STAT_AN" == "xYES" ] ; then cd plugins/mmfields; make && cd ../..; fi
- if [ "x$STAT_AN" == "xYES" ] ; then scan-build --status-bugs make ; fi
# if that all worked, we go the traditional gcc & valgrind way
#- env TESTS="json_array_looping.sh" make -e check
# only for newer autoconf tools you need to add:
# - cat tests/test-suite.log