mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 04:30:43 +01:00
86 lines
6.0 KiB
YAML
86 lines
6.0 KiB
YAML
language: c
|
|
|
|
compiler:
|
|
- gcc
|
|
- clang
|
|
|
|
# you can comment this in if a large number of known-good
|
|
# merges is to happen and only buildbot testing is desired
|
|
#branches:
|
|
# except:
|
|
# - master-candidate
|
|
|
|
services: mysql
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- mysql-server
|
|
- mysql-client
|
|
|
|
matrix:
|
|
exclude:
|
|
- compiler: "gcc"
|
|
- compiler: "clang"
|
|
include:
|
|
# note: -Werror makes ./configure.sh not properly detect functions
|
|
# like strndup() on Ubuntu 12.04. So we enable it on trusty builds
|
|
# only. The first build with gcc actually only has the purpose of
|
|
# checking for warnings (the testbench currently has some issues
|
|
# on travis Ubuntu 14.04, but not in the regular environments, we
|
|
# need to find out some time why this is).
|
|
- compiler: "gcc"
|
|
env: CFLAGS="-g -std=c99 -Werror -W -Wall -Wextra -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute"
|
|
dist: trusty
|
|
- compiler: "clang"
|
|
env: STAT_AN="YES", GROK="YES", CFLAGS="-g -O1 -std=c99 -Werror"
|
|
dist: trusty
|
|
- compiler: "gcc"
|
|
env: BUILD_FROM_TARBALL="YES", GROK="YES", CHECK="YES", CFLAGS="-g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute", RS_TESTBENCH_VALGRIND_EXTRA_OPTS="--suppressions=travis/trusty.supp --gen-suppressions=all"
|
|
dist: trusty
|
|
- compiler: "clang"
|
|
env: CHECK="YES", CFLAGS="-g -O1 -fsanitize=address -fno-color-diagnostics"
|
|
|
|
before_install:
|
|
#- travis_retry sudo apt-get install -qq python-software-properties
|
|
- travis_retry sudo add-apt-repository ppa:adiscon/v8-stable -y
|
|
- travis_retry sudo apt-get update -qq
|
|
- mysql -u root -e "CREATE USER 'rsyslog'@'localhost' IDENTIFIED BY 'testbench';"
|
|
- mysql -u root -e "GRANT ALL PRIVILEGES ON * . * TO 'rsyslog'@'localhost'; FLUSH PRIVILEGES;"
|
|
- mysql -u root -e "CREATE DATABASE Syslog; GRANT ALL ON Syslog.* to 'rsyslog'@'localhost' identified by 'testbench';"
|
|
- mysql -u root -e "USE Syslog; CREATE TABLE SystemEvents (ID int unsigned not null auto_increment primary key, CustomerID bigint,ReceivedAt datetime NULL,DeviceReportedTime datetime NULL,Facility smallint NULL,Priority smallint NULL,FromHost varchar(60) NULL,Message text,NTSeverity int NULL,Importance int NULL,EventSource varchar(60),EventUser varchar(60) NULL,EventCategory int NULL,EventID int NULL,EventBinaryData text NULL,MaxAvailable int NULL,CurrUsage int NULL,MinUsage int NULL,MaxUsage int NULL,InfoUnitID int NULL,SysLogTag varchar(60),EventLogType varchar(60),GenericFileName VarChar(60),SystemID int NULL); CREATE TABLE SystemEventsProperties (ID int unsigned not null auto_increment primary key,SystemEventID int NULL,ParamName varchar(255) NULL,ParamValue text NULL);"
|
|
|
|
install:
|
|
- travis_retry sudo apt-get install -qq build-essential automake pkg-config libtool autoconf autotools-dev gdb valgrind libdbi-dev libsnmp-dev libmysqlclient-dev postgresql-client faketime libdbd-mysql libmongo-client-dev
|
|
- travis_retry sudo apt-get install -qq libestr-dev librelp-dev libfastjson-dev zlib1g-dev uuid-dev libgcrypt11-dev liblogging-stdlog-dev bison flex libksi1 libksi1-dev libcurl4-gnutls-dev
|
|
- travis_retry sudo apt-get install -qq python-docutils liblognorm1-dev
|
|
- if [ "$CC" == "clang" ]; then travis_retry sudo apt-get install -qq clang; fi
|
|
- if [ "x$GROK" == "xYES" ]; then travis_retry sudo apt-get install -qq libglib2.0-dev libgrok1 libgrok-dev libtokyocabinet-dev ; fi
|
|
|
|
script:
|
|
- if [ "x$BUILD_FROM_TARBALL" == "xYES" ]; then autoreconf -fvi && ./configure && make dist && mv *.tar.gz rsyslog.tar.gz && mkdir unpack && cd unpack && tar xzf ../rsyslog.tar.gz && ls -ld rsyslog* && cd rsyslog* ; fi
|
|
- pwd
|
|
- autoreconf --force --verbose --install
|
|
# I don't know how to pass two env vars in the include matrix, so
|
|
# I set the second one here via an "if"
|
|
- if [ "x$GROK" == "xYES" ]; then export GROK="--enable-mmgrok"; fi
|
|
- 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 --enable-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 --enable-mysql --enable-mysql-tests --enable-gt-ksi --enable-libdbi --enable-pgsql --enable-omhttpfs --enable-elasticsearch --enable-valgrind --enable-ommongodb $NO_VALGRIND $GROK
|
|
- export USE_AUTO_DEBUG="off" # set to "on" to enable this for travis
|
|
- make
|
|
- if [ "x$CHECK" == "xYES" ] ; then make check ; fi
|
|
- if [ -f tests/test-suite.log ] ; then cat tests/test-suite.log; fi
|
|
- if [ "x$CHECK" == "xYES" ] ; then make distcheck ; fi
|
|
- if [ "x$STAT_AN" == "xYES" ] ; then make clean ; fi
|
|
- if [ "x$STAT_AN" == "xYES" ] ; then cd compat; scan-build --status-bugs make && cd .. ; fi
|
|
# we now build those components that we know to need some more work
|
|
# they will not be included in the later static analyzer run. But by
|
|
# explicitely listing the modules which do not work, we automatically
|
|
# get new modules/files covered.
|
|
- if [ "x$STAT_AN" == "xYES" ] ; then cd runtime; make lmnet_la-net.lo libgcry_la-libgcry.lo ; 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
|