-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
151 lines (130 loc) · 3.66 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
stages:
- Compliance
- Build
- Analysis
variables:
IMAGE_BASE: ${CI_REGISTRY}/kwinft/ci-images/archlinux/kwinft-base
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
image: ${IMAGE_BASE}-master:latest
rules:
- if: '$COVERITY_SCAN_RUN'
when: never
- if: '$CI_COMMIT_BRANCH =~ /^Plasma\// || $CI_COMMIT_TAG'
when: never
- when: on_success
.common-stable: &common-stable
image: ${IMAGE_BASE}-stable:latest
rules:
- if: '$COVERITY_SCAN_RUN'
when: never
- if: '$CI_COMMIT_BRANCH =~ /^Plasma\// || $CI_COMMIT_TAG'
when: on_success
- when: never
####################################################################################################
#
# Compliance
#
Message Lint:
extends: .message-lint
stage: Compliance
Clang-Format:
extends: .clang-format
stage: Compliance
image: ${IMAGE_BASE}-master:latest
Localization:
stage: Compliance
image: ${IMAGE_BASE}-master:latest
script: bash tooling/i18n/compare_pot_files.sh
####################################################################################################
#
# Build
#
.common-build: &common-build
stage: Build
artifacts:
paths:
- disman-bench
- build
expire_in: 1 week
Master Build:
<<: *common-build
<<: *common-master
script:
# For now we build Disman beforehand.
- mkdir -p disman-bench/build && cd disman-bench
- git clone --branch master https://gitlab.com/kwinft/disman.git src
- cd build
- cmake -DBUILD_TESTING=Off -DCMAKE_INSTALL_PREFIX:PATH=/usr ../src
- make -j$(nproc)
- make install -j$(nproc)
- cd ../..
# Build of KDisplay
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
- make -j$(nproc)
- make install -j$(nproc)
Stable Build:
<<: *common-build
<<: *common-stable
script:
# For now we build Disman beforehand.
- mkdir -p disman-bench/build && cd disman-bench
- PLASMA_VERSION=${CI_COMMIT_BRANCH}
- if [ -z "${PLASMA_VERSION}" ];
then PLASMA_VERSION=$(echo "${CI_COMMIT_TAG}" | sed -e 's,kdisplay@\([^\.]*\.[^\.]*\)\..*,Plasma/\1,g'); fi
- echo $PLASMA_VERSION
- git clone --branch ${PLASMA_VERSION} https://gitlab.com/kwinft/disman.git src
- cd build
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../src
- make -j$(nproc)
- make install -j$(nproc)
- cd ../..
# Build of KDisplay
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
- make -j$(nproc)
- make install -j$(nproc)
####################################################################################################
#
# Analysis
#
.common-test:
extends: .tests
stage: Analysis
script:
# Install Disman.
- cd disman-bench/build
- make install -j$(nproc)
- cd ../..
# KDisplay autotesting starts here.
- cd build
- Xvfb :1 -ac -screen 0 1920x1080x24 > /dev/null 2>&1 &
- export DISPLAY=:1
- export WAYLAND_DEBUG=1 MESA_DEBUG=1 LIBGL_DEBUG=verbose
- export QT_LOGGING_RULES="*=true"
- ctest -N
- dbus-run-session ctest --output-on-failure
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