.travis.yml 1.33 KB
Newer Older
Sten Spans's avatar
Sten Spans committed
1 2 3 4
language: c
compiler:
  - clang
  - gcc
5 6
os:
  - linux
Sten Spans's avatar
Sten Spans committed
7 8 9
matrix:
  include:
    - compiler: gcc
Sten Spans's avatar
Sten Spans committed
10
      os: linux
Sten Spans's avatar
Sten Spans committed
11
      env: GCOV=1
Sten Spans's avatar
Sten Spans committed
12 13 14
  exclude:
    - os: osx
      compiler: gcc
Sten Spans's avatar
Sten Spans committed
15

Sten Spans's avatar
Sten Spans committed
16
before_install:
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  - echo "$TRAVIS_OS_NAME"
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi

install:
  - echo "$TRAVIS_OS_NAME"
  # Linux packages
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
    sudo apt-get install -qq libevent-dev libpcap-dev libcap-ng-dev libmnl-dev;
    sudo apt-get install -qq libpci-dev autotools-dev check pkg-config;
    sudo apt-get install -qq lsb-base pciutils;
    sudo apt-get install -qq slirp aufs-tools;
    fi
  # OSX packages
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
32
    brew upgrade autoconf automake pkgconfig libtool || :;
Sten Spans's avatar
Sten Spans committed
33
    brew install libevent check || :;
34 35
    fi
  # coveralls
Sten Spans's avatar
Sten Spans committed
36
  - sudo pip install cpp-coveralls
37

38
before_script:
39
  - echo "$TRAVIS_OS_NAME"
40
  - autoreconf -i
41

Sten Spans's avatar
Sten Spans committed
42
script:
43 44 45 46 47 48 49 50
  - echo "$TRAVIS_OS_NAME"
  - CHECK="check"
  - if [ "$GCOV" = 1 ]; then
    FLAGS="$FLAGS --enable-gcov"; CHECK="check-uml";
    fi
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then CHECK=""; fi
  - ./configure $FLAGS && make && make $CHECK

Sten Spans's avatar
Sten Spans committed
51
after_success:
52 53 54
  - if [ "$GCOV" = 1 ]; then
    coveralls -b src -r src -e compat -e netif_bsd.c -E ".*\.h" --gcov-options "\-lp";
    fi