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




commit 0fa4b6a4cb3604fbb1ebbf27c2620bab87e5efae
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 9be92a68a..3f4aff39e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -65,9 +65,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 &&
@@ -348,6 +348,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]