From patchwork Fri Jul 14 10:00:05 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: 107762 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp688205qge; Fri, 14 Jul 2017 03:07:55 -0700 (PDT) X-Received: by 10.237.53.238 with SMTP id d43mr10398693qte.46.1500026875280; Fri, 14 Jul 2017 03:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500026875; cv=none; d=google.com; s=arc-20160816; b=zixC+mMCTLvf8Q5RFUj9oVThemI8BI3H9Ic/uiK7jR0M+C8elObHFr3DRB28p9JVOR 6ofgbcEvYj015xlNdo0R1JivxJLAn3FbrP3Ph897jwK9/2a58ivvHWj0dyUMRFUvkR31 Dwc7gvrcSrzbKalfeV7OoOwtoDCRA2OsIgyhkWj1aJceP1z3QtC02WpviOTp7FMq73bU RqJYHGDqY1jNrtyxkmcTvW1JTPyLp30avGs265lpxGTU5qWOouwn3D2vDXN8R/x4LCOq Qiy/wAaDwwGTMDOX2a+wCr1EmYwItKjV6FS3P/MPCLzEu26JvV7+KVWNYnnFBJpxpi8m 3IWA== 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=BmNBkSwV+LjZuLNma1Rk7YTJNoTbTYASTpBCpUwNsA4=; b=IAcwcSebcPqwKP0CHGZBmgCrQoeeaa0U01PbJhIuuqfDX/rJ+PteSMWofWeA2Z6KTi 2OkVVm/lvdphivbxnlwVFNVHv+abaZC+T4OLdj6v8jHQjdGG3C8X8IxBVjBhO8iC4R+Q 3Vo/C5GhRkOSKnNIVoJ+wrS9F94yQP8q4Cj5qmp8ti6BxIZ6VRpEtmcCv+j1KFDa+3Wp 3lRMq0XsmDb7pPDenXId4lZ3uUkiEiMpia9OYrcE6/CfGGZVNaFIaIOksd7V2C3v6ZB1 Z6QZu020nauewLz08tVJvdQHlb4MOJqRHNmyboEjt8PKeub4UVP0dViCUEj4118DWSP2 GQ8Q== 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 m6si7647901qkm.303.2017.07.14.03.07.55; Fri, 14 Jul 2017 03:07:55 -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 F098C6081D; Fri, 14 Jul 2017 10:07:54 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 6943160949; Fri, 14 Jul 2017 10:02:17 +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 E49E765BF2; Fri, 14 Jul 2017 10:02:04 +0000 (UTC) Received: from forward4o.cmail.yandex.net (forward4o.cmail.yandex.net [37.9.109.248]) by lists.linaro.org (Postfix) with ESMTPS id 8F2CF609F8 for ; Fri, 14 Jul 2017 10:00:32 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [37.140.190.28]) by forward4o.cmail.yandex.net (Yandex) with ESMTP id 6A3EF210A2 for ; Fri, 14 Jul 2017 13:00:31 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 2E8512940C90 for ; Fri, 14 Jul 2017 13:00:30 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eQMe5PKgI5-0UoWYJtq; Fri, 14 Jul 2017 13:00:30 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 13:00:05 +0300 Message-Id: <1500026405-14155-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> References: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 77 Subject: [lng-odp] [PATCH v1 9/9] travis: port travis checks from master 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: Maxim Uvarov Signed-off-by: Maxim Uvarov --- /** Email created from pull request 77 (muvarov:monarch_lts) ** https://github.com/Linaro/odp/pull/77 ** Patch: https://github.com/Linaro/odp/pull/77.patch ** Base sha: 0c15c40db40834f1df217191c4b6a06303ab0872 ** Merge commit sha: f06a7319a03ad565ced026ddc76a66164aa93782 **/ .travis.yml | 226 +++++++++++++++++++++++++++++++++++++++++++++ scripts/ci-checkpatches.sh | 17 ++++ 2 files changed, 243 insertions(+) create mode 100644 .travis.yml create mode 100755 scripts/ci-checkpatches.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..6a845e97 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,226 @@ +# Copyright (c) 2016, Linaro Limited +# All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause +# +# Please update xxxx for your coverity token and notification email if required +# pushing to github/master will run make check +# pushing to github/coverity_scan will also launch a static analysis +# See https://scan.coverity.com/travis_ci + +language: c +sudo: required +dist: trusty +group: deprecated-2017Q2 +env: + global: + # COVERITY_SCAN_TOKEN + # ** specific to your project ** + # Note: + # You should have a github account and travis linked travis account. + # The secure key to be filled below is the 685 character long encrypted + # token you can find as follow from your coverity dashboard + # (at https://scan.coverity.com/dashboard): + # Click on the github project (/odp) + # Click on "submit build" + # Click on "Configure Travis CI" + # Look at the COVERITY_SCAN_TOKEN in the env: global: section + # of the configuration example. + # copy the secure: below + # + - secure: "xxxx" + # + # By default Linaro CODECOV_TOKEN token is used. It's ok to use it to see + # 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=8e1c0fd8-62ff-411e-a79f-5839f6662c11 + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc + - clang-3.8 + - automake autoconf libtool libssl-dev graphviz mscgen doxygen + - libpcap-dev + - dpkg-cross equivs + - gcc-aarch64-linux-gnu pkg-config-aarch64-linux-gnu libc6-dev-arm64-cross + - gcc-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf libc6-dev-armhf-cross + - gcc-powerpc-linux-gnu pkg-config-powerpc-linux-gnu libc6-dev-powerpc-cross +# coverity_scan: +# project: +# name: "$TRAVIS_REPO_SLUG" +# notification_email: xxxx +# build_command_prepend: "./bootstrap && ./configure --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example" +# build_command: "make" +# branch_pattern: coverity_scan + +compiler: + - gcc + - clang-3.8 + +env: + - CONF="" + - CONF="--enable-schedule-sp" + +before_install: +# Install cunit for the validation tests because distro version is too old and fails C99 compile + - sudo apt-get remove libcunit1-dev libcunit1 + - export CUNIT_VERSION=2.1-3 + - curl -sSOL https://github.com/Linaro/libcunit/releases/download/${CUNIT_VERSION}/CUnit-${CUNIT_VERSION}.tar.bz2 + - tar -jxf *.bz2 + - pushd CUnit* + - libtoolize --force --copy + - aclocal + - autoheader + - automake --add-missing --include-deps --copy + - autoconf + - ./configure --enable-debug --enable-automated --enable-basic --enable-console --enable-examples --enable-test $CROSS || cat config.log + - make + - sudo make install + - popd + - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" + +install: + - echo 1000 | sudo tee /proc/sys/vm/nr_hugepages + - sudo mkdir -p /mnt/huge + - sudo mount -t hugetlbfs nodev /mnt/huge + + - sudo apt-get -qq update + - sudo apt-get install linux-headers-`uname -r` + - gem install asciidoctor + - PATH=${PATH//:\.\/node_modules\/\.bin/} + +# DPDK pktio + - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"} + - git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v16.04 http://dpdk.org/git/dpdk dpdk + - pushd dpdk + - git log --oneline --decorate + - make config T=${TARGET} O=${TARGET} + - pushd ${TARGET} + - sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config + - popd + - make install T=${TARGET} EXTRA_CFLAGS="-fPIC" + - popd + +# Netmap pktio + - git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v11.2 https://github.com/luigirizzo/netmap.git + - pushd netmap/LINUX + - ./configure + - make + - sudo insmod ./netmap.ko + - popd + +script: + - ./bootstrap + - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap $CONF + - make -j $(nproc) + - 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 -I${HOME}/odp-install/include -L${HOME}/odp-install/lib -lodp-linux -L${OLDPWD}/dpdk/x86_64-native-linuxapp-gcc/lib -lrt -ldpdk -lpthread -lcrypto -lpcap -ldl + - LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst + - echo "Static link.." + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst -I${HOME}/odp-install/include -L${HOME}/odp-install/lib -lodp-linux -L${OLDPWD}/dpdk/x86_64-native-linuxapp-gcc/lib -lrt -ldpdk -lpthread -lcrypto -lpcap -ldl -static + - ./odp_hello_inst + - popd + - sudo git clean -f -d -x + - ./bootstrap + - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example $CONF + - make -j $(nproc) + - sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make check + +jobs: + include: + - stage: test + compiler: aarch64-linux-gnu-gcc + env: TEST="aarch64-linux-gnu" CROSS="--host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu" + install: true + script: + - mkdir cross + - pushd cross + # one can not include colon in the command or bad things will happen, so mimic it + - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy + - equivs-build -a arm64 dummy + - wget + http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_arm64.deb + http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_arm64.deb + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_arm64.deb + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_arm64.deb + - sudo dpkg-cross -i -M -A -a arm64 *.deb + - popd + - ./bootstrap + - ./configure --prefix=$HOME/odp-install $CROSS + --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example + - make -j $(nproc) + - stage: test + compiler: arm-linux-gnueabihf-gcc + env: TEST="arm-linux-gnueabihf" CROSS="--host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf" + install: true + script: + - mkdir cross + - pushd cross + # one can not include colon in the command or bad things will happen, so mimic it + - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy + - equivs-build -a armhf dummy + - wget + http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_armhf.deb + http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_armhf.deb + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_armhf.deb + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_armhf.deb + - sudo dpkg-cross -i -M -A -a armhf *.deb + - popd + - ./bootstrap + - ./configure --prefix=$HOME/odp-install $CROSS + --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example + - make -j $(nproc) + - stage: test + compiler: powerpc-linux-gnu-gcc + env: TEST="powerpc-linux-gnu" CROSS="--host=powerpc-linux-gnu --prefix=/usr/powerpc-linux-gnu" + install: true + script: + - mkdir cross + - pushd cross + # one can not include colon in the command or bad things will happen, so mimic it + - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy + - equivs-build -a powerpc dummy + - wget + http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_powerpc.deb + http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_powerpc.deb + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_powerpc.deb + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_powerpc.deb + - sudo dpkg-cross -i -M -A -a powerpc *.deb + - popd + - ./bootstrap + - ./configure --prefix=$HOME/odp-install $CROSS + --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example + - make -j $(nproc) + - stage: test + env: TEST=distcheck + compiler: gcc + script: + - ./bootstrap + - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example + - sudo PATH="$PATH" LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck + - stage: test + env: TEST=doxygen + compiler: gcc + script: + # doxygen does not trap on warnings, check for them here. + - ./bootstrap + - ./configure + - make doxygen-doc |tee doxygen.log + - fgrep -rvq warning ./doxygen.log + - stage: test + env: TEST=checkpatch + compiler: gcc + script: + - echo ${TRAVIS_COMMIT_RANGE}; + - ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 's/\.//'`; + - if [ -z "${ODP_PATCHES}" ]; then env; exit 1; fi; + - ./scripts/ci-checkpatches.sh ${ODP_PATCHES}; + +after_failure: + - cat config.log + - find . -name 'test-suite.log' -execdir grep -il "FAILED" {} \; -exec echo {} \; -exec cat {} \; diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh new file mode 100755 index 00000000..cb1c4e65 --- /dev/null +++ b/scripts/ci-checkpatches.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +PATCHES=$1 +echo "Run checkpatch for ${PATCHES}" +# Generate patches provided with $1. +# In case of force push and range is broken +# validate only the latest commit if it's not merge commit. +git format-patch ${PATCHES} +if [ $? -ne 0 ]; then + git show --summary HEAD| grep -q '^Merge:'; + if [ $? -ne 0 ]; then + git format-patch HEAD^; + perl ./scripts/checkpatch.pl *.patch; + fi; +else + perl ./scripts/checkpatch.pl *.patch; +fi