forked from p4lang/behavioral-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (73 loc) · 2.38 KB
/
.travis.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Config file for automatic testing at travis-ci.org
sudo: required
dist: trusty
# using cpp here leads to some weird version of Python being used and Python
# ImportError exceptions, so I am using the minimal trusty image
language: generic
# New travis trusty images give me Python import errors for nnpy & thrift,
# forcing use of the old ones for now. These will be deprecated in
# September. Either this issue will be resolved before then or I will have to
# run the tests in the docker image and find a way to upload coverage data to
# codecov.
group: deprecated-2017Q3
matrix:
include:
- os: linux
compiler: gcc
env: COMPILER=g++-4.8 GCOV=gcov-4.8
- os: linux
compiler: gcc
env: COMPILER=g++-6 GCOV=gcov-6
- os: linux
env: COMPILER=clang++-3.8
addons:
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- libjudy-dev
- libgmp-dev
- libpcap-dev
- libboost1.55-dev
- libboost-test1.55-dev
- libboost-program-options1.55-dev
- libboost-system1.55-dev
- libboost-filesystem1.55-dev
- libboost-thread1.55-dev
- libevent-dev
- automake
- libtool
- flex
- bison
- pkg-config
- g++-4.8
- g++-6
- clang-3.8
- libssl-dev
- python-pip
before_install:
- wget https://s3-us-west-2.amazonaws.com/p4lang/thrift_bin.tar.gz
- tar -xzvf thrift_bin.tar.gz -C $HOME/
- export PATH=$PATH:$HOME/thrift/bin/
- export LDFLAGS="$LDFLAGS -L$HOME/thrift/lib"
- export CPPFLAGS="$CPPFLAGS -I$HOME/thrift/include"
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/thrift/lib
- sudo pip install --upgrade thrift
- bash travis/install-nanomsg.sh
- sudo ldconfig
- bash travis/install-nnpy.sh
install:
- ./autogen.sh
- if [ "$GCOV" != "" ]; then ./configure CXX=$COMPILER --with-pdfixed --with-stress-tests --enable-debugger --enable-coverage; fi
- if [ "$GCOV" = "" ]; then ./configure CXX=$COMPILER --with-pdfixed --with-stress-tests --enable-debugger; fi
- make all -j2
script:
- python travis/check-nnpy.py
- make check
- bash tools/check_style.sh
# code coverage
after_success:
- if [ "$GCOV" != "" ]; then (cd src/bm_sim; $GCOV -p -r -o .libs/ *.cpp; rm *third_party*); fi
- if [ "$GCOV" != "" ]; then bash <(curl -s https://codecov.io/bash) -x $GCOV -p src/bm_sim; fi