forked from NetSys/bess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
101 lines (87 loc) · 4.24 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
97
98
99
100
101
sudo: required
dist: xenial
language: cpp
cache:
- ccache
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
- FIFO_TEST_TIMEOUT=200 # milliseconds per loop - vs default of 20
matrix:
- VER_CXX=clang++-6.0 SANITIZE=1
- VER_CXX=g++-7 COVERAGE=1
- VER_CXX=g++-7
- VER_CXX=g++-8
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.11 deps" step below
- sudo apt-get install -y python2.7 python3 python3-pip python3-setuptools ruby-dev
- sudo gem install ffi fpm
- pip2 install --user grpcio==1.10 scapy codecov
- pip3 install --user grpcio==1.10 scapy coverage
- "[[ ${COVERAGE:-0} == 0 ]] || sudo apt-get install -y gcc-7" # install gcov-7
- "[[ ${SANITIZE:-0} == 0 ]] || sudo apt-get install -y llvm-3.8"
- ln -s /build/dpdk-17.11 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="ccache $VER_CXX"
- ccache -s
script:
# travis_wait extends the 10-min timeout to 20mins.
- travis_wait ./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
- "[[ ${COVERAGE:-0} == 0 ]] || coverage3 run -m unittest discover -v"
- python2 bessctl/run_module_tests.py
- "[[ ${COVERAGE:-0} == 0 ]] || python3 bessctl/run_module_tests.py"
after_success:
- bessctl/bessctl daemon stop # flush out the coverage data
- "[[ ${COVERAGE:-0} == 0 ]] || { sleep 3; codecov --gcov-exec gcov-7; }"
after_failure:
- more /tmp/bessd.*.INFO.* | cat # dump all bessd log files
- sudo more /tmp/sanitizer* | cat # dump all sanitizer results
after_script:
- ccache -s
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 "bess@nefeli.io" --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++-7"
notifications:
slack: nefeli:x5udJ7nDIKjCaCrRYprGc4mw