blob: a77c4037fa926fe574369c9cdac856f7ff42bc2f [file] [log] [blame]
Eric Engestrom329f5cd2019-01-20 11:21:45 +00001# This is the tag of the docker image used for the build jobs. If the
2# image doesn't exist yet, the containers-build stage generates it.
3#
4# In order to generate a new image, one should generally change the tag.
5# While removing the image from the registry would also work, that's not
6# recommended except for ephemeral images during development: Replacing
7# an image after a significant amount of time might pull in newer
8# versions of gcc/clang or other packages, which might break the build
9# with older commits using the same tag.
10#
11# After merging a change resulting in generating a new image to the
12# main repository, it's recommended to remove the image from the source
13# repository's container registry, so that the image from the main
14# repository's registry will be used there as well.
15#
16# The format of the tag is "%Y-%m-%d-${counter}" where ${counter} stays
17# at "01" unless you have multiple updates on the same day :)
18variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020019 UPSTREAM_REPO: mesa/mesa
Michel Dänzerd00b1c42019-04-02 16:56:54 +020020 DEBIAN_TAG: "2019-04-16"
21 DEBIAN_VERSION: stretch-slim
22 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020023
24include:
25 - project: 'wayland/ci-templates'
26 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
Michel Dänzerd00b1c42019-04-02 16:56:54 +020027 file: '/templates/debian.yml'
Eric Engestrom329f5cd2019-01-20 11:21:45 +000028
Eric Engestrom329f5cd2019-01-20 11:21:45 +000029stages:
30 - containers-build
Eric Engestrom46d23c02019-01-20 11:26:53 +000031 - build+test
Eric Engestrom329f5cd2019-01-20 11:21:45 +000032
33
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000034# When to automatically run the CI
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020035.ci-run-policy: &ci-run-policy
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000036 only:
Michel Dänzerb48e64f2019-04-10 10:33:13 +020037 - branches@mesa/mesa
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000038 - merge_requests
39 - /^ci([-/].*)?$/
Michel Dänzer6140ed32019-03-26 18:39:41 +010040 retry:
41 max: 2
42 when:
43 - runner_system_failure
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000044
45
Eric Engestrom329f5cd2019-01-20 11:21:45 +000046# CONTAINERS
47
Michel Dänzerd00b1c42019-04-02 16:56:54 +020048debian:
49 extends: .debian@container-ifnot-exists
Eric Engestrom329f5cd2019-01-20 11:21:45 +000050 stage: containers-build
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020051 <<: *ci-run-policy
Eric Engestrom329f5cd2019-01-20 11:21:45 +000052 variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020053 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
Michel Dänzerd00b1c42019-04-02 16:56:54 +020054 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
Eric Engestrom46d23c02019-01-20 11:26:53 +000055
56
57# BUILD
58
59.build:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020060 <<: *ci-run-policy
Michel Dänzerd00b1c42019-04-02 16:56:54 +020061 image: $DEBIAN_IMAGE
Eric Engestrom46d23c02019-01-20 11:26:53 +000062 stage: build+test
Michel Dänzera3f34f92019-03-26 18:35:59 +010063 cache:
64 paths:
65 - ccache
Eric Engestrom46d23c02019-01-20 11:26:53 +000066 artifacts:
67 when: on_failure
68 untracked: true
Eric Engestrom23b485c2019-02-12 16:59:27 +000069 # Use ccache transparently, and print stats before/after
70 before_script:
71 - export PATH="/usr/lib/ccache:$PATH"
72 - export CCACHE_BASEDIR="$PWD"
73 - export CCACHE_DIR="$PWD/ccache"
74 - export CCACHE_COMPILERCHECK=content
75 - ccache --zero-stats || true
76 - ccache --show-stats || true
77 after_script:
78 - export CCACHE_DIR="$PWD/ccache"
79 - ccache --show-stats
Eric Engestrom46d23c02019-01-20 11:26:53 +000080
81.meson-build:
82 extends: .build
Eric Engestrom23b485c2019-02-12 16:59:27 +000083 script:
Eric Engestrom46d23c02019-01-20 11:26:53 +000084 # We need to control the version of llvm-config we're using, so we'll
85 # generate a native file to do so. This requires meson >=0.49
86 - if test -n "$LLVM_VERSION"; then
87 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
88 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
89 $LLVM_CONFIG --version;
90 else
91 touch native.file;
92 fi
93 - meson --version
94 - meson _build
95 --native-file=native.file
96 -D build-tests=true
97 -D libunwind=${UNWIND}
98 ${DRI_LOADERS}
99 -D dri-drivers=${DRI_DRIVERS:-[]}
100 ${GALLIUM_ST}
101 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
102 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
Bas Nieuwenhuizen158d45d2019-03-13 00:15:09 +0100103 -D I-love-half-baked-turnips=true
Eric Engestrom46d23c02019-01-20 11:26:53 +0000104 - cd _build
105 - meson configure
Eric Engestrom68a93832019-02-13 14:25:45 +0000106 - ninja -j4
Eric Engestrom46d23c02019-01-20 11:26:53 +0000107 - ninja test
108
Eric Engestrom06b245b2019-01-23 15:46:10 +0000109.scons-build:
110 extends: .build
111 variables:
112 SCONSFLAGS: "-j4"
113 script:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000114 - if test -n "$LLVM_VERSION"; then
115 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
116 fi
Eric Engestrom06b245b2019-01-23 15:46:10 +0000117 - scons $SCONS_TARGET
118 - eval $SCONS_CHECK_COMMAND
119
Michel Dänzera2cce702019-03-20 15:58:31 +0100120# NOTE: Building SWR is 2x (yes two) times slower than all the other
121# gallium drivers combined.
122# Start this early so that it doesn't limit the total run time.
123meson-gallium-swr:
124 extends: .meson-build
125 variables:
126 UNWIND: "true"
127 DRI_LOADERS: >
128 -D glx=disabled
129 -D egl=false
130 -D gbm=false
131 GALLIUM_ST: >
132 -D dri3=false
133 -D gallium-vdpau=false
134 -D gallium-xvmc=false
135 -D gallium-omx=disabled
136 -D gallium-va=false
137 -D gallium-xa=false
138 -D gallium-nine=false
139 -D gallium-opencl=disabled
140 GALLIUM_DRIVERS: "swr"
141 LLVM_VERSION: "6.0"
142
143meson-clang:
144 extends: .meson-build
145 variables:
146 UNWIND: "true"
147 DRI_DRIVERS: "auto"
148 GALLIUM_DRIVERS: "auto"
Michel Dänzer1aca01d2019-03-26 10:04:27 +0100149 CC: "ccache clang-7"
150 CXX: "ccache clang++-7"
Michel Dänzera2cce702019-03-20 15:58:31 +0100151
Eric Engestromfaf9e402019-02-26 14:40:29 +0000152meson-vulkan:
Eric Engestrom46d23c02019-01-20 11:26:53 +0000153 extends: .meson-build
154 variables:
155 UNWIND: "false"
156 DRI_LOADERS: >
157 -D glx=disabled
158 -D gbm=false
159 -D egl=false
160 -D platforms=x11,wayland,drm
161 -D osmesa=none
162 GALLIUM_ST: >
163 -D dri3=true
164 -D gallium-vdpau=false
165 -D gallium-xvmc=false
166 -D gallium-omx=disabled
167 -D gallium-va=false
168 -D gallium-xa=false
169 -D gallium-nine=false
170 -D gallium-opencl=disabled
Bas Nieuwenhuizen158d45d2019-03-13 00:15:09 +0100171 VULKAN_DRIVERS: intel,amd,freedreno
Eric Engestrom46d23c02019-01-20 11:26:53 +0000172 LLVM_VERSION: "7"
Eric Engestrom89a74672019-01-21 09:42:37 +0000173
Eric Engestromfaf9e402019-02-26 14:40:29 +0000174meson-loader-classic-dri:
Eric Engestromd73265e2019-01-28 17:38:17 +0000175 extends: .meson-build
176 variables:
177 UNWIND: "false"
178 DRI_LOADERS: >
179 -D glx=dri
180 -D gbm=true
181 -D egl=true
182 -D platforms=x11,wayland,drm,surfaceless
183 -D osmesa=classic
184 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
185 GALLIUM_ST: >
186 -D dri3=true
187 -D gallium-vdpau=false
188 -D gallium-xvmc=false
189 -D gallium-omx=disabled
190 -D gallium-va=false
191 -D gallium-xa=false
192 -D gallium-nine=false
193 -D gallium-opencl=disabled
194
Eric Engestromfaf9e402019-02-26 14:40:29 +0000195meson-glvnd:
Eric Engestromba26bc42019-01-29 08:57:17 +0000196 extends: .meson-build
197 variables:
198 UNWIND: "true"
199 DRI_LOADERS: >
200 -D glvnd=true
201 -D egl=true
202 -D gbm=true
203 -D glx=dri
204 DRI_DRIVERS: "i965"
205 GALLIUM_ST: >
206 -D gallium-vdpau=false
207 -D gallium-xvmc=false
208 -D gallium-omx=disabled
209 -D gallium-va=false
210 -D gallium-xa=false
211 -D gallium-nine=false
212 -D gallium-opencl=disabled
213
Eric Engestromfaf9e402019-02-26 14:40:29 +0000214meson-gallium-radeonsi:
Eric Engestrom06e8f192019-01-28 17:45:26 +0000215 extends: .meson-build
216 variables:
217 UNWIND: "true"
218 DRI_LOADERS: >
219 -D glx=disabled
220 -D egl=false
221 -D gbm=false
222 GALLIUM_ST: >
223 -D dri3=false
224 -D gallium-vdpau=false
225 -D gallium-xvmc=false
226 -D gallium-omx=disabled
227 -D gallium-va=false
228 -D gallium-xa=false
229 -D gallium-nine=false
230 -D gallium-opencl=disabled
231 GALLIUM_DRIVERS: "radeonsi"
232 LLVM_VERSION: "7"
233
Eric Engestromfaf9e402019-02-26 14:40:29 +0000234meson-gallium-drivers-other:
Eric Engestromd407ead2019-01-28 17:47:09 +0000235 extends: .meson-build
236 variables:
237 UNWIND: "true"
238 DRI_LOADERS: >
239 -D glx=disabled
240 -D egl=false
241 -D gbm=false
242 GALLIUM_ST: >
243 -D dri3=false
244 -D gallium-vdpau=false
245 -D gallium-xvmc=false
246 -D gallium-omx=disabled
247 -D gallium-va=false
248 -D gallium-xa=false
249 -D gallium-nine=false
250 -D gallium-opencl=disabled
Eric Engestromda1a5a12019-04-12 15:52:00 +0100251 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima"
Eric Engestromd407ead2019-01-28 17:47:09 +0000252 LLVM_VERSION: "5.0"
253
Eric Engestrom3006f9d2019-03-06 17:59:03 +0000254meson-gallium-clover-llvm:
Eric Engestromb5a70af2019-01-28 18:05:22 +0000255 extends: .meson-build
256 variables:
257 UNWIND: "true"
258 DRI_LOADERS: >
259 -D glx=disabled
260 -D egl=false
261 -D gbm=false
262 GALLIUM_ST: >
263 -D dri3=false
264 -D gallium-vdpau=false
265 -D gallium-xvmc=false
266 -D gallium-omx=disabled
267 -D gallium-va=false
268 -D gallium-xa=false
269 -D gallium-nine=false
270 -D gallium-opencl=icd
Eric Engestrom8dab7072019-01-28 18:09:24 +0000271 GALLIUM_DRIVERS: "r600,radeonsi"
Eric Engestrom3006f9d2019-03-06 17:59:03 +0000272
273meson-gallium-clover-llvm39:
274 extends: meson-gallium-clover-llvm
275 variables:
276 GALLIUM_DRIVERS: "r600"
277 LLVM_VERSION: "3.9"
Eric Engestrom8dab7072019-01-28 18:09:24 +0000278
Eric Engestromfaf9e402019-02-26 14:40:29 +0000279meson-gallium-st-other:
Eric Engestromf33517b2019-01-28 18:13:55 +0000280 extends: .meson-build
281 variables:
282 UNWIND: "true"
283 DRI_LOADERS: >
284 -D glx=disabled
285 -D egl=false
286 -D gbm=false
287 GALLIUM_ST: >
288 -D dri3=true
Eric Engestrom8c780e52019-03-19 14:23:59 +0000289 -D gallium-extra-hud=true
Eric Engestromf33517b2019-01-28 18:13:55 +0000290 -D gallium-vdpau=true
291 -D gallium-xvmc=true
292 -D gallium-omx=bellagio
293 -D gallium-va=true
294 -D gallium-xa=true
295 -D gallium-nine=true
296 -D gallium-opencl=disabled
297 -D osmesa=gallium
298 GALLIUM_DRIVERS: "nouveau,swrast"
299 LLVM_VERSION: "5.0"
300
Eric Engestromfaf9e402019-02-26 14:40:29 +0000301scons-nollvm:
Eric Engestrom06b245b2019-01-23 15:46:10 +0000302 extends: .scons-build
303 variables:
304 SCONS_TARGET: "llvm=0"
305 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000306
Eric Engestromfaf9e402019-02-26 14:40:29 +0000307scons-llvm:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000308 extends: .scons-build
309 variables:
310 SCONS_TARGET: "llvm=1"
311 SCONS_CHECK_COMMAND: "scons llvm=1 check"
312 LLVM_VERSION: "3.9"
Eric Engestrom6a19ec92019-01-28 16:33:22 +0000313
Eric Engestromfaf9e402019-02-26 14:40:29 +0000314scons-swr:
Eric Engestrom6a19ec92019-01-28 16:33:22 +0000315 extends: .scons-build
316 variables:
317 SCONS_TARGET: "swr=1"
318 SCONS_CHECK_COMMAND: "true"
319 LLVM_VERSION: "6.0"