ci: Add clang build

This commit is contained in:
Guido Günther
2024-05-17 06:24:50 +00:00
committed by Guido Günther
parent a188cdde7c
commit 2db8e8f820
+26 -5
View File
@@ -21,8 +21,10 @@ workflow:
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y upgrade
- apt-get -y build-dep .
- apt-get -y install gcovr git
- '[ -z "${EXTRA_PKGS}" ] || echo "Extra packages: ${EXTRA_PKGS}"'
- apt-get -y install gcovr git build-essential ${EXTRA_PKGS}
.image: &image
image:
@@ -33,7 +35,7 @@ workflow:
- librem5:arm64
# Regular, full build
build:native-debian-trixie:full:
build:gcc:native-debian-trixie:full:
<<: *tags
<<: *image
<<: *before_script
@@ -49,25 +51,44 @@ build:native-debian-trixie:full:
- $PKG_ONLY == "1"
# Minimal build for e.g. submodule usage
build:native-debian-trixie:lib:
build:gcc:native-debian-trixie:lib:
<<: *tags
<<: *image
<<: *before_script
stage: build
script:
- meson --werror -Ddaemon=false -Dgtk_doc=false setup _build
- meson setup --werror -Ddaemon=false -Dgtk_doc=false _build
- meson compile -C _build
except:
variables:
- $PKG_ONLY == "1"
# Build using clang
build:clang:native-debian-trixie:full:
variables:
EXTRA_PKGS: clang
<<: *tags
<<: *image
<<: *before_script
stage: build
artifacts:
paths:
- _build
script:
- CC=clang meson setup --werror _build
- meson compile -C _build
except:
variables:
- $PKG_ONLY == "1"
allow_failure: true
test:native-debian-trixie:
<<: *tags
<<: *image
<<: *before_script
stage: test
needs:
- build:native-debian-trixie:full
- build:gcc:native-debian-trixie:full
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
script:
- dbus-run-session ninja -C _build test coverage