@@ -20,16 +20,7 @@ stages:
- "build only"
- test
-addons:
- apt:
- packages:
- - gcc
- - clang-3.8
- - automake autoconf libtool libssl-dev graphviz mscgen
- - libconfig-dev
- - codespell
- - libpcap-dev
- - libnuma-dev
+#addons:
# coverity_scan:
# project:
# name: "$TRAVIS_REPO_SLUG"
@@ -42,9 +33,7 @@ cache:
ccache: true
pip: true
directories:
- - dpdk
- netmap
- - $HOME/cunit-install
- $HOME/doxygen-install
env:
@@ -54,10 +43,17 @@ env:
# for individual commit validation. But you you want to track tests history
# you need generated new one at https://codecov.io specific for your repo.
- CODECOV_TOKEN=a733c34c-5f5c-4ff1-af4b-e9f5edb1ab5e
- - DPDK_VERS="17.11.3"
matrix:
- CONF=""
- CONF="--disable-abi-compat"
+ - CROSS_ARCH="arm64"
+ - CROSS_ARCH="armhf"
+ - CROSS_ARCH="powerpc"
+ - CROSS_ARCH="i386"
+ - CROSS_ARCH="arm64" CONF="--disable-abi-compat"
+ - CROSS_ARCH="armhf" CONF="--disable-abi-compat"
+ - CROSS_ARCH="powerpc" CONF="--disable-abi-compat"
+ - CROSS_ARCH="i386" CONF="--disable-abi-compat"
- CONF="--enable-deprecated"
- CONF="--enable-dpdk-zero-copy --disable-static-applications"
- CONF="--disable-static-applications"
@@ -65,7 +61,6 @@ env:
- CONF="--disable-host-optimization --disable-abi-compat"
- CONF="--enable-pcapng-support"
- CONF="--without-openssl"
- - DPDK_SHARED="y" CONF="--disable-static-applications"
compiler:
- gcc
@@ -75,12 +70,11 @@ install:
- sudo apt-get install linux-headers-`uname -r`
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- - if [ "${CC#clang}" != "${CC}" ] ; then LD="" CXX=clang++; fi
- if [ -n "${CROSS_ARCH}" ] ; then
docker run -i -t -v `pwd`:/odp
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
- -e CONF="${CONF}" -e DPDK_SHARED="${DPDK_SHARED}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_14.04.05 /odp/scripts/ci/build_${CROSS_ARCH}.sh ;
+ -e CC="${CC}"
+ -e CONF="${CONF}"
+ ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_${CROSS_ARCH}.sh ;
else
echo "compilling netmap";
CDIR=`pwd` ;
@@ -94,9 +88,9 @@ script:
echo "Running test" ;
docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
- -e CONF="${CONF}" -e DPDK_SHARED="${DPDK_SHARED}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-x86 /odp/scripts/ci/build_x86_64.sh ;
+ -e CC="${CC}"
+ -e CONF="${CONF}"
+ ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_x86_64.sh ;
fi
jobs:
include:
@@ -108,9 +102,9 @@ jobs:
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
-e CODECOV_TOKEN="${CODECOV_TOKEN}"
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
+ -e CC="${CC}"
-e CONF="${CONF}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-x86 /odp/scripts/ci/coverage.sh
+ ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/coverage.sh
- stage: test
env: TEST=distcheck
compiler: gcc
@@ -118,12 +112,18 @@ jobs:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run --privileged -i -t
-v `pwd`:/odp --shm-size 8g
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
+ -e CC="${CC}"
-e CONF="${CONF}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-x86 /odp/scripts/ci/distcheck.sh
+ ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/distcheck.sh
- stage: "build only"
env: TEST=doxygen
compiler: gcc
+ addons:
+ apt:
+ packages:
+ - libconfig-dev
+ - libssl-dev
+ - cmake
install:
# Updated Doxygen
- |
@@ -150,87 +150,12 @@ jobs:
true
fi
- stage: "build only"
- env: Ubuntu14.04_arm64
+ env: Ubuntu16.04_arm64
script:
- if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- docker run -i -t -v `pwd`:/odp
- ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_14.04.05 /odp/scripts/ci/build_arm64.sh
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="arm64"
- - stage: test
- compiler: clang
- env: CROSS_ARCH="arm64"
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="armhf" CFLAGS="-march=armv7-a"
- - stage: test
- compiler: clang
- env: CROSS_ARCH="armhf" CFLAGS="-march=armv7-a"
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="powerpc"
- - stage: test
- compiler: clang
- env: CROSS_ARCH="powerpc"
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="i386"
- script:
- - if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- - docker run --privileged -i -t
- -v `pwd`:/odp
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
- -e CONF="${CONF}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_14.04.05_i386 /odp/scripts/ci/build_${CROSS_ARCH}.sh ;
- - stage: test
- compiler: clang
- env: CROSS_ARCH="i386"
- script:
- - if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- - docker run --privileged -i -t
- -v `pwd`:/odp
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
- -e CONF="${CONF}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_14.04.05_i386 /odp/scripts/ci/build_${CROSS_ARCH}.sh ;
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="arm64" CONF="--disable-abi-compat"
- - stage: test
- compiler: clang
- env: CROSS_ARCH="arm64" CONF="--disable-abi-compat"
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" CONF="--disable-abi-compat"
- - stage: test
- compiler: clang
- env: CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" CONF="--disable-abi-compat"
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="powerpc" CONF="--disable-abi-compat"
- - stage: test
- compiler: clang
- env: CROSS_ARCH="powerpc" CONF="--disable-abi-compat"
- - stage: test
- compiler: gcc
- env: CROSS_ARCH="i386" CONF="--disable-abi-compat"
- script:
- - if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- - docker run --privileged -i -t
- -v `pwd`:/odp
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
- -e CONF="${CONF}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_14.04.05_i386 /odp/scripts/ci/build_${CROSS_ARCH}.sh ;
- - stage: test
- compiler: clang
- env: CROSS_ARCH="i386" CONF="--disable-abi-compat"
- script:
- - if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
- - docker run --privileged -i -t
- -v `pwd`:/odp
- -e CC="${CC}" -e LD="${LD}" -e CXX="${CXX}"
- -e CONF="${CONF}"
- ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_14.04.05_i386 /odp/scripts/ci/build_${CROSS_ARCH}.sh ;
+ -e CC="${CC}"
+ ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/build_arm64.sh
- stage: test
canfail: yes
env: TEST=checkpatch
@@ -1,45 +1,21 @@
#!/bin/bash
set -e
+TARGET_ARCH=aarch64-linux-gnu
if [ "${CC#clang}" != "${CC}" ] ; then
- export CC="clang --target=aarch64-linux-gnu"
- export LD="clang --target=aarch64-linux-gnu"
- export CXX="clang++ --target=aarch64-linux-gnu"
+ export CC="clang --target=${TARGET_ARCH}"
+ export CXX="clang++ --target=${TARGET_ARCH}"
else
- export CC="aarch64-linux-gnu-gcc"
- export LD="aarch64-linux-gnu-ld"
- export AR="aarch64-linux-gnu-ar"
- export CXX="aarch64-linux-gnu-g++"
+ export CC="${TARGET_ARCH}-gcc"
+ export CXX="${TARGET_ARCH}-g++"
fi
+export CPPFLAGS="-I/usr/include/${TARGET_ARCH}/dpdk"
-export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/aarch64-linux-gnu/pkgconfig
-export PKG_CONFIG_PATH="$HOME/cunit-install/aarch64/lib/pkgconfig:${PKG_CONFIG_PATH}"
-
-CWD=$(dirname "$0")
-TDIR=`mktemp -d -p ~`
-
-cd ${TDIR}
-
-export CROSS_ARCH=arm64
-export DPDK_CROSS=aarch64-linux-gnu-
-export TARGET="arm64$DPDKCC"
-
-dpkg -i --force-depends ~/download/libpcap0.8-dev_1.5.3-2_arm64.deb
-
-git clone ${CWD}/../../ odp
-cd ./odp
-./scripts/ci/build_dpdk.sh
-DPDKPATH=`cat /tmp/dpdk_install_dir`
-
+cd "$(dirname "$0")"/../..
./bootstrap
-./configure --host=aarch64-linux-gnu --build=x86_64-linux-gnu --with-dpdk-path=${DPDKPATH} \
- --disable-test-cpp ${CONF}
-make clean
-make -j 8
+./configure \
+ --host=${TARGET_ARCH} --build=x86_64-linux-gnu \
+ --enable-dpdk \
+ ${CONF}
-if [ $? -ne 0 ]; then
- find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
-fi
-
-cd ~
-rm -rf ${TDIR}
+make -j 8
@@ -1,47 +1,23 @@
#!/bin/bash
set -e
+TARGET_ARCH=arm-linux-gnueabihf
if [ "${CC#clang}" != "${CC}" ] ; then
- export CC="clang --target=arm-linux-gnueabihf"
- export LD="clang --target=arm-linux-gnueabihf"
- export CXX="clang++ --target=arm-linux-gnueabihf"
- export CFLAGS="-march=armv7-a"
+ export CC="clang --target=${TARGET_ARCH}"
+ export CXX="clang++ --target=${TARGET_ARCH}"
else
- export CC="arm-linux-gnueabihf-gcc"
- export LD="arm-linux-gnueabihf-ld"
- export AR="arm-linux-gnueabihf-ar"
- export CXX="arm-linux-gnueabihf-g++"
+ export CC="${TARGET_ARCH}-gcc"
+ export CXX="${TARGET_ARCH}-g++"
fi
+export CPPFLAGS="-I/usr/include/${TARGET_ARCH}/dpdk"
+export CFLAGS="-march=armv7-a"
+export CXXFLAGS="-march=armv7-a"
-export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/arm-linux-gnueabihf/pkgconfig
-export PKG_CONFIG_PATH="$HOME/cunit-install/armhf/lib/pkgconfig:${PKG_CONFIG_PATH}"
-
-CWD=$(dirname "$0")
-TDIR=`mktemp -d -p ~`
-
-cd ${TDIR}
-
-git clone ${CWD}/../../ odp
-
-dpkg -i --force-depends ~/download/libpcap0.8-dev_1.5.3-2_armhf.deb
-
-cd ./odp
-#export CROSS_ARCH="armhf"
-#export DPDK_CROSS=arm-linux-gnueabihf
-#export TARGET="arm-linux-gnueabihf$DPDKCC"
-#export TARGET="arm-linux-gnueabihf"
-#./scripts/ci/build_dpdk.sh
-#DPDKPATH=`cat /tmp/dpdk_install_dir`
-
+cd "$(dirname "$0")"/../..
./bootstrap
-./configure --host=arm-linux-gnueabihf --build=x86_64-linux-gnu \
- --disable-test-cpp ${CONF}
-make clean
-make -j 8
+./configure \
+ --host=${TARGET_ARCH} --build=x86_64-linux-gnu \
+ --enable-dpdk \
+ ${CONF}
-if [ $? -ne 0 ]; then
- find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
-fi
-
-cd ~
-rm -rf ${TDIR}
+make -j 8
deleted file mode 100755
@@ -1,88 +0,0 @@
-#!/bin/bash -x
-
-set -e
-
-DPDK_VERS="17.11.2"
-CROSS=
-
-
-case "$CROSS_ARCH" in
- "arm64")
- DPDK_TARGET="arm64-armv8a-linuxapp-"
- ;;
- "armhf")
- DPDK_TARGET="arm-armv7a-linuxapp-"
- ;;
- "i386")
- DPDK_TARGET="i686-native-linuxapp-"
- ;;
- "")
- DPDK_TARGET="x86_64-native-linuxapp-"
- DPDK_MACHINE=snb
- ;;
-esac
-
-
-if [ -n "$DPDK_TARGET" ] ; then
- if [ "${CC#clang}" != "${CC}" ] ; then
- DPDKCC=clang ;
- else
- DPDKCC=gcc ;
- fi
- if [ -n "$DPDK_SHARED" ] ; then
- TARGET="${DPDK_TARGET}$DPDKCC"-shared
- LIBDPDKEXT=so
- export LD_LIBRARY_PATH="`pwd`/${TARGET}:$LD_LIBRARY_PATH"
- echo $LD_LIBRARY_PATH
- else
- TARGET="${DPDK_TARGET}$DPDKCC"
- LIBDPDKEXT=a
- fi
- DPDK_TARGET="${DPDK_TARGET}gcc"
- CACHED_DPDK_VERS=`fgrep Version dpdk/pkg/dpdk.spec | cut -d " " -f 2`
- if [ ! -d dpdk -o "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then
- rm -rf dpdk
- mkdir dpdk
- pushd dpdk
- git init
- git -c advice.detachedHead=false fetch -q --depth=1 http://dpdk.org/git/dpdk-stable v${DPDK_VERS}
- git checkout -f FETCH_HEAD
- popd
- fi
- if [ ! -f "dpdk/${TARGET}/usr/local/lib/libdpdk.$LIBDPDKEXT" ]; then
- pushd dpdk
- git log --oneline --decorate
- # AArch64 && ARMv7 fixup
- sed -i -e 's/40900/40800/g' lib/librte_eal/common/include/arch/arm/rte_vect.h
- sed -i -e 's/!(/!(defined(__arm__) \&\& defined(__clang__) || /g' lib/librte_eal/common/include/arch/arm/rte_byteorder.h
- sed -i -e 's/__GNUC__/defined(__arm__) \&\& defined(__clang__) || __GNUC__/' lib/librte_eal/common/include/generic/rte_byteorder.h
- sed -i -e 's,\$(CC),\0 $(EXTRA_CFLAGS),g' lib/librte_acl/Makefile
- make config T=${DPDK_TARGET} O=${TARGET}
- pushd ${TARGET}
- sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
- # OCTEON TX driver includes ARM v8.1 instructions
- sed -ri 's,(CONFIG_RTE_LIBRTE_OCTEONTX_PMD=).*,\1n,' .config
- sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=).*,\1n,' .config
- sed -ri 's,(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=).*,\1n,' .config
- if test -n "${DPDK_MACHINE}" ; then
- sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"'${DPDK_MACHINE}'",' .config
- fi
- if test -n "${DPDK_SHARED}" ; then
- sed -ri 's,(CONFIG_RTE_BUILD_SHARED_LIB=).*,\1y,' .config
- fi
- if test -n "$CROSS_ARCH" ; then
- sed -ri -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1n,' .config
- sed -ri -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1n,' .config
- fi
- sed -ri -e 's,(CONFIG_RTE_TOOLCHAIN=).*,\1"'${DPDKCC}'",' .config
- sed -ri -e '/CONFIG_RTE_TOOLCHAIN_.*/d' .config
- echo CONFIG_RTE_TOOLCHAIN_${DPDKCC^^}=y >> .config
- popd
- make build O=${TARGET} EXTRA_CFLAGS="-fPIC $DPDK_CFLAGS" CROSS="$DPDK_CROSS" CC="$CC" HOSTCC=gcc -j $(nproc)
- make install O=${TARGET} DESTDIR=${TARGET}
- rm -r ./doc ./${TARGET}/app ./${TARGET}/build
- popd
- fi
-fi
-echo "`pwd`/dpdk/${TARGET}/usr/local" > /tmp/dpdk_install_dir
-
@@ -1,33 +1,22 @@
#!/bin/bash
set -e
-export CC=gcc
-export LD=ld
-export AR=ar
-
-export PKG_CONFIG_PATH="$HOME/cunit-install/i386-linux-gnu/lib/pkgconfig:${PKG_CONFIG_PATH}"
-export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}"
-
-cd ~
-export CROSS_ARCH=""
-#export DPDK_CROSS=arm-linux-gnueabihf-
-
-
+TARGET_ARCH=i686-linux-gnu
if [ "${CC#clang}" != "${CC}" ] ; then
- export CC="clang --target=i686-linux-gnu"
- export LD="clang --target=i686-linux-gnu"
- export CXX="clang++ --target=i686-linux-gnu"
+ export CC="clang --target=${TARGET_ARCH}"
+ export CXX="clang++ --target=${TARGET_ARCH}"
else
export CFLAGS="-m32"
export CXXFLAGS="-m32"
export LDFLAGS="-m32"
fi
+export CPPFLAGS="-I/usr/include/i386-linux-gnu/dpdk"
-git clone /odp
-cd ./odp
+cd "$(dirname "$0")"/../..
./bootstrap
-./configure --host=i386-linux-gnu --build=x86_64-linux-gnu
-make clean
+./configure \
+ --host=${TARGET_ARCH} --build=x86_64-linux-gnu \
+ --enable-dpdk \
+ ${CONF}
+
make -j 8
-cd ..
-rm -rf odp
@@ -1,32 +1,19 @@
#!/bin/bash
set -e
+TARGET_ARCH=powerpc-linux-gnu
if [ "${CC#clang}" != "${CC}" ] ; then
- export CC="clang --target=powerpc-linux-gnu"
- export LD="clang --target=powerpc-linux-gnu"
- export CXX="clang++ --target=powerpc-linux-gnu"
- export AR=powerpc-linux-gnu-ar
+ export CC="clang --target=${TARGET_ARCH}"
+ export CXX="clang++ --target=${TARGET_ARCH}"
else
- export CC=powerpc-linux-gnu-gcc
- export LD=powerpc-linux-gnu-ld
- export AR=powerpc-linux-gnu-ar
+ export CC="${TARGET_ARCH}-gcc"
+ export CXX="${TARGET_ARCH}-g++"
fi
-export PKG_CONFIG_PATH=/usr/lib/powerpc-linux-gnu/pkgconfig:/usr/powerpc-linux-gnu/pkgconfig
-export PKG_CONFIG_PATH="$HOME/cunit-install/powerpc-linux-gnu/lib/pkgconfig:${PKG_CONFIG_PATH}"
-
-CWD=$(dirname "$0")
-TDIR=`mktemp -d -p ~`
-
-cd ${TDIR}
-
-git clone ${CWD}/../../ odp
-cd ./odp
+cd "$(dirname "$0")"/../..
./bootstrap
-./configure --host=powerpc-linux-gnu --build=x86_64-linux-gnu \
- --disable-test-cpp ${CONF}
+./configure \
+ --host=${TARGET_ARCH} --build=x86_64-linux-gnu \
+ ${CONF}
-make clean
make -j 8
-cd ~
-rm -rf ${TDIR}
@@ -1,38 +1,25 @@
#!/bin/bash
set -e
-# CC LD AR CXX has to be predifubed
-#
-
-export PKG_CONFIG_PATH="$HOME/cunit-install/x86_64/lib/pkgconfig:${PKG_CONFIG_PATH}"
+if [ "${CC#clang}" != "${CC}" ] ; then
+ export CXX="clang++"
+fi
-CWD=$(dirname "$0")
-TDIR=`mktemp -d -p ~`
+cd "$(dirname "$0")"/../..
+./bootstrap
+./configure \
+ --enable-dpdk \
+ ${CONF}
-cd ${TDIR}
+make -j 8
echo 1000 | tee /proc/sys/vm/nr_hugepages
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
-git clone ${CWD}/../../ odp
-cd ./odp
-./bootstrap
-./configure ${CONF} \
- --enable-dpdk
-
-make -j 8
# Ignore possible failures there because these tests depends on measurements
# and systems might differ in performance.
export CI="true"
make check
-if [ $? -ne 0 ]; then
- find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
-fi
-
-cd ~
-rm -rf ${TDIR}
-
umount /mnt/huge
-