blob: e5ae08ce7777e6e2e490756fc077bdbe26e8dbab [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.
Eric Engestrom329f5cd2019-01-20 11:21:45 +000015variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020016 UPSTREAM_REPO: mesa/mesa
Eric Anholt11aa32a2019-07-11 12:58:28 -070017 DEBIAN_TAG: "2019-07-11"
Michel Dänzerd00b1c42019-04-02 16:56:54 +020018 DEBIAN_VERSION: stretch-slim
19 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020020
21include:
22 - project: 'wayland/ci-templates'
23 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
Michel Dänzerd00b1c42019-04-02 16:56:54 +020024 file: '/templates/debian.yml'
Eric Engestrom329f5cd2019-01-20 11:21:45 +000025
Eric Engestrom329f5cd2019-01-20 11:21:45 +000026stages:
27 - containers-build
Eric Engestrom46d23c02019-01-20 11:26:53 +000028 - build+test
Eric Engestrom329f5cd2019-01-20 11:21:45 +000029
30
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000031# When to automatically run the CI
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020032.ci-run-policy: &ci-run-policy
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000033 only:
Michel Dänzerb48e64f2019-04-10 10:33:13 +020034 - branches@mesa/mesa
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000035 - merge_requests
36 - /^ci([-/].*)?$/
Michel Dänzer6140ed32019-03-26 18:39:41 +010037 retry:
38 max: 2
39 when:
40 - runner_system_failure
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000041
42
Eric Engestrom329f5cd2019-01-20 11:21:45 +000043# CONTAINERS
44
Michel Dänzerd00b1c42019-04-02 16:56:54 +020045debian:
46 extends: .debian@container-ifnot-exists
Eric Engestrom329f5cd2019-01-20 11:21:45 +000047 stage: containers-build
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020048 <<: *ci-run-policy
Eric Engestrom329f5cd2019-01-20 11:21:45 +000049 variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020050 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
Michel Dänzerd00b1c42019-04-02 16:56:54 +020051 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
Eric Engestrom46d23c02019-01-20 11:26:53 +000052
53
54# BUILD
55
56.build:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020057 <<: *ci-run-policy
Michel Dänzerd00b1c42019-04-02 16:56:54 +020058 image: $DEBIAN_IMAGE
Eric Engestrom46d23c02019-01-20 11:26:53 +000059 stage: build+test
Michel Dänzera3f34f92019-03-26 18:35:59 +010060 cache:
61 paths:
62 - ccache
Eric Engestrom46d23c02019-01-20 11:26:53 +000063 artifacts:
64 when: on_failure
65 untracked: true
Michel Dänzere9de19f2019-04-04 18:01:27 +020066 variables:
67 CCACHE_COMPILERCHECK: "content"
Eric Engestrom23b485c2019-02-12 16:59:27 +000068 # Use ccache transparently, and print stats before/after
69 before_script:
70 - export PATH="/usr/lib/ccache:$PATH"
71 - export CCACHE_BASEDIR="$PWD"
72 - export CCACHE_DIR="$PWD/ccache"
Eric Engestrom23b485c2019-02-12 16:59:27 +000073 - ccache --zero-stats || true
74 - ccache --show-stats || true
75 after_script:
76 - export CCACHE_DIR="$PWD/ccache"
77 - ccache --show-stats
Eric Engestrom46d23c02019-01-20 11:26:53 +000078
79.meson-build:
80 extends: .build
Eric Engestrom23b485c2019-02-12 16:59:27 +000081 script:
Michel Dänzercc2b3a92019-05-03 10:49:43 +020082 - .gitlab-ci/meson-build.sh
Eric Engestrom46d23c02019-01-20 11:26:53 +000083
Eric Engestrom06b245b2019-01-23 15:46:10 +000084.scons-build:
85 extends: .build
86 variables:
87 SCONSFLAGS: "-j4"
88 script:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +000089 - if test -n "$LLVM_VERSION"; then
90 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
91 fi
Eric Engestrom06b245b2019-01-23 15:46:10 +000092 - scons $SCONS_TARGET
93 - eval $SCONS_CHECK_COMMAND
94
Michel Dänzera2cce702019-03-20 15:58:31 +010095# NOTE: Building SWR is 2x (yes two) times slower than all the other
96# gallium drivers combined.
97# Start this early so that it doesn't limit the total run time.
Eric Engestrom41407c62019-03-08 16:33:07 +000098#
99# We also put softpipe (and therefore gallium nine, which requires
100# it) here, since softpipe/llvmpipe can't be built alongside classic
101# swrast.
Eric Engestrom1291c682019-04-16 18:06:53 +0200102#
103# Putting glvnd here is arbitrary, but we want it in one of the builds
104# for coverage.
105meson-swr-glvnd:
Michel Dänzera2cce702019-03-20 15:58:31 +0100106 extends: .meson-build
107 variables:
108 UNWIND: "true"
109 DRI_LOADERS: >
Eric Engestrom1291c682019-04-16 18:06:53 +0200110 -D glvnd=true
111 -D egl=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100112 GALLIUM_ST: >
Eric Engestrom41407c62019-03-08 16:33:07 +0000113 -D dri3=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100114 -D gallium-vdpau=false
115 -D gallium-xvmc=false
116 -D gallium-omx=disabled
117 -D gallium-va=false
118 -D gallium-xa=false
Eric Engestrom41407c62019-03-08 16:33:07 +0000119 -D gallium-nine=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100120 -D gallium-opencl=disabled
Eric Engestrom41407c62019-03-08 16:33:07 +0000121 -D osmesa=gallium
122 GALLIUM_DRIVERS: "swr,swrast,iris"
Michel Dänzera2cce702019-03-20 15:58:31 +0100123 LLVM_VERSION: "6.0"
124
125meson-clang:
126 extends: .meson-build
127 variables:
128 UNWIND: "true"
129 DRI_DRIVERS: "auto"
130 GALLIUM_DRIVERS: "auto"
Eric Engestrom47f419d2019-05-01 12:09:26 +0100131 VULKAN_DRIVERS: intel,amd,freedreno
Michel Dänzer3fca2b72019-04-05 10:36:29 +0200132 CC: "ccache clang-8"
133 CXX: "ccache clang++-8"
Michel Dänzere9de19f2019-04-04 18:01:27 +0200134 before_script:
135 - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache"
136 - ccache --zero-stats --show-stats || true
137 # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so
138 - apt-get remove -y libgcc-8-dev
Michel Dänzera2cce702019-03-20 15:58:31 +0100139
Michel Dänzer82b30092019-05-03 18:19:25 +0200140scons-swr:
141 extends: .scons-build
Eric Engestrom46d23c02019-01-20 11:26:53 +0000142 variables:
Michel Dänzer82b30092019-05-03 18:19:25 +0200143 SCONS_TARGET: "swr=1"
144 SCONS_CHECK_COMMAND: "true"
145 LLVM_VERSION: "6.0"
146
147scons-win64:
148 extends: .scons-build
149 variables:
150 SCONS_TARGET: platform=windows machine=x86_64
151 SCONS_CHECK_COMMAND: "true"
Eric Engestrom89a74672019-01-21 09:42:37 +0000152
Eric Engestrom41407c62019-03-08 16:33:07 +0000153meson-main:
Eric Engestromd73265e2019-01-28 17:38:17 +0000154 extends: .meson-build
155 variables:
Eric Engestrom41407c62019-03-08 16:33:07 +0000156 UNWIND: "true"
Eric Engestromd73265e2019-01-28 17:38:17 +0000157 DRI_LOADERS: >
158 -D glx=dri
159 -D gbm=true
160 -D egl=true
161 -D platforms=x11,wayland,drm,surfaceless
162 -D osmesa=classic
163 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
164 GALLIUM_ST: >
165 -D dri3=true
Eric Engestrom41407c62019-03-08 16:33:07 +0000166 -D gallium-extra-hud=true
167 -D gallium-vdpau=true
168 -D gallium-xvmc=true
169 -D gallium-omx=bellagio
170 -D gallium-va=true
171 -D gallium-xa=true
Eric Engestromd73265e2019-01-28 17:38:17 +0000172 -D gallium-nine=false
173 -D gallium-opencl=disabled
Eric Engestrom41407c62019-03-08 16:33:07 +0000174 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
175 LLVM_VERSION: "7"
Eric Engestrom6a1f6092019-03-12 10:25:54 +0000176 EXTRA_OPTION: >
177 -D tools=all
Eric Engestromd73265e2019-01-28 17:38:17 +0000178
Michel Dänzer68977152019-05-03 10:58:48 +0200179meson-clover:
Eric Engestromb5a70af2019-01-28 18:05:22 +0000180 extends: .meson-build
181 variables:
182 UNWIND: "true"
183 DRI_LOADERS: >
184 -D glx=disabled
185 -D egl=false
186 -D gbm=false
187 GALLIUM_ST: >
188 -D dri3=false
189 -D gallium-vdpau=false
190 -D gallium-xvmc=false
191 -D gallium-omx=disabled
192 -D gallium-va=false
193 -D gallium-xa=false
194 -D gallium-nine=false
195 -D gallium-opencl=icd
Michel Dänzer68977152019-05-03 10:58:48 +0200196 script:
197 - export GALLIUM_DRIVERS="r600,radeonsi"
198 - .gitlab-ci/meson-build.sh
199 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
200 - export GALLIUM_DRIVERS="i915,r600"
201 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
202 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
203 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
204 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
Eric Engestrom8dab7072019-01-28 18:09:24 +0000205
Michel Dänzer82b30092019-05-03 18:19:25 +0200206meson-vulkan:
207 extends: .meson-build
208 variables:
209 UNWIND: "false"
210 DRI_LOADERS: >
211 -D glx=disabled
212 -D gbm=false
213 -D egl=false
214 -D platforms=x11,wayland,drm
215 -D osmesa=none
216 GALLIUM_ST: >
217 -D dri3=true
218 -D gallium-vdpau=false
219 -D gallium-xvmc=false
220 -D gallium-omx=disabled
221 -D gallium-va=false
222 -D gallium-xa=false
223 -D gallium-nine=false
224 -D gallium-opencl=disabled
225 VULKAN_DRIVERS: intel,amd,freedreno
226 LLVM_VERSION: "7"
Eric Engestrom5f8d29a2019-05-08 18:17:23 +0200227 EXTRA_OPTION: >
228 -D vulkan-overlay-layer=true
Michel Dänzer82b30092019-05-03 18:19:25 +0200229
Eric Anholt11aa32a2019-07-11 12:58:28 -0700230.meson-cross:
231 extends: .meson-build
232 variables:
233 UNWIND: "false"
234 DRI_LOADERS: >
235 -D glx=disabled
236 -D gbm=false
237 -D egl=false
238 -D platforms=surfaceless
239 -D osmesa=none
240 GALLIUM_ST: >
241 -D dri3=false
242 -D gallium-vdpau=false
243 -D gallium-xvmc=false
244 -D gallium-omx=disabled
245 -D gallium-va=false
246 -D gallium-xa=false
247 -D gallium-nine=false
248 -D llvm=false
249 CROSS: >
250 --libdir lib
251 --cross /tmp/cross_file.txt
252
253 script:
254 - /usr/share/meson/debcrossgen --arch ${ARCH} -o /tmp/cross_file.txt
255 # Work around a bug in debcrossgen that should be fixed in the next release
256 - sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" /tmp/cross_file.txt
257 - .gitlab-ci/meson-build.sh
258
259meson-armhf:
260 extends: .meson-cross
261 variables:
262 ARCH: armhf
263 VULKAN_DRIVERS: freedreno
264 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
265 # Disable the tests since we're cross compiling.
266 EXTRA_OPTION: >
267 -D build-tests=false
268 -D I-love-half-baked-turnips=true
269 -D vulkan-overlay-layer=true
270
271meson-arm64:
272 extends: .meson-cross
273 variables:
274 ARCH: arm64
275 VULKAN_DRIVERS: freedreno
276 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
277 # Disable the tests since we're cross compiling.
278 EXTRA_OPTION: >
279 -D build-tests=false
280 -D I-love-half-baked-turnips=true
281 -D vulkan-overlay-layer=true
282
283meson-i386:
284 extends: .meson-cross
285 variables:
286 ARCH: i386
287 VULKAN_DRIVERS: intel
288 GALLIUM_DRIVERS: "swrast"
289 # Disable i386 tests, because u_format_tests gets precision
290 # failures in dxtn unpacking
291 EXTRA_OPTION: >
292 -D build-tests=false
293 -D vulkan-overlay-layer=true
294
Eric Engestromfaf9e402019-02-26 14:40:29 +0000295scons-nollvm:
Eric Engestrom06b245b2019-01-23 15:46:10 +0000296 extends: .scons-build
297 variables:
298 SCONS_TARGET: "llvm=0"
299 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000300
Eric Engestromfaf9e402019-02-26 14:40:29 +0000301scons-llvm:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000302 extends: .scons-build
303 variables:
304 SCONS_TARGET: "llvm=1"
305 SCONS_CHECK_COMMAND: "scons llvm=1 check"
Michel Dänzer9b2473c2019-04-11 18:38:30 +0200306 LLVM_VERSION: "3.4"
307 # LLVM 3.4 packages were built with an old libstdc++ ABI
308 CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0"