public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage-utils:master commit in: /, travis/
Date: Fri,  3 Jan 2020 14:49:19 +0000 (UTC)	[thread overview]
Message-ID: <1578062916.00c6d147bbeed3345c242d21fc237c10ddf0e023.grobian@gentoo> (raw)

commit:     00c6d147bbeed3345c242d21fc237c10ddf0e023
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  3 14:48:36 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> 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 <grobian <AT> 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


             reply	other threads:[~2020-01-03 14:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03 14:49 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-12-31  9:05 [gentoo-commits] proj/portage-utils:master commit in: /, travis/ Fabian Groffen
2019-05-21 14:28 Fabian Groffen
2016-06-20  3:22 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1578062916.00c6d147bbeed3345c242d21fc237c10ddf0e023.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox