[tracker/wip/carlosg/ci-playground: 4/4] ci: Add clang static analysis task




commit 964260b6c0415886d16269518c80420fed67f1e5
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun May 16 16:05:33 2021 +0200

    ci: Add clang static analysis task
    
    This might be useful to spot code errors.

 .gitlab-ci.yml | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 30e2d8bc5..469ca008e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -60,9 +60,9 @@ check-merge-request:
 
 .tracker.fedora@common:
   variables:
-    BASE_TAG: '2021-05-15.8'
+    BASE_TAG: '2021-05-15.9'
     FDO_UPSTREAM_REPO: GNOME/tracker
-    FDO_DISTRIBUTION_PACKAGES: 'clang gcovr git libasan libubsan python3-gobject python3-pip umockdev-devel 
xmlto'
+    FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip 
umockdev-devel xmlto'
     FDO_DISTRIBUTION_EXEC: |
       dnf install -y 'dnf-command(builddep)' &&
       dnf builddep -y tracker tracker-miners --setopt=install_weak_deps=False &&
@@ -328,6 +328,21 @@ coverity:
     changes:
       - po/*.po
 
+static-scan:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker.fedora:rawhide@x86_64
+  stage: analysis
+  needs:
+    - build-fedora-rawhide-container@x86_64
+  script:
+    - meson --buildtype=debug _scan_build
+    - ninja -C _scan_build scan-build
+  artifacts:
+    paths:
+      - _scan_build/meson-logs
+  allow_failure: true
+
 pages:
   extends:
     - .fdo.distribution-image@fedora


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