From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 866201382AC for ; Mon, 20 Jun 2016 03:22:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EC3D1141B2; Mon, 20 Jun 2016 03:22:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 692B9141B8 for ; Mon, 20 Jun 2016 03:22:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8F422340901 for ; Mon, 20 Jun 2016 03:22:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E9D9241B for ; Mon, 20 Jun 2016 03:22:19 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1466392325.00090c9639522b484a4f8c3cf9b9fcb2f7ad6a5c.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: /, travis/ X-VCS-Repository: proj/portage-utils X-VCS-Files: .travis.yml travis/main.sh X-VCS-Directories: travis/ / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 00090c9639522b484a4f8c3cf9b9fcb2f7ad6a5c X-VCS-Branch: master Date: Mon, 20 Jun 2016 03:22:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8305a789-8693-47fc-9971-6f97e773c4e5 X-Archives-Hash: 482f6db410f7616022b1ff171d2fd29c commit: 00090c9639522b484a4f8c3cf9b9fcb2f7ad6a5c Author: Mike Frysinger gentoo org> AuthorDate: Mon Jun 20 03:12:05 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Jun 20 03:12:05 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=00090c96 travis: add coverity scan integration .travis.yml | 9 ++++++++- travis/main.sh | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 015172e..fb4c521 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,22 @@ # https://docs.travis-ci.com/ language: c +# Order here matters for implicit matrix generation and coverity scan. +# See travis/main.sh for details. compiler: - - clang - gcc + - clang sudo: false +# Order here matters; see compiler comment above. os: - linux +env: + global: + - secure: "qF/ueXvm1uawirfQL+jK5LSJW1P+ZVXDx5t9HljFP1jC45D/1aqEs1ffaNkvBJohUJy6mABnXN5+ZP0PoQ+ZA01t+6NDc/LrowGP87T02KGwjBukQ9tQK8zVutsT+0CY3qUPhRcaLH5Gt3c+uPDKlLndg/bXWS6cRpMt6tC3VTy+WpAlvHHfZJjSZVYp8qhCattnaZ7GvzqGqbjBZ6X7TrQnwIDdGAyg5r4xnViDxu9lO4ZH4zS6Rc7DxesrqC3zxwPRw5HLNsGbJiGQF3meXH6rVNt1uxKwwOQoDcL0NKiyAMpXwu5iGeuMILoy3KMpFwZFnhyXqMGRORakDuDNB9oMgzp+PB3Zb7TICXbhxbrQ46lSlv0VWkwn3bcJ0lek53NzDUmM2uywvCUYybPgn3xCqY9jG0zwO2ZIACc1ekGh7y0gFXfBoSZGhl1VthV5hWMJ01p/n5jK7XdDmK4G/+0wN2WlHhyvjoF6XyJ+SRC85l6VhpBNbFJA2bGT2Y4+p/CzF7M8DVYR3o+OfCWxsiZyE+Vnmpdg4U829oy97obIuBeCvBd1Vp0hoB+RpzaeqzS69N+S4tgCIXvIdu168HltFaTUPtvIGoDtIAPCaUZC8jVO22cA6RpNkac3HjpLSceYYtdkiph4VuBMwHZj6/N2+m46Y9Uxrh01KzLy/GY=" + addons: apt: packages: diff --git a/travis/main.sh b/travis/main.sh index e333685..7831298 100755 --- a/travis/main.sh +++ b/travis/main.sh @@ -2,6 +2,27 @@ . "${0%/*}"/lib.sh +# We have to do this by hand rather than use the coverity addon because of +# matrix explosion: https://github.com/travis-ci/travis-ci/issues/1975 +coverity_scan() { + local reason + [[ ${TRAVIS_JOB_NUMBER} != *.1 ]] && reason="not first build job" + [[ -n ${TRAVIS_TAG} ]] && reason="git tag" + [[ ${TRAVIS_PULL_REQUEST} == "true" ]] && reason="pull request" + if [[ -n ${reason} ]] ; then + echo "Skipping coverity scan due to: ${reason}" + return + fi + + export COVERITY_SCAN_PROJECT_NAME="${TRAVIS_REPO_SLUG}" + export COVERITY_SCAN_NOTIFICATION_EMAIL="vapier@gentoo.org" + export COVERITY_SCAN_BUILD_COMMAND="make -j${ncpus}" + export COVERITY_SCAN_BUILD_COMMAND_PREPEND="git clean -q -x -d -f; git checkout -f" + export COVERITY_SCAN_BRANCH_PATTERN="master" + + curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || : +} + main() { # For local deps like iniparser. export CPPFLAGS="-I${PWD}/../sysroot" @@ -14,5 +35,9 @@ main() { # Debug build w/ASAN and such enabled. m debug m check + + # Do scans last as they like to dirty the tree and some tests + # expect a clean tree (like code style checks). + v --fold="coverity_scan" coverity_scan } main "$@"