-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
93 lines (86 loc) · 2.63 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
include:
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
dist-job-name: "fedora"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
stages:
- build
- analysis
- deploy
variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/msgraph/fedora:v2"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/msgraph/coverity:v2"
MESON_TEST_TIMEOUT_MULTIPLIER: 4
G_MESSAGES_DEBUG: all
# expected naming scheme for the release-service job
TARBALL_ARTIFACT_PATH: "_build/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
.only-schedules:
only:
- schedules
except:
- tags
fedora:
image: $FEDORA_IMAGE
stage: build
script:
- meson setup -Db_coverage=true _build
- ninja -C _build
- ninja -C _build test
- ninja coverage-xml -C _build
- ninja coverage-html -C _build
- git config --global --add safe.directory $CI_PROJECT_DIR
- meson dist -C _build
coverage: '/^lines:\s+([\d.]+\%)\s+/'
artifacts:
name: "msgraph-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
reports:
coverage_report:
coverage_format: cobertura
path: "_build/meson-logs/coverage.xml"
paths:
- "_build/meson-logs"
- "_build/doc"
- "_build/meson-logs/coveragereport"
- "_build/meson-dist/${CI_PROJECT_NAME}-*.tar.xz"
scan-build:
image: $FEDORA_IMAGE
stage: analysis
needs: []
script:
- meson setup --werror _scan_build -Dintrospection=false -Dgtk_doc=false
- ninja -C _scan_build scan-build
artifacts:
name: "msgraph-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
expire_in: 1 week
paths:
- "_scan_build/meson-logs/scanbuild"
coverity:
extends: .only-schedules
image: $COVERITY_IMAGE
stage: analysis
needs: []
script:
- meson setup --werror _coverity_build -Dintrospection=false -Dgtk_doc=false
- $HOME/cov-analysis-linux64-*/bin/cov-build --dir cov-int meson compile -C _coverity_build
- tar cfz cov-int.tar.gz cov-int
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
--form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
--form [email protected] --form version="$CI_COMMIT_SHA"
--form description="$CI_COMMIT_SHA / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
artifacts:
name: "msgraph-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
expire_in: 1 week
paths:
- "cov-int/build-log.txt"
pages:
stage: deploy
needs: ['fedora']
script:
- mv _build/doc/msgraph-1/ public/
- mv _build/meson-logs/coveragereport public/
artifacts:
paths:
- public