fix memory leaks
[heimdal.git] / .travis.yml
blobc0789030eb12808e2800000286fe714afb135cbb
1 os:
2     - linux
3     - osx
5 language: c
7 env:
8     global:
9         secure: "YKG77M7zMvJ+IeV2ziw//HcHqMqFoAzIZlE99Yw/aOn5pvMYKq6Ep7EFVhbfDu9yN0T7M5csCGQeH7/ylDlsZSRMUw72844ezMDM8e10T/lW/T/OYN7j1ZVHh3WSJgS+1D9VG6/Y0OY1Si3lb7PcOdAIU0fPJV5xQONN2+hpJeI="
11 before_install:
12     - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get update -qq; fi
13     - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -qq bison comerr-dev flex libcap-ng-dev libdb-dev libedit-dev libjson-perl libldap2-dev libncurses5-dev libperl4-corelibs-perl libsqlite3-dev libkeyutils-dev pkg-config python ss-dev texinfo unzip netbase keyutils; fi
14     - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -qq ldap-utils gdb; fi
15     - if [ $TRAVIS_OS_NAME = osx ]; then brew update; fi
16     - if [ $TRAVIS_OS_NAME = osx ]; then brew install cpanm bison flex berkeley-db lmdb openldap openssl; fi
17     - if [ $TRAVIS_OS_NAME = osx ]; then sudo cpanm install JSON; fi
18     - mkdir ci-build
19     - mkdir coverity-build
20     - ./autogen.sh
22 install:
23     - cd ci-build
24     - if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
25     - |
26       if [ $TRAVIS_OS_NAME = osx ]; then
27           LDFLAGS="-L/usr/local/opt/berkeley-db/lib -L/usr/local/opt/lmdb/lib" \
28           CFLAGS="-I/usr/local/opt/lmdb/include" \
29           ../configure --prefix=/tmp/heimdal \
30                   --enable-static=no \
31                   --enable-pthread-support \
32                   --disable-afs-support \
33                   --disable-ndbm-db \
34                   --with-openldap=/usr/local/opt/openldap \
35                   --with-openssl=/usr/local/opt/openssl/ \
36                   --with-hcrypto-default-backend=ossl \
37                   --with-berkeley-db \
38                   --with-berkeley-db-include=/usr/local/opt/berkeley-db/include
39       else
40           ../configure --enable-maintainer-mode $COVERAGE
41       fi
42     - ulimit -c unlimited; make -j3
44 script:
45     - if [ x${COVERITY_SCAN_BRANCH} != x1 ]; then ulimit -c unlimited; make check; fi
47 after_script:
48     - if [ -n "$COVERAGE" ]; then coveralls --gcov-options '\-lp'; fi
50 after_failure:
51     - cat config.log
52     - find . -name "*.trs" -print0| xargs -0 grep -l '^:test-result: FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
53     - if [ $TRAVIS_OS_NAME = linux ]; then echo "thread apply all bt" > x; find . -name core -print0 | xargs -0 gdb -batch -x x `file core|sed -e "s/^[^']*'//" -e "s/[ '].*$//"` core; fi
54     - if [ $TRAVIS_OS_NAME = linux ]; then echo "thread apply all bt" > x; find . -name core.\* -print | while read gdb; do gdb -batch -x x `file "$core"|sed -e "s/^[^']*'//" -e "s/[ '].*$//"` "$core"; fi
56 compiler:
57     - clang
58     - gcc
60 matrix:
61     include:
62       - os: linux
63         compiler: gcc
64         env: COVERAGE=--enable-gcov
65     exclude:
66       - os: osx
67         compiler: gcc
69 notifications:
70     email:
71         on_success: change
72         on_failure: always
74 addons:
76     coverity_scan:
77         project:
78             name: "heimdal/heimdal"
79             description: "Build submitted via Travis CI"
80         notification_email: heimdal-builders@secure-endpoints.com
81         build_command_prepend: ../configure --enable-maintainer-mode
82         build_command: make
83         branch_pattern: coverity_scan