From patchwork Mon Aug 27 23:00:01 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: 145222 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp488969ljw; Mon, 27 Aug 2018 16:02:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaUIu54+RUrwDZl4phSgrf6zjdoUxnTP7Ae+UFvL9bdOJXawxmO8N0Ekoj0NIY0kJWV0vq2 X-Received: by 2002:aed:237a:: with SMTP id i55-v6mr16253136qtc.263.1535410969850; Mon, 27 Aug 2018 16:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535410969; cv=none; d=google.com; s=arc-20160816; b=HJv0KMsFhfG0sAR8sLCmKt9o4/EIstv3nvhhguMgkoBedR4zFuDJcRqFRflB7RnhrH CNs75MmvbFK+56DBKtb26FFbQ4bghcYDncrEZM+FzZ/CBe0TXe7hiNwVjnhU3k7YJhP5 i/T5WjG48wDUuRAmcepqZhQ2u6TN2mohQtYHhp7pxnxvQbWedzxeIH1WQ9qBpwL4I71o /MHqpLqLm7LbxsiAtbfimz4RSMepoe24PNTu6IWKZRNPlsogZuol1v+IPPn3Eot5mo2s 0CTyVx4K8Jes4tuCLYctSMo+bAzVNHv1wXnue9ArZPVsKUhwlBV1pyrvWab9VPbQI62J f7bg== 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=W/eVSNtuEbxl24jNwbRksZ8/e+uyGx/IB8ccLswoE5k=; b=eN2dUOmUQGF0G8IWjxvZ5DhUkYauPHsx/4h+QVtmOrnQefgxpW0fp9ZKb8qWD1BtE6 K41Xrjh5SevY6popDF+FVXAiSEh6xz2pa+4aw+e9jBWWYXpbk/MIB5ZhAkPfwkLGBUoE LMN9VlPKYO/j5C2/DUM2FWDyB4McWbf65r3wFWfgPjBFziH2RTwEdG6lhF9J28ZbKwtq M90C+9HlO/i1qgz4qGbnjxFCIMNgv8ycwcOe8ek5+RtaFP2Vebj5hyCJlRu9wHHePMC1 cq125AdxZ7JL/UebLfQUSx3lizcRJMBorZXiZHZyyUmjIy5BnQidQAPstToN7pICMuvY bR1Q== 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 k4-v6si526538qkf.310.2018.08.27.16.02.49; Mon, 27 Aug 2018 16:02:49 -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 5F1F968668; Mon, 27 Aug 2018 23:02:49 +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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI 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 AE6546865C; Mon, 27 Aug 2018 23:00:38 +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 063EB6865C; Mon, 27 Aug 2018 23:00:24 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 45C5D6865A for ; Mon, 27 Aug 2018 23:00:13 +0000 (UTC) Received: from mxback12g.mail.yandex.net (mxback12g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:91]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 3F0795D863A0 for ; Tue, 28 Aug 2018 02:00:11 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback12g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id njmuNl3K6K-0Bd8nopL; Tue, 28 Aug 2018 02:00:11 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rCYiipQZbT-0ADmdPWW; Tue, 28 Aug 2018 02:00:10 +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: Mon, 27 Aug 2018 23:00:01 +0000 Message-Id: <1535410807-29034-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535410807-29034-1-git-send-email-odpbot@yandex.ru> References: <1535410807-29034-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 681 Subject: [lng-odp] [PATCH v5 2/8] 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: 6ce60cac1fea6d65803740f5f9b6627abf6814b3 ** Merge commit sha: 8c5d835ef3fbc6ab78503945fef582f7c60ac2c9 **/ .travis.yml | 131 ++++++++---------------------------- scripts/ci/build_arm64.sh | 48 ++++--------- scripts/ci/build_armhf.sh | 52 ++++---------- scripts/ci/build_dpdk.sh | 88 ------------------------ scripts/ci/build_i386.sh | 31 +++------ scripts/ci/build_powerpc.sh | 31 +++------ scripts/ci/build_x86_64.sh | 31 +++------ 7 files changed, 82 insertions(+), 330 deletions(-) delete mode 100755 scripts/ci/build_dpdk.sh diff --git a/.travis.yml b/.travis.yml index 23629d538..4853b48c5 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,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 diff --git a/scripts/ci/build_arm64.sh b/scripts/ci/build_arm64.sh index 1f6872cc9..c38385d97 100755 --- a/scripts/ci/build_arm64.sh +++ b/scripts/ci/build_arm64.sh @@ -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 diff --git a/scripts/ci/build_armhf.sh b/scripts/ci/build_armhf.sh index 6c64bd5ef..74d47ad12 100755 --- a/scripts/ci/build_armhf.sh +++ b/scripts/ci/build_armhf.sh @@ -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 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..177df6304 100755 --- a/scripts/ci/build_i386.sh +++ b/scripts/ci/build_i386.sh @@ -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 diff --git a/scripts/ci/build_powerpc.sh b/scripts/ci/build_powerpc.sh index 2ff1a98e9..962a6a465 100755 --- a/scripts/ci/build_powerpc.sh +++ b/scripts/ci/build_powerpc.sh @@ -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} diff --git a/scripts/ci/build_x86_64.sh b/scripts/ci/build_x86_64.sh index 1356dcdc9..b9b170659 100755 --- a/scripts/ci/build_x86_64.sh +++ b/scripts/ci/build_x86_64.sh @@ -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 -