[glib-networking/mcatanzaro/ci] Add separate scan-build CI stage
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/mcatanzaro/ci] Add separate scan-build CI stage
- Date: Wed, 8 Jul 2020 21:16:37 +0000 (UTC)
commit e7436c34282d62aaf7b158373f22ec82ce7bbc04
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jul 8 14:43:08 2020 -0500
Add separate scan-build CI stage
Let's do static analysis!
.gitlab-ci.yml | 51 +++++++++++++++++++++++++++++++++---------------
.gitlab-ci/Dockerfile | 5 ++++-
.gitlab-ci/run-docker.sh | 2 +-
3 files changed, 40 insertions(+), 18 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cb48c2e..f0f7a73 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,36 +1,55 @@
-image: registry.gitlab.gnome.org/gnome/glib-networking/master:v11
+image: registry.gitlab.gnome.org/gnome/glib-networking/master:v12
fedora-x86_64:
- tags: [ privileged ]
stage: build
script:
- # Sadly, GCC 9's LeakSanitizer is quite crashy, #86.
- # So we will run our tests under asan only once.
- - meson -Db_sanitize=address
+ - meson --prefix=$HOME/glib-networking-installed
-Dgnutls=enabled
-Dopenssl=enabled
-Dlibproxy=enabled
-Dgnome_proxy=enabled
-Dwerror=true
- build/
- - ninja -C build/
- - ASAN_OPTIONS=fast_unwind_on_malloc=0 meson test --verbose --timeout-multiplier=10 -C build/
- - rm -rf build/
+ _build/
+ - ninja -C _build/
+ - meson test -v -C _build/ --repeat=500
+ - meson install -C _build/
+ artifacts:
+ paths:
+ - _build/test-results
+ when: on_failure
- # Now again, this time without asan. We will additionally test installation.
- - meson --prefix=$HOME/glib-networking-installed
+fedora-x86_64-asan:
+ tags: [ privileged ]
+ stage: build
+ script:
+ - meson -Db_sanitize=address
-Dgnutls=enabled
-Dopenssl=enabled
-Dlibproxy=enabled
-Dgnome_proxy=enabled
-Dwerror=true
- build/
- - ninja -C build/
- - meson test -v -C build/ --repeat=500
- - meson install -C build/
+ _build/
+ - ninja -C _build/
+ - ASAN_OPTIONS=fast_unwind_on_malloc=0 meson test --verbose --timeout-multiplier=10 -C _build/
artifacts:
paths:
- - build/test-results
+ - _build/test-results
+ when: on_failure
+
+fedora-x86_64-scan-build:
+ stage: build
+ script:
+ - meson -Dgnutls=enabled
+ -Dopenssl=enabled
+ -Dlibproxy=enabled
+ -Dgnome_proxy=enabled
+ --werror
+ _build/
+ - ninja -C _build/ scan-build
+ - bash -c 'if [[ -n "$(ls -A _build/meson-logs/scanbuild/)" ]]; then echo "Scan build log found,
assuming defects exist"; exit 1; fi'
+ artifacts:
+ paths:
+ - _build/meson-logs/scanbuild
when: on_failure
vs2017-x64:
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index 2746104..8c14a2c 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -3,7 +3,10 @@ FROM fedora:rawhide
RUN dnf update -y \
&& dnf install -y 'dnf-command(builddep)' \
&& dnf builddep -y glib-networking \
- && dnf install -y libasan openssl-devel crypto-policies-scripts \
+ && dnf install -y clang-analyzer \
+ crypto-policies-scripts \
+ libasan \
+ openssl-devel \
&& dnf clean all
ARG HOST_USER_ID=5555
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index 1489459..4428417 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -2,7 +2,7 @@
set -e
-TAG="registry.gitlab.gnome.org/gnome/glib-networking/master:v11"
+TAG="registry.gitlab.gnome.org/gnome/glib-networking/master:v12"
cd "$(dirname "$0")"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]