CI: Add a static-scan job

This will run static analysis and publish the report on

  https://gnome.pages.gitlab.gnome.org/gnome-calendar/scanbuild
This commit is contained in:
Federico Mena Quintero
2025-05-26 18:39:08 -06:00
parent 9c7315a66a
commit 1a232ba811
2 changed files with 25 additions and 2 deletions
+17 -2
View File
@@ -72,10 +72,25 @@ coverage:
paths:
- "_build/meson-logs"
- public
static-scan:
stage: analysis
image: quay.io/gnome_infrastructure/gnome-build-meta:core-nightly
needs:
- job: build-flatpak
artifacts: false
script:
- .gitlab-ci/build-static-scan.sh
artifacts:
name: "gnome-calendar-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/meson-logs"
- public
pages:
stage: deploy
needs: [ coverage ]
needs: [ coverage, static-scan ]
script:
# No-op, just to gitlab thinks there's something to do.
# The jobs that this job depends on have already populated public/
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
set -eux -o pipefail
meson setup --buildtype=debug --prefix /usr _scan_build .
ninja -C _scan_build scan-build
mkdir -p public/
mv _scan_build/meson-logs/scanbuild public/scanbuild