From patchwork Wed Sep 13 14:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112449 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp985583qgf; Wed, 13 Sep 2017 07:03:40 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAA6XcyjGxe7d7zJDscRgPAhUn195FfE50JtSKFldnfp6DTLWxi9JVG4fZrkJjjw8tVKN3o X-Received: by 10.200.27.28 with SMTP id y28mr25531042qtj.297.1505311420006; Wed, 13 Sep 2017 07:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505311419; cv=none; d=google.com; s=arc-20160816; b=P4Ba2/GbNO2Tc0CCjalXp+6b68XNdFys+H5I1rPDqj9U+4SnXrRXhyR+XndZIPQ/t1 oJSOZmtqnYi0Bwy6389/UgpSxdq/kHmBdSHF9hzLQ5HNM4ilNSqZxMLePE4xUZ7TjWTs F8TTAOqQ0yStxFUPKY6mjqcbyeBYUIsJ2dmODpve880yxMmQEjOTMxBBVpTsm8aBPwhd lX0cqP2DqKD+aDgCUISW2MrS/oM3hk5wesEI3pC3uGFp8BBK9H6cw040qC3ZMn2//8U7 vpgK6ZiliBBMXJnS12OuW8szskpzLrdb2yLuiYXaaX8vF4tT2xAc8dlgZSXDVeAg+ahO 5Mhg== 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=xEpJnPS/pro1GtfgQ+NZbtJ1h3juFXgsAWYD0Lohh8A=; b=ZmMdC/zKRSgzjqmX/JcJuqxNdUyP+yNXhXo8dQM54lZ3gKzNDO4XEgrGgVlzkAqxYj ZsWEyk7v4+3E7h6Y2HZcjh1Yq2+72+/2pLwqtB/Lk7ibQHRd2HJfAjx3/PNUpXCMNSQV POEGgZ9P7GQ5ny2ZBDRFDJjObdWkhbks0zAur3YXkphXqlgKZMnGgBFtpN2sfHE8Lo5q 0izd2JK4MkNNZHh7x2qy6uQhdGR27zdBMySp7jYNYAdZYRrLbW6KbzEGXiMRZBZfr4S4 Uj1+jsKEQfJQz1ZHy0JOa+2HEncF7w7pTD/Sjy4E58BjRhUNls5UIivLXEskkEDlsfyi NRpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v64si7290861qkb.46.2017.09.13.07.03.39; Wed, 13 Sep 2017 07:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 A5C4A6156C; Wed, 13 Sep 2017 14:03:39 +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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED 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 72AFE62C59; Wed, 13 Sep 2017 14:00:43 +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 2FB4F60B45; Wed, 13 Sep 2017 14:00:28 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id 950F360B49 for ; Wed, 13 Sep 2017 14:00:23 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 5370F5A04857 for ; Wed, 13 Sep 2017 17:00:22 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hXei9NRkw1-0MhemMec; Wed, 13 Sep 2017 17:00:22 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rO6ixn5FJb-0L2C3Ian; Wed, 13 Sep 2017 17:00:21 +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: Wed, 13 Sep 2017 17:00:06 +0300 Message-Id: <1505311206-19657-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505311206-19657-1-git-send-email-odpbot@yandex.ru> References: <1505311206-19657-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 175 Subject: [lng-odp] [PATCH v1 6/6] travis: merge native and cross-compilation scripts 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 Merge native and cross-compilation scripts. This allows us to simplify Travis CI configuration and to enable e.g. testing of out-of-tree compilation. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 175 (lumag:build-x86) ** https://github.com/Linaro/odp/pull/175 ** Patch: https://github.com/Linaro/odp/pull/175.patch ** Base sha: fb3f36cec108ce9c55241d9f0e66d4832a552b8a ** Merge commit sha: 0a03682a26c390a3e1567ae1767d6aca605f0ac7 **/ .travis.yml | 70 +++++++++++++------------------------------------------------ 1 file changed, 14 insertions(+), 56 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06983f8e..6ecf6b8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -161,27 +161,33 @@ install: fi script: + - if [ -z "$CROSS_ARCH" ] ; then + EXTRA_CONF="--with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap" ; + fi - ./bootstrap - ./configure --prefix=$HOME/odp-install --enable-user-guides - --with-dpdk-path=`pwd`/dpdk/${TARGET} - --with-netmap-path=`pwd`/netmap - $CONF --enable-debug=full --enable-helper-linux + $CROSS $EXTRA_CONF $CONF - make -j $(nproc) - mkdir /dev/shm/odp - - sudo LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" ODP_SHM_DIR=/dev/shm/odp make check + - if [ -z "$CROSS_ARCH" ] ; then + sudo LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" ODP_SHM_DIR=/dev/shm/odp make check ; + fi - make install - echo "Checking linking and run from install..." - pushd $HOME - echo "Dynamic link.." - - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux` - - LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux` - echo "Static link.." - - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static - - ./odp_hello_inst + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_static `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static + - if [ -z "$CROSS_ARCH" ] ; then + LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst ; + ./odp_hello_inst_static ; + fi + - popd - ccache -s jobs: @@ -190,82 +196,34 @@ jobs: compiler: aarch64-linux-gnu-gcc env: TEST="aarch64-linux-gnu" CROSS_ARCH="arm64" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: "\"clang-3.8 --target=aarch64-linux-gnu\"" env: TEST="clang-3.8 aarch64-linux-gnu" CROSS_ARCH="arm64" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: arm-linux-gnueabihf-gcc env: TEST="arm-linux-gnueabihf" CROSS_ARCH="armhf" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: "\"clang-3.8 --target=arm-linux-gnueabihf\"" env: TEST="clang-3.8 arm-linux-gnueabihf" CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: powerpc-linux-gnu-gcc env: TEST="powerpc-linux-gnueabi" CROSS_ARCH="powerpc" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: "\"clang-3.8 --target=powerpc-linux-gnu\"" env: TEST="clang-3.8 powerpc-linux-gnu" CROSS_ARCH="powerpc" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: "\"gcc -m32\"" env: TEST="i686-linux-gnueabi" CROSS_ARCH="i386" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test compiler: "\"clang-3.8 -m32\"" env: TEST="clang-3.8 i686-linux-gnu" CROSS_ARCH="i386" install: true - script: - - ./bootstrap - - ./configure --prefix=$HOME/odp-install $CROSS - --enable-debug=full - --enable-helper-linux - - make -j $(nproc) - stage: test env: TEST=coverage compiler: gcc