Travis: build on OS X too
[metze/heimdal/wip.git] / .travis.yml
1 os:
2     - linux
3     - osx
4
5 language: c
6
7 env:
8     global:
9         secure: "YKG77M7zMvJ+IeV2ziw//HcHqMqFoAzIZlE99Yw/aOn5pvMYKq6Ep7EFVhbfDu9yN0T7M5csCGQeH7/ylDlsZSRMUw72844ezMDM8e10T/lW/T/OYN7j1ZVHh3WSJgS+1D9VG6/Y0OY1Si3lb7PcOdAIU0fPJV5xQONN2+hpJeI="
10
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 pkg-config python ss-dev texinfo unzip netbase; fi
14     - if [ $TRAVIS_OS_NAME = osx ]; then brew update; fi
15     - if [ $TRAVIS_OS_NAME = osx ]; then brew install cpanm bison flex berkeley-db openssl; fi
16     - if [ $TRAVIS_OS_NAME = osx ]; then sudo cpanm install JSON; fi
17     - mkdir ci-build
18     - mkdir coverity-build
19     - ./autogen.sh
20
21 install:
22     - cd ci-build
23     - if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
24     - ../configure --enable-maintainer-mode $COVERAGE
25     - make -j3
26
27 script:
28     - if [ x${COVERITY_SCAN_BRANCH} != x1 ]; then make check; fi
29
30 compiler: clang
31 after_script:
32     - if [ -n "$COVERAGE" ]; then coveralls --gcov-options; fi
33
34 matrix:
35     # Add a gcov build
36     include:
37         - compiler: gcc
38           env: COVERAGE="--enable-gcov"
39           os: linux
40     # The gcov build is not working quite yet
41     allow_failures:
42         compiler: gcc
43         env: COVERAGE="--enable-gcov"
44         os: linux
45
46 notifications:
47     email:
48         on_success: change
49         on_failure: always
50
51 addons:
52
53     coverity_scan:
54         project:
55             name: "heimdal/heimdal"
56             description: "Build submitted via Travis CI"
57         notification_email: heimdal-builders@secure-endpoints.com
58         build_command_prepend: ../configure --enable-maintainer-mode
59         build_command: make
60         branch_pattern: coverity_scan