From patchwork Sun Aug 26 08:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 145129 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2971752ljw; Sun, 26 Aug 2018 01:07:20 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb4cw8mXmuPe999XuJzp1tAcfA/km9MN9lXKpbqB6PQEMlN40ljcdus2wYU+q92QF8/N1vt X-Received: by 2002:a0c:b145:: with SMTP id r5-v6mr8774168qvc.97.1535270840738; Sun, 26 Aug 2018 01:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535270840; cv=none; d=google.com; s=arc-20160816; b=S4E5CQU+FvlinKdWrBBE5LZxne5kqv56U9ZerOYxjpFI/kgJzI5RnFl9u0PX730roB z8qXsDquBO8Ky9tksttUDVgVoH4tK9tOUjMbmozs8iLcVyHQ4Jm7M82iVo6oon95haLm Y1n4N38nR/KBMjVoc/WqSsh7OXUCjMelbIjrIJh+x/7zspS4iXIbYJ3arjg9mtVkpx82 cMwLWLavgCbhiVpZ3jl+scRAh6SDa+n5il3wGI2Dm14ur2l4PnIyFK1HWBQXTIjAxlDC KhP6c4LX/gUCU/HxYF6cLauG6l5CZdRrV92ITsA9besdm6A43Tzi+eGtGdmMnuit15UA KdAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=VxLMaGZjtTaBIBdBRDA8/0wmwDOaJJk/kcpBboiCAVM=; b=AHw2eA8AfNwUjlQhknGQeYKNq8TFJshzThBbHlwRtZIeeNU+QcWKA4yf6wQGj62Al7 61+xR6gVeEWzgWsLGCgWoGYM8o/17VFZJCo5KvPlGO3s5UnxBi89Ws/AAORjQGyXS5Oc WcEx4hEMbpag2sQ7l0fCXUaoHCzHNfC0a+vtu27KMWxdUyssQuteXZmR1dDR6MZcqj0A TCBZBWRnI5idXeUxJ9mxzu8yH9sXCadulGuzPdUhOt56i6iPW+9RtXycYaTHaZ+Eqya/ y3s/j17YpU7V0gW/A0Dk5VruWog6NShJbTArM0NTx8S8C4UPmyRJIJk3Zk3jZzaFxnb6 ol7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id v184-v6si1788373qki.305.2018.08.26.01.07.20; Sun, 26 Aug 2018 01:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 57D2B68600; Sun, 26 Aug 2018 08:07:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E098668665; Sun, 26 Aug 2018 08:01:06 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8032868663; Sun, 26 Aug 2018 08:00:51 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 871B5685F8 for ; Sun, 26 Aug 2018 08:00:12 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward102j.mail.yandex.net (Yandex) with ESMTP id E2C3C56033D5 for ; Sun, 26 Aug 2018 11:00:09 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id I2InDexH37-09Ea2xWP; Sun, 26 Aug 2018 11:00:09 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ofNGGFMjLV-08gSUW84; Sun, 26 Aug 2018 11:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 26 Aug 2018 08:00:03 +0000 Message-Id: <1535270406-26015-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535270406-26015-1-git-send-email-odpbot@yandex.ru> References: <1535270406-26015-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 681 Subject: [lng-odp] [PATCH v1 2/5] travis: switch to unified 16.04 image X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 681 (lumag:travis-xenial) ** https://github.com/Linaro/odp/pull/681 ** Patch: https://github.com/Linaro/odp/pull/681.patch ** Base sha: 989df5d2f97ab4711328b11282dcc743f5740e00 ** Merge commit sha: d8e7eaf6fa1b281c4ef9759cf7b64bfdd3b64c0b **/ .travis.yml | 127 ++++++++---------------------------- scripts/ci/build_arm64.sh | 50 ++++---------- scripts/ci/build_armhf.sh | 54 +++++---------- scripts/ci/build_dpdk.sh | 88 ------------------------- scripts/ci/build_i386.sh | 32 ++++----- scripts/ci/build_powerpc.sh | 33 ++++------ scripts/ci/build_x86_64.sh | 32 +++------ 7 files changed, 90 insertions(+), 326 deletions(-) delete mode 100755 scripts/ci/build_dpdk.sh diff --git a/.travis.yml b/.travis.yml index 54586fa57..4c028566d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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,11 +43,18 @@ 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" - if [ -z "${DOCKER_NAMESPACE} ] ; then export DOCKER_NAMESPACE="opendataplane"; fi 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" @@ -66,7 +62,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 @@ compiler: install: - sudo apt-get install linux-headers-`uname -r` script: - - if [ "${CC#clang}" != "${CC}" ] ; then CXX=clang++; fi - if [ -n "${CROSS_ARCH}" ] ; then docker run -i -t -v `pwd`:/odp - -e CC="${CC}" -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 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: @@ -107,21 +101,27 @@ jobs: - docker run --privileged -i -t -v `pwd`:/odp --shm-size 8g -e CODECOV_TOKEN="${CODECOV_TOKEN}" - -e CC="${CC}" -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 script: - docker run --privileged -i -t -v `pwd`:/odp --shm-size 8g - -e CC="${CC}" -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 - | @@ -148,82 +148,11 @@ jobs: true fi - stage: "build only" - env: Ubuntu14.04_arm64 + env: Ubuntu16.04_arm64 script: - 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: - - docker run --privileged -i -t - -v `pwd`:/odp - -e CC="${CC}" -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: - - docker run --privileged -i -t - -v `pwd`:/odp - -e CC="${CC}" -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: - - docker run --privileged -i -t - -v `pwd`:/odp - -e CC="${CC}" -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: - - docker run --privileged -i -t - -v `pwd`:/odp - -e CC="${CC}" -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 diff --git a/scripts/ci/build_arm64.sh b/scripts/ci/build_arm64.sh index 1f6872cc9..20c6d4eaa 100755 --- a/scripts/ci/build_arm64.sh +++ b/scripts/ci/build_arm64.sh @@ -1,45 +1,23 @@ #!/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 LD="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 LD="${TARGET_ARCH}-ld" + 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 diff --git a/scripts/ci/build_armhf.sh b/scripts/ci/build_armhf.sh index 6c64bd5ef..c354bc6b8 100755 --- a/scripts/ci/build_armhf.sh +++ b/scripts/ci/build_armhf.sh @@ -1,47 +1,25 @@ #!/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 LD="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 LD="${TARGET_ARCH}-ld" + 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 diff --git a/scripts/ci/build_dpdk.sh b/scripts/ci/build_dpdk.sh deleted file mode 100755 index bdfe9a473..000000000 --- a/scripts/ci/build_dpdk.sh +++ /dev/null @@ -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 - diff --git a/scripts/ci/build_i386.sh b/scripts/ci/build_i386.sh index b98f55d5d..e6a744d26 100755 --- a/scripts/ci/build_i386.sh +++ b/scripts/ci/build_i386.sh @@ -1,33 +1,23 @@ #!/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 LD="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/${TARGET_ARCH}/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 diff --git a/scripts/ci/build_powerpc.sh b/scripts/ci/build_powerpc.sh index 2ff1a98e9..496c9e7d0 100755 --- a/scripts/ci/build_powerpc.sh +++ b/scripts/ci/build_powerpc.sh @@ -1,32 +1,21 @@ #!/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 LD="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 LD="${TARGET_ARCH}-ld" + 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} diff --git a/scripts/ci/build_x86_64.sh b/scripts/ci/build_x86_64.sh index 1356dcdc9..4e720b1fc 100755 --- a/scripts/ci/build_x86_64.sh +++ b/scripts/ci/build_x86_64.sh @@ -1,38 +1,26 @@ #!/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 LD="clang" + 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 -