[metacity/coverity] ci: add coverity job



commit 3d86a0b3635b42f04eb6423ffc2a2bb3c7f69a73
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Mar 2 23:46:23 2020 +0200

    ci: add coverity job

 .gitlab-ci.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac   |  2 +-
 2 files changed, 54 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3b59042d..5e0374a4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 stages:
   - build
+  - analysis
 
 build-ubuntu:
   image: ubuntu:devel
@@ -41,3 +42,55 @@ build-ubuntu:
     - ./autogen.sh
     - make
     - make distcheck
+
+coverity:
+  image: ubuntu:devel
+  stage: analysis
+  when: manual
+  before_script:
+    - apt-get update
+    - apt-get install -q -y --no-install-recommends
+                      autoconf-archive
+                      automake
+                      autopoint
+                      build-essential
+                      ca-certificates
+                      clang
+                      curl
+                      gettext
+                      gsettings-desktop-schemas-dev
+                      libcanberra-gtk3-dev
+                      libglib2.0-dev
+                      libgtk-3-dev
+                      libgtop2-dev
+                      libice-dev
+                      libpango1.0-dev
+                      libsm-dev
+                      libstartup-notification0-dev
+                      libtool
+                      libvulkan-dev
+                      libx11-dev
+                      libxcomposite-dev
+                      libxcursor-dev
+                      libxdamage-dev
+                      libxext-dev
+                      libxfixes-dev
+                      libxinerama-dev
+                      libxrandr-dev
+                      libxrender-dev
+                      libxt-dev
+                      yelp-tools
+                      zenity
+  script:
+    - curl https://scan.coverity.com/download/linux64
+      --data "token=$COVERITY_TOKEN&project=metacity"
+      --output /tmp/coverity_tool.tgz
+    - tar zxf /tmp/coverity_tool.tgz
+    - CC=clang ./autogen.sh --disable-Werror
+    - ./cov-analysis-linux64-*/bin/cov-build --dir cov-int make
+    - tar czf cov-int.tar.gz cov-int
+    - curl --form token=$COVERITY_TOKEN
+      --form email=alberts muktupavels gmail com
+      --form file=@cov-int.tar.gz
+      --form version="$(autoconf --trace='AC_INIT:$2')-$CI_COMMIT_SHORT_SHA"
+      https://scan.coverity.com/builds?project=metacity
diff --git a/configure.ac b/configure.ac
index 4d6bc63f..854df619 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ dnl **************************************************************************
 dnl Initialize autoconf
 dnl **************************************************************************
 
-AC_INIT([metacity], [m_version], [m_bugzilla_url])
+AC_INIT([metacity], m_version, [m_bugzilla_url])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_SRCDIR([src/core/display.c])
 AC_CONFIG_MACRO_DIR([m4])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]