aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 5de5b4f3e5d1493c771d8f3ffc949e74d827c523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
language: cpp
sudo: required
dist: trusty
os:
  - osx
  - linux
compiler:
  - clang
  - gcc
env:
 - PCAP=ON
 - PCAP=OFF
matrix:
  exclude:
  # Exclude gcc build (Need some work) with osx
  - os: osx
    compiler: gcc
addons:
  apt:
    update: true
    sources:
    - ubuntu-toolchain-r-test
    - llvm-toolchain-trusty-5.0
    - sourceline: 'ppa:wireshark-dev/stable'
    packages:
    - g++-8
    - clang-5.0
before_install:
  - echo $TRAVIS_OS_NAME
  # macos
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./tools/macos-setup-brew.sh; fi
  # linux
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" == "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi ; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ./tools/debian-setup.sh --install-optional -qq; fi
  - $CC --version
before_script:
  - sudo gem install asciidoctor --no-ri --no-rdoc
  - mkdir build
  - cd build
  - cmake -GNinja -DENABLE_PCAP=${PCAP} ..
script:
  - ninja
  - if [ "$PCAP" == "ON" ]; then ninja test-programs && ninja test; fi