[epiphany/gnome-41] ci: add script to run scan-build
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-41] ci: add script to run scan-build
- Date: Wed, 15 Dec 2021 20:42:37 +0000 (UTC)
commit fffee230ba0401c6ce96fd8c361ee58b86f8cd62
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Wed Dec 15 13:09:30 2021 -0600
ci: add script to run scan-build
This lets us pass our own args to scan-build. In particular, we can
make scan-build fail when it detects a problem, instead of manually
inspecting whether it created an HTML report.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
.gitlab-ci.yml | 3 +--
.run-scan-build | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aa2e3fcb5..b1e9cf681 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -57,8 +57,7 @@ scanbuild:
CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled'
script:
- flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
- - flatpak build flatpak_app bash -c "source /usr/lib/sdk/llvm12/enable.sh; meson --prefix=/app
${CONFIG_OPTS} _build; ninja -C _build scan-build"
- - if [[ -n "$(ls -A _build/meson-logs/scanbuild/)" ]]; then echo "Scan build log found, assuming defects
exist"; exit 1; fi
+ - flatpak build flatpak_app bash -c "source /usr/lib/sdk/llvm12/enable.sh; meson --prefix=/app
${CONFIG_OPTS} _build; SCANBUILD=$(pwd)/.run-scan-build ninja -C _build scan-build"
artifacts:
when: on_failure
paths:
diff --git a/.run-scan-build b/.run-scan-build
new file mode 100755
index 000000000..88fe82454
--- /dev/null
+++ b/.run-scan-build
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+scan-build -v --status-bugs "$@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]