[gtk/ci-docs] ci: Add a static analysis job



commit 341b2a3d39c2a68ba603c8eb6b983f08a3aac65d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Feb 25 19:06:39 2020 +0000

    ci: Add a static analysis job
    
    Use the Clang static analysis tool.
    
    For the time being, we're going to allow it to fail, but the plan is to
    fix every issue it raises.

 .gitlab-ci.yml | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1166c50f2e..c497040add 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 stages:
   - build
+  - analysis
   - docs
   - flatpak
   - deploy
@@ -166,13 +167,26 @@ flatpak-master:icon-browser:
     APPID: org.gtk.IconBrowser4
   <<: *flatpak-master
 
+static-scan:
+  image: registry.gitlab.gnome.org/gnome/gtk/fedora:v14
+  stage: analysis
+  variables:
+    EXTRA_MESON_FLAGS: "--buildtype=debug"
+  script:
+    - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _scan_build
+    - ninja -C _scan_build scan-build
+  artifacts:
+    paths:
+      - _scan_build/meson-logs
+  allow_failure: true
+
 reference:
   image: registry.gitlab.gnome.org/gnome/gtk/fedora:v14
   stage: docs
   variables:
     EXTRA_MESON_FLAGS: "--buildtype=release"
   script:
-    - meson ${COMMON_MESON_FLAGS} -Dgtk_doc=true _build
+    - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Dgtk_doc=true _build
     - ninja -C _build gdk4-doc gsk4-doc gtk4-doc
     - mkdir -p _reference/
     - mv _build/docs/reference/gdk/html/ _reference/gdk/


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