From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 464A5138334 for ; Fri, 3 Jan 2020 14:49:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95B53E0BF1; Fri, 3 Jan 2020 14:49:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6C9B1E0BF1 for ; Fri, 3 Jan 2020 14:49:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 41B3234DCBD for ; Fri, 3 Jan 2020 14:49:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E3F053E for ; Fri, 3 Jan 2020 14:49:19 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1578062916.00c6d147bbeed3345c242d21fc237c10ddf0e023.grobian@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: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 00c6d147bbeed3345c242d21fc237c10ddf0e023 X-VCS-Branch: master Date: Fri, 3 Jan 2020 14:49: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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8c33bf4c-de15-4ad5-ab71-9c0f69a2edef X-Archives-Hash: ccad41db4c4d8e8404aa4d8b11d35c9f commit: 00c6d147bbeed3345c242d21fc237c10ddf0e023 Author: Fabian Groffen gentoo org> AuthorDate: Fri Jan 3 14:48:36 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Jan 3 14:48:36 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=00c6d147 travis: try testing on macOS, fix coverity run This is guesswork, no way to test but push to Travis... Signed-off-by: Fabian Groffen gentoo.org> .travis.yml | 39 ++++++++++++++++++------- travis/main.sh | 90 +++++++++++++++++++++------------------------------------- 2 files changed, 61 insertions(+), 68 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97c8e85..981cd4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,18 +2,32 @@ # https://docs.travis-ci.com/ language: c -# Order here matters for implicit matrix generation and coverity scan. -# See travis/main.sh for details. -compiler: - - gcc - - clang - sudo: false -# Order here matters; see compiler comment above. -os: - - linux -dist: xenial +matrix: + include: + - compiler: gcc + os: linux + dist: bionic + - compiler: clang + os: linux + dist: bionic + - compiler: coverity + os: linux + dist: bionic + env: + - COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG" + - COVERITY_SCAN_BRANCH_PATTERN="master" + - COVERITY_SCAN_NOTIFICATION_EMAIL="grobian@gentoo.org" + - COVERITY_SCAN_BUILD_COMMAND="make" + - compiler: valgrind + os: linux + dist: bionic + env: + - CFLAGS="-g" + - Q_RUN_WITH_VALGRIND=1 + - compiler: clang + os: osx env: global: @@ -25,6 +39,11 @@ addons: - libgpgme11-dev - gnupg2 - valgrind + homebrew: + packages: + - gpgme + - gnupg + #update: true before_install: - ./travis/install-blake2.sh diff --git a/travis/main.sh b/travis/main.sh index 6f55073..52a3c90 100755 --- a/travis/main.sh +++ b/travis/main.sh @@ -2,65 +2,39 @@ . "${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 -# We also do it by hand because when we're throttled, the addon will exit -# the build immediately and skip the main script! -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 +# For local deps like blake2b. +export CPPFLAGS="-I${PWD}/../sysroot" +export LDFLAGS="-L${PWD}/../sysroot" - export COVERITY_SCAN_PROJECT_NAME="${TRAVIS_REPO_SLUG}" - export COVERITY_SCAN_NOTIFICATION_EMAIL="grobian@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" +# ignore timestamps which git doesn't preserve +# disable openmp because Clang's libomp isn't installed +DEFARGS="--disable-maintainer-mode --disable-openmp" - curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || : -} - -main() { - # For local deps like blake2b. - export CPPFLAGS="-I${PWD}/../sysroot" - export LDFLAGS="-L${PWD}/../sysroot" - - # ignore timestamps which git doesn't preserve - # disable openmp because Clang's libomp isn't installed - DEFARGS="--disable-maintainer-mode --disable-openmp" - - do_run() { - v ./configure ${*} - - # Standard optimized build. - m V=1 - m check - m clean - } +do_run() { + v ./configure ${*} - do_run ${DEFARGS} - do_run ${DEFARGS} --enable-qmanifest --enable-qtegrity - do_run ${DEFARGS} --disable-qmanifest --enable-qtegrity - do_run ${DEFARGS} --enable-qmanifest --disable-qtegrity - do_run ${DEFARGS} --disable-qmanifest --disable-qtegrity - - if [[ ${TRAVIS_OS_NAME} == linux ]] ; then - export Q_RUN_WITH_VALGRIND=1 - do_run CFLAGS=-g ${DEFARGS} --enable-qmanifest --enable-qtegrity - fi - - # LSan needs sudo, which we don't use at the moment - # 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 + # Standard optimized build. + m V=1 + m check + m clean } -main "$@" + +if [[ ${CC} == coverity ]] ; then + [[ -n ${COVERITY_SCAN_TOKEN} ]] || exit 0; # don't fail on this for PRs + # 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 + # ensure we end up with an existing compiler + export CC=gcc + v ./configure ${DEFARGS} --enable-qmanifest --enable-qtegrity + curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash +elif [[ ${CC} == valgrind ]] ; then + export CC=gcc + do_run CFLAGS=-g ${DEFARGS} --enable-qmanifest --enable-qtegrity +else + do_run ${DEFARGS} + do_run ${DEFARGS} --enable-qmanifest --enable-qtegrity + do_run ${DEFARGS} --disable-qmanifest --enable-qtegrity + do_run ${DEFARGS} --enable-qmanifest --disable-qtegrity + do_run ${DEFARGS} --disable-qmanifest --disable-qtegrity +fi