-
Notifications
You must be signed in to change notification settings - Fork 82
/
.gitlab-ci.yml
105 lines (96 loc) · 4.44 KB
/
.gitlab-ci.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
103
104
105
default:
image: ubuntu:22.04
tags:
- docker
stages:
- normal
- user
- io
variables:
CONFIG: "--enable-all-elements --disable-verbose-batch --enable-simtime"
.common:
stage: user
parallel:
matrix:
- HOST: ["x86_64","aarch64"]
normal:
extends: .common
stage: normal
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" $CONFIG --disable-verbose-batch && make
batch:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-batch $CONFIG --disable-verbose-batch && make && make check
autobatch:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-batch $CONFIG --disable-verbose-batch --enable-auto-batch=port && make && make check
ip6:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-ip6 --enable-json $CONFIG --disable-batch && make && make check
mt:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG --disable-batch && make && make check
noclone:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG --disable-clone && make && make check
fbatch:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread --enable-flow --enable-batch $CONFIG --disable-verbose-batch && make
dpdk:
stage: io
parallel:
matrix:
- DPDK_VERSION: ["20.11", "23.03"]
DPDK_CONFIG: ["--enable-dpdk-packet --enable-batch", "--enable-batch", "--disable-batch", "--enable-dpdk-pool"]
before_script:
- echo "Running global pre-install..."
- !reference [before_script]
- echo "Running local pre-install..."
- mkdir /dpdk
- pushd /dpdk
- export RTE_SDK=`pwd`/dpdk-$DPDK_VERSION;
export RTE_TARGET=x86_64-native-linuxapp-gcc;
export PKG_CONFIG_PATH=${RTE_SDK}/install/lib/x86_64-linux-gnu/pkgconfig/;
export LD_LIBRARY_PATH=${RTE_SDK}/install/lib/x86_64-linux-gnu/:${RTE_SDK}/install/lib/:$LD_LIBRARY_PATH;
if [ ! -e "$RTE_SDK/$RTE_TARGET/include/rte_version.h" ]; then
wget http://dpdk.org/browse/dpdk/snapshot/dpdk-$DPDK_VERSION.tar.gz &&
tar -zxf dpdk-$DPDK_VERSION.tar.gz &&
cd dpdk-$DPDK_VERSION ;
pip3 install meson ninja &&
meson -Dprefix=$(pwd)/install/ -Dmachine=default build &&
cd build && ( ninja && ninja install ) ; cd .. ; cd .. ;
fi;
ldconfig
- popd
script:
- ls $PKG_CONFIG_PATH
- echo $LD_LIBRARY_PATH
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread --without-netmap --enable-dpdk ${DPDK_CONFIG} $CONFIG RTE_SDK=$RTE_SDK RTE_TARGET=$RTE_TARGET && make
- if [[ "$DPDK_CONFIG" != *"--enable-dpdk-pool"* ]] && [[ "$DPDK_CONFIG" != *"--enable-dpdk-packet"* ]] ; then make check ; fi
netmap:
stage: io
parallel:
matrix:
- NETMAP_VERSION: ["11.1"]
CONFIG_NETMAP_MODE: ["--enable-netmap-pool --enable-zerocopy","--disable-netmap-pool --enable-zerocopy","--disable-netmap-pool --disable-zerocopy","--enable-flow --enable-batch --enable-netmap-pool --enable-zerocopy"]
script:
- if [ ! -e "netmap-$NETMAP_VERSION/sys/net/netmap.h" ] ; then wget https://github.com/luigirizzo/netmap/archive/v$NETMAP_VERSION.tar.gz && tar -xvf v$NETMAP_VERSION.tar.gz && ( cd netmap-$NETMAP_VERSION && cd LINUX && ./configure --no-drivers ; cd .. && cd .. ) ; fi
- ls -al
- if [ `sudo -n whoami` = "root" ] && command -v insmod ; then sudo insmod netmap-$NETMAP_VERSION/LINUX/netmap.ko && sudo chmod 666 /dev/netmap ; fi
- export CONFIG_NETMAP="--with-netmap=`pwd`/netmap-$NETMAP_VERSION/sys/"
- ./configure CXXFLAGS="-std=gnu++11" $CONFIG_NETMAP_MODE $CONFIG_NETMAP $CONFIG --disable-verbose-batch && make
cache:
paths:
- /dpdk
- netmap-$NETMAP_VERSION
before_script:
- DEBIAN_FRONTEND=noninteractive sh deps.sh
- gcc -v
- if [ "$HOST" = "x86_64" ] ; then export CONFIG_HOST="--build x86_64-native-linuxapp-gcc" ; fi
- if [ "$HOST" = "aarch64" ] ; then apt-get -yqq install gcc-aarch64-linux-gnu && export CONFIG_HOST="--build aarch64-linux-gnu" ; fi