-
Notifications
You must be signed in to change notification settings - Fork 321
77 lines (70 loc) · 2.6 KB
/
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
name: C/C++ CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
env:
CXXFLAGS: -std=gnu++11
FLAGS: --enable-all-elements
#Until we find a solution for the world-writable /home/runner in GitHub Actions...
NODPDKTEST: 1
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
COMPILER: [gcc, clang]
FRAMEWORK: [vanilla, dpdk, netmap]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: framework
run: |
if [ "${{matrix.FRAMEWORK}}" = "dpdk" ] ; then
echo "Compiling DPDK..." ;
export STABLE=
export VERSION=20.11
export FRAMEWORK_FLAGS="--enable-dpdk -enable-user-multithread";
export PKG_CONFIG_PATH=$(pwd)/dpdk-$STABLE$VERSION/install/lib/x86_64-linux-gnu/pkgconfig/ ;
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/dpdk-$STABLE$VERSION/install/lib/x86_64-linux-gnu/ ;
if [ ! -e "dpdk-$STABLE$VERSION" ] || ! pkg-config --exists libdpdk ; then
wget http://fast.dpdk.org/rel/dpdk-$VERSION.tar.gz &&
tar -zxf dpdk-$VERSION.tar.gz &&
cd dpdk-$STABLE$VERSION &&
pip3 install meson ninja &&
meson -Dprefix=$(pwd)/install/ build &&
cd build &&
ninja &&
ninja install &&
cd .. &&
cd .. ;
fi
if [ "${{matrix.FRAMEWORK}}" = "netmap" ] ; then
if [ ! -e "netmap-13.0" ] ; then
wget https://github.com/luigirizzo/netmap/archive/refs/tags/v13.0.tar.gz
tar -zxf v13.0.tar.gz
fi
FRAMEWORK_FLAGS="--with-netmap=$(pwd)/netmap-13.0/sys/"
fi
echo "FRAMEWORK_FLAGS=$FRAMEWORK_FLAGS" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
fi
- name: configure
run: |
if [ "${{matrix.COMPILER}}" = "clang" ] ; then export CC=clang; export CXX=clang++; fi
./configure $FLAGS $FRAMEWORK_FLAGS
- name: make
run: make
#Simple launch avoids going further if something very bad happens
- name: simple_launch
run: chmod 700 /home/runner ; ./userlevel/click -j 2 -e 'DriverManager(stop);'
- name: make check
run: make check