blob: a923dd7af0cbb52e96db9f8c2c567b25c24ab621 [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
20 UBUNTU_TAG: "2019-04-02"
21 UBUNTU_VERSION: bionic
22 UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG"
23
24include:
25 - project: 'wayland/ci-templates'
26 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
27 file: '/templates/ubuntu.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:
37 - master
38 - 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
Eric Engestromfaf9e402019-02-26 14:40:29 +000048ubuntu:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020049 extends: .ubuntu@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
54 UBUNTU_EXEC: 'bash .gitlab-ci/ubuntu-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
Eric Engestrom46d23c02019-01-20 11:26:53 +000061 image: $UBUNTU_IMAGE
62 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 +0100120autotools:
121 extends: .build
122 variables:
Michel Dänzer6d0a7f72019-03-20 11:00:06 +0100123 MAKEFLAGS: "-j8"
Michel Dänzera2cce702019-03-20 15:58:31 +0100124 LLVM_CONFIG: llvm-config-7
125 script:
126 - mkdir build
127 - cd build
128 - ../autogen.sh
129 --enable-autotools
130 --enable-debug
131 --disable-llvm-shared-libs
132 - make
133 - make check
134
135# NOTE: Building SWR is 2x (yes two) times slower than all the other
136# gallium drivers combined.
137# Start this early so that it doesn't limit the total run time.
138meson-gallium-swr:
139 extends: .meson-build
140 variables:
141 UNWIND: "true"
142 DRI_LOADERS: >
143 -D glx=disabled
144 -D egl=false
145 -D gbm=false
146 GALLIUM_ST: >
147 -D dri3=false
148 -D gallium-vdpau=false
149 -D gallium-xvmc=false
150 -D gallium-omx=disabled
151 -D gallium-va=false
152 -D gallium-xa=false
153 -D gallium-nine=false
154 -D gallium-opencl=disabled
155 GALLIUM_DRIVERS: "swr"
156 LLVM_VERSION: "6.0"
157
158meson-clang:
159 extends: .meson-build
160 variables:
161 UNWIND: "true"
162 DRI_DRIVERS: "auto"
163 GALLIUM_DRIVERS: "auto"
Michel Dänzer1aca01d2019-03-26 10:04:27 +0100164 CC: "ccache clang-7"
165 CXX: "ccache clang++-7"
Michel Dänzera2cce702019-03-20 15:58:31 +0100166
Eric Engestromfaf9e402019-02-26 14:40:29 +0000167meson-vulkan:
Eric Engestrom46d23c02019-01-20 11:26:53 +0000168 extends: .meson-build
169 variables:
170 UNWIND: "false"
171 DRI_LOADERS: >
172 -D glx=disabled
173 -D gbm=false
174 -D egl=false
175 -D platforms=x11,wayland,drm
176 -D osmesa=none
177 GALLIUM_ST: >
178 -D dri3=true
179 -D gallium-vdpau=false
180 -D gallium-xvmc=false
181 -D gallium-omx=disabled
182 -D gallium-va=false
183 -D gallium-xa=false
184 -D gallium-nine=false
185 -D gallium-opencl=disabled
Bas Nieuwenhuizen158d45d2019-03-13 00:15:09 +0100186 VULKAN_DRIVERS: intel,amd,freedreno
Eric Engestrom46d23c02019-01-20 11:26:53 +0000187 LLVM_VERSION: "7"
Eric Engestrom89a74672019-01-21 09:42:37 +0000188
Eric Engestromfaf9e402019-02-26 14:40:29 +0000189meson-loader-classic-dri:
Eric Engestromd73265e2019-01-28 17:38:17 +0000190 extends: .meson-build
191 variables:
192 UNWIND: "false"
193 DRI_LOADERS: >
194 -D glx=dri
195 -D gbm=true
196 -D egl=true
197 -D platforms=x11,wayland,drm,surfaceless
198 -D osmesa=classic
199 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
200 GALLIUM_ST: >
201 -D dri3=true
202 -D gallium-vdpau=false
203 -D gallium-xvmc=false
204 -D gallium-omx=disabled
205 -D gallium-va=false
206 -D gallium-xa=false
207 -D gallium-nine=false
208 -D gallium-opencl=disabled
209
Eric Engestromfaf9e402019-02-26 14:40:29 +0000210meson-glvnd:
Eric Engestromba26bc42019-01-29 08:57:17 +0000211 extends: .meson-build
212 variables:
213 UNWIND: "true"
214 DRI_LOADERS: >
215 -D glvnd=true
216 -D egl=true
217 -D gbm=true
218 -D glx=dri
219 DRI_DRIVERS: "i965"
220 GALLIUM_ST: >
221 -D gallium-vdpau=false
222 -D gallium-xvmc=false
223 -D gallium-omx=disabled
224 -D gallium-va=false
225 -D gallium-xa=false
226 -D gallium-nine=false
227 -D gallium-opencl=disabled
228
Eric Engestromfaf9e402019-02-26 14:40:29 +0000229meson-gallium-radeonsi:
Eric Engestrom06e8f192019-01-28 17:45:26 +0000230 extends: .meson-build
231 variables:
232 UNWIND: "true"
233 DRI_LOADERS: >
234 -D glx=disabled
235 -D egl=false
236 -D gbm=false
237 GALLIUM_ST: >
238 -D dri3=false
239 -D gallium-vdpau=false
240 -D gallium-xvmc=false
241 -D gallium-omx=disabled
242 -D gallium-va=false
243 -D gallium-xa=false
244 -D gallium-nine=false
245 -D gallium-opencl=disabled
246 GALLIUM_DRIVERS: "radeonsi"
247 LLVM_VERSION: "7"
248
Eric Engestromfaf9e402019-02-26 14:40:29 +0000249meson-gallium-drivers-other:
Eric Engestromd407ead2019-01-28 17:47:09 +0000250 extends: .meson-build
251 variables:
252 UNWIND: "true"
253 DRI_LOADERS: >
254 -D glx=disabled
255 -D egl=false
256 -D gbm=false
257 GALLIUM_ST: >
258 -D dri3=false
259 -D gallium-vdpau=false
260 -D gallium-xvmc=false
261 -D gallium-omx=disabled
262 -D gallium-va=false
263 -D gallium-xa=false
264 -D gallium-nine=false
265 -D gallium-opencl=disabled
Eric Engestromdb944992019-03-09 22:53:27 +0000266 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost"
Eric Engestromd407ead2019-01-28 17:47:09 +0000267 LLVM_VERSION: "5.0"
268
Eric Engestrom3006f9d2019-03-06 17:59:03 +0000269meson-gallium-clover-llvm:
Eric Engestromb5a70af2019-01-28 18:05:22 +0000270 extends: .meson-build
271 variables:
272 UNWIND: "true"
273 DRI_LOADERS: >
274 -D glx=disabled
275 -D egl=false
276 -D gbm=false
277 GALLIUM_ST: >
278 -D dri3=false
279 -D gallium-vdpau=false
280 -D gallium-xvmc=false
281 -D gallium-omx=disabled
282 -D gallium-va=false
283 -D gallium-xa=false
284 -D gallium-nine=false
285 -D gallium-opencl=icd
Eric Engestrom8dab7072019-01-28 18:09:24 +0000286 GALLIUM_DRIVERS: "r600,radeonsi"
Eric Engestrom3006f9d2019-03-06 17:59:03 +0000287
288meson-gallium-clover-llvm39:
289 extends: meson-gallium-clover-llvm
290 variables:
291 GALLIUM_DRIVERS: "r600"
292 LLVM_VERSION: "3.9"
Eric Engestrom8dab7072019-01-28 18:09:24 +0000293
Eric Engestromfaf9e402019-02-26 14:40:29 +0000294meson-gallium-st-other:
Eric Engestromf33517b2019-01-28 18:13:55 +0000295 extends: .meson-build
296 variables:
297 UNWIND: "true"
298 DRI_LOADERS: >
299 -D glx=disabled
300 -D egl=false
301 -D gbm=false
302 GALLIUM_ST: >
303 -D dri3=true
304 -D gallium-vdpau=true
305 -D gallium-xvmc=true
306 -D gallium-omx=bellagio
307 -D gallium-va=true
308 -D gallium-xa=true
309 -D gallium-nine=true
310 -D gallium-opencl=disabled
311 -D osmesa=gallium
312 GALLIUM_DRIVERS: "nouveau,swrast"
313 LLVM_VERSION: "5.0"
314
Eric Engestromfaf9e402019-02-26 14:40:29 +0000315scons-nollvm:
Eric Engestrom06b245b2019-01-23 15:46:10 +0000316 extends: .scons-build
317 variables:
318 SCONS_TARGET: "llvm=0"
319 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000320
Eric Engestromfaf9e402019-02-26 14:40:29 +0000321scons-llvm:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000322 extends: .scons-build
323 variables:
324 SCONS_TARGET: "llvm=1"
325 SCONS_CHECK_COMMAND: "scons llvm=1 check"
326 LLVM_VERSION: "3.9"
Eric Engestrom6a19ec92019-01-28 16:33:22 +0000327
Eric Engestromfaf9e402019-02-26 14:40:29 +0000328scons-swr:
Eric Engestrom6a19ec92019-01-28 16:33:22 +0000329 extends: .scons-build
330 variables:
331 SCONS_TARGET: "swr=1"
332 SCONS_CHECK_COMMAND: "true"
333 LLVM_VERSION: "6.0"