From patchwork Wed Sep 13 16:00:07 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: 112485 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1254620qgf; Wed, 13 Sep 2017 11:30:12 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAYXehmmR6PCJOGWs4mq8TbI8PBn2Be7aXZ6B7AQgzPTk4vaVG4a8c9Y1wwKeLbtKOZBYcj X-Received: by 10.237.56.67 with SMTP id j61mr11889463qte.192.1505327411885; Wed, 13 Sep 2017 11:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505327411; cv=none; d=google.com; s=arc-20160816; b=EYADImS03SNW2VR9GeTOIDoULUAxB/r1aYXki5D8dDv/RVd1b0f5J3dutDx/YmiYxF J9MuxLwVOlQmNeFaxPq1MuuCzkAf0z3FnmtRTDN6VbdNDetoSpQneAOugwJ0f+8HrCM9 R+MK6lbRT1KA9f7fS9r/eRXopBsJakwUj3Y3ILVRgRImgYmmN+we8YF+0KmJQnRT/WeA eIvuUpoT+y+2CSsy4V+gbw3Jj7s5DIHkPA39I+0Ib1+bWFfmxt/QWcfWRBcD1eQVnxQr /NLgvNFUwBHtupSCmB8U6YY1fy94IVlVgI+C8dmHjEwaXt/DhMFFJRWlLgb7ZM0YmoZh KERA== 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=PYp/W/cxthYknCuiYoUYMn4zXbTdkr51FTBWTEKOOVY=; b=si4/hNUK0KuWP0NcjulejxftIvVBCftQ0/6fEkzW780SLgN0f6iuCho4P0CbYuaXV/ etHfeHAbtgClgBVs32AmC/xFH3dhYULEbz2J3pNSCoXMcjH28RPUaUPwtA08/eVJC9Fo 6QyWkAy0K0ow0tU6VvBw69HRMn67wOj+Pk7ma5Qpn2fr+YB0EqqzCzv7yYd/hxGtRt6+ Xuw3HZdbLYLaAAyxvTqdQcdDCGCMqL3Zbh6y7RqWV9G/FyT4VFNH5vBP0aa+bUgwRkOI qeTfI5y4wqOOSxc3qWbWhY4UW+4yJjrfxYIZ4rGS7l3tqrJZ12Y8o/smbGPyzvbPOJIC OdOg== 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 f58si15787796qtk.538.2017.09.13.11.30.09; Wed, 13 Sep 2017 11:30:11 -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 3CF2765C30; Wed, 13 Sep 2017 18:30:09 +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 93FC765F55; Wed, 13 Sep 2017 17:57: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 9F26465D2F; Wed, 13 Sep 2017 17:56:59 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id 813B165D2F for ; Wed, 13 Sep 2017 16:00:18 +0000 (UTC) Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 2873C5A04B23 for ; Wed, 13 Sep 2017 19:00:17 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XSnbfyRXXL-0HLuiASV; Wed, 13 Sep 2017 19:00:17 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cDi0ojkXeT-0GKqNDXi; Wed, 13 Sep 2017 19:00:16 +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 19:00:07 +0300 Message-Id: <1505318407-21381-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505318407-21381-1-git-send-email-odpbot@yandex.ru> References: <1505318407-21381-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 175 Subject: [lng-odp] [PATCH v4 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: 053d08aa14dd4077b17b983bac6b9930801fbcba **/ .travis.yml | 86 ++++++++++++++++--------------------------------------------- 1 file changed, 22 insertions(+), 64 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06983f8e..ac8a4c3a 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} ${CFLAGS} ${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} ${CFLAGS} ${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: @@ -189,83 +195,35 @@ jobs: - stage: test 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - 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) + install: gem install asciidoctor - stage: test env: TEST=coverage compiler: gcc