From f6580bb675386b0599390daaabbb0a06c1c1be0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jere=20Lepp=C3=A4nen?= Date: Tue, 9 Aug 2022 19:46:15 +0300 Subject: [PATCH] ci: Add test run with odp-dpdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compile and test also with odp-dpdk. Signed-off-by: Jere Leppänen Reviewed-by: Tuomas Taipale --- .github/workflows/ci-pipeline.yml | 18 ++++++++++++++++++ scripts/check-dpdk.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 scripts/check-dpdk.sh diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index f53e1d0b..cfdc46b2 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -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: @@ -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 diff --git a/scripts/check-dpdk.sh b/scripts/check-dpdk.sh new file mode 100755 index 00000000..1d56bb61 --- /dev/null +++ b/scripts/check-dpdk.sh @@ -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