forked from NetSys/bess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (84 loc) · 4.21 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
85
86
87
88
89
90
91
92
93
94
95
96
sudo: required
dist: trusty
language: cpp
services:
- docker
branches:
only:
- master
- /travis.*/
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
env:
global:
- ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-3.8/bin/llvm-symbolizer
- ASAN_OPTIONS=log_path=/tmp/sanitizer,log_exe_name=1
- LSAN_OPTIONS=suppressions=$TRAVIS_BUILD_DIR/core/lsan.suppress
- UBSAN_OPTIONS=suppressions=$TRAVIS_BUILD_DIR/core/ubsan.suppress,print_stacktrace=1
- GCOV_PREFIX_STRIP=2 # /build/bess in the container
- GCOV_PREFIX=$TRAVIS_BUILD_DIR # /build/bess/core/xx becomes $TRAVIS_BUILD_DIR/core/xx
matrix:
- VER_CXX=clang++-3.8 SANITIZE=1
- VER_CXX=g++-5
- VER_CXX=g++-5 DEBUG=1
- VER_CXX=g++-5 TAG_SUFFIX=_32 # 32bit build
- VER_CXX=g++-6
- VER_CXX=g++-7
before_install:
# Reserve hugepages as early as possible, to avoid fragmentation
- sudo sysctl -w vm.nr_hugepages=512
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -q update
install:
# note that if you are building a slightly different dpdk you will
# want to avoid the "ln -s /build/dpdk-17.05 deps" step below
- sudo apt-get install -y python2.7 python3 python3-pip ruby-dev
- sudo gem install ffi fpm
- pip2 install grpcio scapy codecov
- pip3 install grpcio scapy-python3 coverage
- "[[ ${DEBUG:-0} == 0 ]] || sudo apt-get install -y g++-5" # install gcov-5
- "[[ ${SANITIZE:-0} == 0 ]] || sudo apt-get install -y llvm-3.8"
- "[[ $TAG_SUFFIX != _32 ]] || sudo apt-get install -y lib32gcc1"
- ln -s /build/dpdk-17.05 deps
- "docker pull nefelinetworks/bess_build:latest${TAG_SUFFIX} | cat" # cat suppresses progress bars
before_script:
- sudo mkdir -p /mnt/huge
- sudo mount -t hugetlbfs nodev /mnt/huge
- export CXX=$VER_CXX
- export CC=$VER_CC
script:
- ./container_build.py bess
- ./container_build.py kmod_buildtest
- (cd core && ./all_test --gtest_shuffle) # TcpFlowReconstructTest requires working directory to be `core/`
- coverage2 run -m unittest discover -v
- "[[ ${DEBUG:-0} == 0 ]] || coverage3 run -m unittest discover -v"
- python2 bessctl/bessctl -- daemon start -- run testing/run_module_tests
- "[[ ${DEBUG:-0} == 0 ]] || python3 bessctl/bessctl -- daemon start -- run testing/run_module_tests"
after_success:
- bessctl/bessctl daemon stop # flush out the coverage data
- "[[ ${DEBUG:-0} == 0 ]] || { sleep 3; codecov --gcov-exec gcov-5; }"
after_failure:
- more /tmp/bessd.*.INFO.* | cat # dump all bessd log files
- more /tmp/sanitizer* | cat # dump all sanitizer results
before_deploy:
- for arch in core2 sandybridge haswell; do
export CXXARCHFLAGS="-march=$arch";
./container_build.py clean;
./container_build.py bess;
find . -name '*.pyc' -delete;
(cd .. && tar zcf bess/bess-$arch-linux.tar.gz bess/bessctl/* bess/bin/* bess/pybess/* bess/core/kmod/* bess/core/snbuf_layout.h bess/core/bessd bess/core/modules/*.so);
fpm -s tar -t deb -v ${TRAVIS_TAG#v} -n bess -d python -d python-pip -d python-scapy -d libgraph-easy-perl -m "[email protected]" --url "https://github.com/NetSys/bess" --prefix "/usr/local/" --after-install=env/after_install.sh --before-remove=env/before_remove.sh -p bess-$arch-linux.deb bess-$arch-linux.tar.gz;
done
deploy:
provider: releases
api_key:
secure: NVoPKxyZTa9K5shhh67uQ9/spds24VexpKSE5U5X79cyBhNXdIRcxBAxvyZ6s6cQGRyWoVmC8FLin3BeUeKga5SEqSbSNed42Tazw7lRQt08ni1WYpirx5Qb9bE3M2vb5FuxO5kbaUsns2o0q7cE/+HCGcHK5UbKrEEG6mZxwPwNEiwEwqHBf9nECuUE1gZXUK4KiVn/NNDK6bX1pg3jeHh5yNK1yCBeBvIJbtTlKTZRZ1Xd8mTz/PpLXTiSD7d3gDNF2UwIg8HQAtQ9b9I2K5s41pM47ejtBGf7kOUbVRBx0iuEHKOpBKRp9kFWoePryL65wT4Pthr47FSPhR9KKHWpbTIJbUwJiWdUrImCZmnwmFZURLmXB/xKWDCLYr3d51jnxOHUv8ATOKN7DhjvaZwTbQSNed7CBNfNa3hgAj60limki/fzRzyM4wMgDA1ihR9Ohcvnf9VArmz7fFi3EKvZ47eXnM6EgTWd8Jl8U09Rzd7C9LkgYq+8eaqGSKN57RR0ptCkI9rqgBQw5RbQuwGVkCAsTDbQ9yqI/2Qt5FcRceUtNFG+rc5uejY2a0ba0qR9kANWdk09qrd5XxQ3hiJbw5J+ThTW0gV9xWqn8Emz0tHr6UUH8cXNAruiQ/Rtxu7XjGnkulLa60Wdv7JTulky3yA46SN4Jmkmilo38MU=
file:
- bess-core2-linux.tar.gz
- bess-sandybridge-linux.tar.gz
- bess-haswell-linux.tar.gz
skip_cleanup: true
on:
tags: true
condition: "$VER_CXX = g++-6"
notifications:
slack: nefeli:x5udJ7nDIKjCaCrRYprGc4mw