Skip to content

Commit

Permalink
ci: Add test run with odp-dpdk
Browse files Browse the repository at this point in the history
Compile and test also with odp-dpdk.

Signed-off-by: Jere Leppänen <[email protected]>
Reviewed-by: Tuomas Taipale <[email protected]>
  • Loading branch information
JereLeppanen committed Aug 16, 2022
1 parent cf466c0 commit f6580bb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on: [push, pull_request]
env:
ARCH: x86_64
CC: gcc
CONTAINER_NAMESPACE: ghcr.io/opendataplane/odp-docker-images
OS: ubuntu_18.04

jobs:
Checkpatch:
Expand Down Expand Up @@ -56,3 +58,19 @@ jobs:
- name: Failure log
if: ${{ failure() }}
run: find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done

Run_dpdk:
runs-on: ubuntu-18.04
env:
OS: ubuntu_20.04
strategy:
fail-fast: false
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v2
- run: sudo docker run -i -v `pwd`:/ofp --privileged --shm-size 8g -e CC="${{matrix.cc}}" -e ARCH="${ARCH}"
-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"
- name: Failure log
if: ${{ failure() }}
run: find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
30 changes: 30 additions & 0 deletions scripts/check-dpdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -xe

JOBS=${JOBS:-$(nproc)}

if [ "${CC#clang}" != "${CC}" ] ; then
export CXX="clang++"
fi

cd $(readlink -e $(dirname $0))/..

# Configure hugepages
sysctl vm.nr_hugepages=1000
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge

# Build ODP
git clone https://github.com/OpenDataPlane/odp-dpdk --branch v1.35.0.0_DPDK_19.11 --depth 1
pushd odp-dpdk
./bootstrap
./configure --prefix=$(pwd)/install --enable-deprecated --without-tests --without-examples
make -j${JOBS} install
popd

# Build OFP
./bootstrap
./configure --with-odp-lib=odp-dpdk --with-odp=$(pwd)/odp-dpdk/install --prefix=$(pwd)/install --enable-cunit
make -j${JOBS} install

# Test OFP
make check

0 comments on commit f6580bb

Please sign in to comment.