forked from sipcapture/captagent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (41 loc) · 1.22 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
matrix:
include:
# Plain Agent
- os: linux
env:
- CONFIGURE=""
# TLS Agent
- os: linux
env:
- CONFIGURE="--enable-tls --enable-ssl"
# SSL Agent
- os: linux
env:
- CONFIGURE="--enable-ssl"
language: c
addons:
apt:
packages:
- net-tools
compiler:
- gcc
before_install:
# - sudo -E apt-add-repository -y ppa:linuxjedi/ppa
- sudo apt-get update || true
- sudo apt-get install -y build-essential
- sudo apt-get install -y libpcap-dev libexpat-dev libjson0-dev bison flex libtool autoconf automake autogen libuv-dev libssl-dev libgcrypt20 libgcrypt20-dev
- ip -o -4 a | awk '$2 == "eth0" { gsub(/\/.*/, "", $4); print $4 }' > /tmp/pubip
- ip -o -4 a | awk '$2 == "lo" { gsub(/\/.*/, "", $4); print $4 }' > /tmp/localip
install:
- curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
- sudo apt-get install -y nodejs
- sudo npm i -g npm
script:
- sudo sed -i 's/any/lo/g' ./conf/socket_pcap.xml
- ./build.sh
- ./configure ${CONFIGURE}
- make
- sudo make install
- sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' ./src/captagent || echo "Setcap failed"
- ./src/captagent -v
- cd test && npm install && sudo -s npm test