Skip to content

Commit f6580bb

Browse files
committed
ci: Add test run with odp-dpdk
Compile and test also with odp-dpdk. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
1 parent cf466c0 commit f6580bb

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on: [push, pull_request]
44
env:
55
ARCH: x86_64
66
CC: gcc
7+
CONTAINER_NAMESPACE: ghcr.io/opendataplane/odp-docker-images
8+
OS: ubuntu_18.04
79

810
jobs:
911
Checkpatch:
@@ -56,3 +58,19 @@ jobs:
5658
- name: Failure log
5759
if: ${{ failure() }}
5860
run: find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
61+
62+
Run_dpdk:
63+
runs-on: ubuntu-18.04
64+
env:
65+
OS: ubuntu_20.04
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
cc: [gcc, clang]
70+
steps:
71+
- uses: actions/checkout@v2
72+
- run: sudo docker run -i -v `pwd`:/ofp --privileged --shm-size 8g -e CC="${{matrix.cc}}" -e ARCH="${ARCH}"
73+
-e CXX=g++-10 $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-dpdk_20.11 /bin/bash -c "apt-get update && apt install g++-10 && /ofp/scripts/check-dpdk.sh"
74+
- name: Failure log
75+
if: ${{ failure() }}
76+
run: find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done

scripts/check-dpdk.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash -xe
2+
3+
JOBS=${JOBS:-$(nproc)}
4+
5+
if [ "${CC#clang}" != "${CC}" ] ; then
6+
export CXX="clang++"
7+
fi
8+
9+
cd $(readlink -e $(dirname $0))/..
10+
11+
# Configure hugepages
12+
sysctl vm.nr_hugepages=1000
13+
mkdir -p /mnt/huge
14+
mount -t hugetlbfs nodev /mnt/huge
15+
16+
# Build ODP
17+
git clone https://github.com/OpenDataPlane/odp-dpdk --branch v1.35.0.0_DPDK_19.11 --depth 1
18+
pushd odp-dpdk
19+
./bootstrap
20+
./configure --prefix=$(pwd)/install --enable-deprecated --without-tests --without-examples
21+
make -j${JOBS} install
22+
popd
23+
24+
# Build OFP
25+
./bootstrap
26+
./configure --with-odp-lib=odp-dpdk --with-odp=$(pwd)/odp-dpdk/install --prefix=$(pwd)/install --enable-cunit
27+
make -j${JOBS} install
28+
29+
# Test OFP
30+
make check

0 commit comments

Comments
 (0)