-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.gitlab-ci.yml
114 lines (106 loc) · 3.26 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
include:
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
dist-job-name: "build-release-tarball"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
stages:
- build
- deploy
variables:
DEPENDENCIES: dbus-x11 gcc git gnome-common gtk-doc make openssh python redhat-rpm-config lcov libasan libubsan meson ninja-build systemd-devel
TARBALL_ARTIFACT_PATH: "_build/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
.build:
stage: build
image: fedora:latest
before_script:
- dnf install -y 'dnf-command(builddep)'
- dnf builddep -y gnome-keyring
- dnf install -y $DEPENDENCIES
- dbus-uuidgen --ensure
- useradd user
fedora:Werror:
extends: .build
script:
- mkdir _build
- chown user _build
- runuser -u user -- meson setup _build
- runuser -u user -- meson compile -C _build
- runuser -u user -- dbus-run-session -- meson test -C _build
artifacts:
reports:
junit: "_build/meson-logs/testlog.junit.xml"
name: "gkr-werror-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
- $TARBALL_ARTIFACT_PATH
fedora:asan:
extends: .build
tags:
- asan # LSAN needs CAP_SYS_PTRACE
script:
- mkdir _build
- chown user _build
- runuser -u user -- meson setup _build -Db_sanitize=address
- export G_SLICE=always-malloc G_DEBUG=gc-friendly ASAN_OPTIONS=abort_on_error=1:fast_unwind_on_malloc=0
- runuser -u user -- meson compile -C _build
- runuser -u user -- dbus-run-session -- meson test -C _build
allow_failure: true
artifacts:
reports:
junit: "_build/meson-logs/testlog.junit.xml"
name: "gkr-werror-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
fedora:ubsan:
extends: .build
script:
- mkdir _build
- chown user _build
- runuser -u user -- meson setup _build -Db_sanitize=undefined
- runuser -u user -- meson compile -C _build
- runuser -u user -- dbus-run-session -- meson test -C _build
artifacts:
reports:
junit: "_build/meson-logs/testlog.junit.xml"
name: "gkr-ubsan-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
fedora:coverage:
extends: .build
script:
- dnf install -y 'dnf-command(builddep)' $DEPENDENCIES lcov gcovr
- mkdir _build
- chown user _build
- runuser -u user -- meson setup _build -Db_coverage=true
- runuser -u user -- meson compile -C _build
- runuser -u user -- dbus-run-session -- meson test -C _build
- runuser -u user -- ninja coverage-xml -C _build
coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'
artifacts:
reports:
junit: "_build/meson-logs/testlog.junit.xml"
coverage_report:
coverage_format: cobertura
path: "_build/meson-logs/coverage.xml"
name: "gkr-coverage-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
build-release-tarball:
extends: .build
stage: deploy
script:
- meson setup _build
- meson dist -C _build --no-tests
artifacts:
paths:
- $TARBALL_ARTIFACT_PATH
rules:
- if: $CI_COMMIT_REF_PROTECTED