[tracker/wip/carlosg/ci-coverity] ci: Integrate coverity builds
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/ci-coverity] ci: Integrate coverity builds
- Date: Fri, 28 Feb 2020 20:48:45 +0000 (UTC)
commit 98ec08a0e17146f26c0ee5f2cf1141574f4cba57
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Feb 28 16:30:46 2020 +0100
ci: Integrate coverity builds
This goes to (atm) its own "analysis" stage, and builds the package
with the coverity tool, so the results are uploaded to the coverity
site for analysis. This only happens for the master branch as there
is a limit on weekly builds, so can't be free for every change.
The script relies on the COVERITY_TOKEN envvar being set, which should
be done through project settings so it stays private.
.gitlab-ci.yml | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 25f4f0317..dab2ed0c6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,7 +12,7 @@ variables:
stages:
- test
-
+ - analysis
.test_template: &test
stage: test
@@ -59,3 +59,19 @@ test-fedora-latest:
test-ubuntu-rolling:
image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/ubuntu:rolling
<<: *test
+
+coverity:
+ stage: analysis
+ image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+ allow_failure: true
+ script:
+ - su tracker -c 'curl https://scan.coverity.com/download/linux64 --data
"token=$COVERITY_TOKEN&project=Tracker" --output /tmp/coverity_tool.tgz'
+ - su tracker -c 'tar zxf /tmp/coverity_tool.tgz'
+ - su tracker -c 'mkdir build'
+ - su tracker -c 'cd build; meson .. -Db_lto=true'
+ - su tracker -c 'cd build; ../cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja'
+ - su tracker -c 'tar czf cov-int.tar.gz cov-int'
+ - su tracker -c 'curl https://scan.coverity.com/builds?project=Tracker
+ --form token=$COVERITY_TOKEN --form email=carlosg gnome org
+ --form file=@cov-int.tar.gz --form version="`git describe --tags`"
+ --form description="gitlab CI build"'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]