forked from seladb/PcapPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (81 loc) · 2.75 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
sudo: required
language: cpp
services:
- docker
matrix:
include:
- os: linux
env:
- DOCKER_IMAGE=ubuntu1404
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604
- os: linux
env:
- DOCKER_IMAGE=centos7
- os: linux
env:
- DOCKER_IMAGE=fedora26
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1611
- DPDK_DIR=dpdk-stable-16.11.1
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1702
- DPDK_DIR=dpdk-17.02
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-pfring
- PF_RING=True
- os: osx
compiler: clang
osx_image: xcode6.4
- os: osx
compiler: clang
osx_image: xcode7.3
- os: osx
compiler: clang
osx_image: xcode8
- os: osx
compiler: clang
osx_image: xcode8.1
- os: osx
compiler: clang
osx_image: xcode8.2
- os: osx
compiler: clang
osx_image: xcode8.3
- os: osx
compiler: clang
osx_image: xcode9
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker pull seladb/$DOCKER_IMAGE:latest;
docker run -itd --name $DOCKER_IMAGE -v $(pwd):/PcapPlusPlus seladb/$DOCKER_IMAGE;
fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./configure-mac_os_x.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && ./configure-linux.sh --default"; fi
- if [[ ! -z $DPDK_DIR ]]; then docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && ./configure-linux.sh --dpdk --dpdk-home /$DPDK_DIR"; fi
- if [[ ! -z $PF_RING ]]; then docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && ./configure-linux.sh --pf-ring --pf-ring-home /PF_RING"; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make all;
cd Tests/Packet++Test && Bin/Packet++Test;
cd ../Pcap++Test && sudo Bin/Pcap++Test -n;
cd ../../ && sudo make install;
else
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && make all";
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus/Tests/Packet++Test && Bin/Packet++Test";
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus/Tests/Pcap++Test && Bin/Pcap++Test -n -k 0";
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && make install";
fi
after_success:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd Examples/Tutorials/Tutorial-HelloWorld/;
make -f Makefile.non_windows all;
./Tutorial-HelloWorld;
else
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus/Examples/Tutorials/Tutorial-HelloWorld/ && make -f Makefile.non_windows all && ./Tutorial-HelloWorld";
fi