forked from seladb/PcapPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (96 loc) · 3.19 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
102
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=ubuntu1804
- os: linux
env:
- DOCKER_IMAGE=centos7
- os: linux
env:
- DOCKER_IMAGE=fedora29
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1611
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1711
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1811
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1902
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-dpdk1908
- os: linux
env:
- DOCKER_IMAGE=ubuntu1604-pfring
- PF_RING=True
- os: osx
compiler: clang
osx_image: xcode7.3
- os: osx
compiler: clang
osx_image: xcode8.3
- os: osx
compiler: clang
osx_image: xcode9.2
- os: osx
compiler: clang
osx_image: xcode9.4
- os: osx
compiler: clang
osx_image: xcode10.1
- os: osx
compiler: clang
osx_image: xcode10.3
- os: osx
compiler: clang
osx_image: xcode11
- os: osx
compiler: clang
osx_image: xcode11.2
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 [[ $DOCKER_IMAGE == *"dpdk"* ]]; then docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && ./configure-linux.sh --dpdk --dpdk-home /dpdk"; 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:
- ERR_CODE=0
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make all || ERR_CODE=$?;
cd Tests/Packet++Test && Bin/Packet++Test || ERR_CODE=$?;
cd ../Pcap++Test && sudo Bin/Pcap++Test -n || ERR_CODE=$?;
cd ../../ && sudo make install || ERR_CODE=$?;
else
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && make all" || ERR_CODE=$?;
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus/Tests/Packet++Test && Bin/Packet++Test" || ERR_CODE=$?;
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus/Tests/Pcap++Test && Bin/Pcap++Test -n -k 0" || ERR_CODE=$?;
docker exec -i $DOCKER_IMAGE bash -c "cd PcapPlusPlus && make install" || ERR_CODE=$?;
fi
- (exit $ERR_CODE)
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