forked from winft/como
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
163 lines (137 loc) · 3.77 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# SPDX-FileCopyrightText: 2023 Roman Gilg <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0-or-later
stages:
- Compliance
- Build
- Analysis
- Deploy
variables:
IMAGE_BASE: ${CI_REGISTRY}/kwinft/ci-images/archlinux/kwinft-base
IMAGE_VERSION: master
IMAGE: ${IMAGE_BASE}-${IMAGE_VERSION}:latest
workflow:
rules:
- when: always
include:
- project: kwinft/tooling
ref: master
file:
- '/analysis/gitlab-ci/static.yml'
- '/analysis/gitlab-ci/tests.yml'
- '/docs/gitlab-ci/commits.yml'
# We use the following two job templates because we build with different images on master and
# stable branches and GitLab CI does allow to set the image name only through variable expansion.
.common-master: &common-master
rules:
- if: '$COVERITY_SCAN_RUN'
when: never
- if: '$IMAGE_VERSION != "master"'
when: never
- if: $CI_COMMIT_TAG
when: never
- when: on_success
.common-stable: &common-stable
rules:
- if: '$COVERITY_SCAN_RUN'
when: never
- if: '$IMAGE_VERSION == "stable"'
when: on_success
- if: $CI_COMMIT_TAG
variables:
IMAGE_VERSION: stable
when: on_success
- when: never
####################################################################################################
#
# Compliance
#
Message Lint:
extends: .message-lint
stage: Compliance
Clang-Format:
extends: .clang-format
stage: Compliance
image: $IMAGE
Reuse:
stage: Compliance
image: python
before_script:
pip install reuse
script:
reuse lint
####################################################################################################
#
# Build
#
Coverity Scan:
extends: .coverity-scan
stage: Build
image: $IMAGE
.common-build: &common-build
stage: Build
image: $IMAGE
script:
- mkdir build && cd build
- cmake -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage
-DCMAKE_INSTALL_PREFIX:PATH=/usr ../
- make -j$(nproc)
- make install -j$(nproc)
artifacts:
paths:
- build
expire_in: 1 week
Master Build:
<<: *common-build
<<: *common-master
Stable Build:
<<: *common-build
<<: *common-stable
####################################################################################################
#
# Analysis
#
.common-test:
extends: .tests-with-coverage
stage: Analysis
image: $IMAGE
variables:
# Following tests are currently disabled on CI:
# * lockscreen, modifier-only-shortcut: flaky on CI because the lockscreen greeter process likes to
# freeze off. Also see: https://bugreports.qt.io/browse/QTBUG-82911
# * all others: the GLES2 backend of wlroots can't be run in CI/without GPU at the moment,
# see https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2871
CTEST_ARGS: "-E 'lockscreen|modifier only shortcut|no crash empty deco|no crash no border\
|scene opengl|opengl shadow|no crash reinit compositor|buffer size change\
|no crash aurorae destroy deco|slidingpopups|scripted effects|window open close animation\
|subspace switching animation|minimize animation'"
GCOVR_ARGS: --gcov-executable '/usr/bin/llvm-cov gcov' -e tests
Master Tests:
extends: .common-test
<<: *common-master
needs:
- job: Master Build
artifacts: true
Stable Tests:
extends: .common-test
<<: *common-stable
needs:
- job: Stable Build
artifacts: true
####################################################################################################
#
# Deploy
#
Add Coverage:
extends: .add-coverage
stage: Deploy
variables:
COVERAGE_JOB: Master Tests
pages:
extends: .pages-coverage
stage: Deploy
needs:
- job: Master Tests
artifacts: true