gitlab-ci: Move around which builds cover which swrast.
[mesa.git] / .gitlab-ci.yml
1 # 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 variables:
16 UPSTREAM_REPO: mesa/mesa
17 DEBIAN_TAG: "2019-08-08"
18 DEBIAN_VERSION: stretch-slim
19 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
20
21 include:
22 - project: 'wayland/ci-templates'
23 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
24 file: '/templates/debian.yml'
25
26 stages:
27 - containers-build
28 - build+test
29
30
31 # When to automatically run the CI
32 .ci-run-policy: &ci-run-policy
33 only:
34 - branches@mesa/mesa
35 - merge_requests
36 - /^ci([-/].*)?$/
37 retry:
38 max: 2
39 when:
40 - runner_system_failure
41
42
43 # CONTAINERS
44
45 debian:
46 extends: .debian@container-ifnot-exists
47 stage: containers-build
48 <<: *ci-run-policy
49 variables:
50 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
51 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
52
53
54 # BUILD
55
56 .build:
57 <<: *ci-run-policy
58 image: $DEBIAN_IMAGE
59 stage: build+test
60 cache:
61 paths:
62 - ccache
63 artifacts:
64 when: always
65 paths:
66 - _build/meson-logs/*.txt
67 # scons:
68 - build/*/config.log
69 - shader-db
70 variables:
71 CCACHE_COMPILERCHECK: "content"
72 # Use ccache transparently, and print stats before/after
73 before_script:
74 - export PATH="/usr/lib/ccache:$PATH"
75 - export CCACHE_BASEDIR="$PWD"
76 - export CCACHE_DIR="$PWD/ccache"
77 - ccache --zero-stats || true
78 - ccache --show-stats || true
79 after_script:
80 - export CCACHE_DIR="$PWD/ccache"
81 - ccache --show-stats
82
83 .meson-build:
84 extends: .build
85 script:
86 - .gitlab-ci/meson-build.sh
87
88 .scons-build:
89 extends: .build
90 variables:
91 SCONSFLAGS: "-j4"
92 script:
93 - if test -n "$LLVM_VERSION"; then
94 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
95 fi
96 - scons $SCONS_TARGET
97 - eval $SCONS_CHECK_COMMAND
98
99 # NOTE: Building SWR is 2x (yes two) times slower than all the other
100 # gallium drivers combined.
101 # Start this early so that it doesn't limit the total run time.
102 #
103 # We also stick the glvnd build here, since we want non-glvnd in
104 # meson-main for actual driver CI.
105 meson-swr-glvnd:
106 extends: .meson-build
107 variables:
108 UNWIND: "true"
109 DRI_LOADERS: >
110 -D glvnd=true
111 -D egl=true
112 GALLIUM_ST: >
113 -D dri3=true
114 -D gallium-vdpau=false
115 -D gallium-xvmc=false
116 -D gallium-omx=disabled
117 -D gallium-va=false
118 -D gallium-xa=false
119 -D gallium-nine=false
120 -D gallium-opencl=disabled
121 GALLIUM_DRIVERS: "swr,iris"
122 LLVM_VERSION: "6.0"
123
124 meson-clang:
125 extends: .meson-build
126 variables:
127 UNWIND: "true"
128 DRI_DRIVERS: "auto"
129 GALLIUM_DRIVERS: "auto"
130 VULKAN_DRIVERS: intel,amd,freedreno
131 CC: "ccache clang-8"
132 CXX: "ccache clang++-8"
133 before_script:
134 - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache"
135 - ccache --zero-stats --show-stats || true
136 # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so
137 - apt-get remove -y libgcc-8-dev
138
139 scons-swr:
140 extends: .scons-build
141 variables:
142 SCONS_TARGET: "swr=1"
143 SCONS_CHECK_COMMAND: "true"
144 LLVM_VERSION: "6.0"
145
146 scons-win64:
147 extends: .scons-build
148 variables:
149 SCONS_TARGET: platform=windows machine=x86_64
150 SCONS_CHECK_COMMAND: "true"
151
152 meson-main:
153 extends: .meson-build
154 variables:
155 UNWIND: "true"
156 DRI_LOADERS: >
157 -D glx=dri
158 -D gbm=true
159 -D egl=true
160 -D platforms=x11,wayland,drm,surfaceless
161 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
162 GALLIUM_ST: >
163 -D dri3=true
164 -D gallium-extra-hud=true
165 -D gallium-vdpau=true
166 -D gallium-xvmc=true
167 -D gallium-omx=bellagio
168 -D gallium-va=true
169 -D gallium-xa=true
170 -D gallium-nine=true
171 -D gallium-opencl=disabled
172 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
173 LLVM_VERSION: "7"
174 EXTRA_OPTION: >
175 -D osmesa=gallium
176 -D tools=all
177 MESON_SHADERDB: "true"
178
179 meson-clover:
180 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
196 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
205
206 meson-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"
227 EXTRA_OPTION: >
228 -D vulkan-overlay-layer=true
229
230 .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 script:
250 - .gitlab-ci/meson-build.sh
251
252 meson-armhf:
253 extends: .meson-cross
254 variables:
255 CROSS: armhf
256 VULKAN_DRIVERS: freedreno
257 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
258 # Disable the tests since we're cross compiling.
259 EXTRA_OPTION: >
260 -D build-tests=false
261 -D I-love-half-baked-turnips=true
262 -D vulkan-overlay-layer=true
263
264 meson-arm64:
265 extends: .meson-cross
266 variables:
267 CROSS: arm64
268 VULKAN_DRIVERS: freedreno
269 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
270 # Disable the tests since we're cross compiling.
271 EXTRA_OPTION: >
272 -D build-tests=false
273 -D I-love-half-baked-turnips=true
274 -D vulkan-overlay-layer=true
275
276 # While the main point of this build is testing the i386 cross build,
277 # we also use this one to test some other options that are exclusive
278 # with meson-main's choices (classic swrast and osmesa)
279 meson-i386:
280 extends: .meson-cross
281 variables:
282 CROSS: i386
283 VULKAN_DRIVERS: intel
284 DRI_DRIVERS: "swrast"
285 GALLIUM_DRIVERS: "iris"
286 # Disable i386 tests, because u_format_tests gets precision
287 # failures in dxtn unpacking
288 EXTRA_OPTION: >
289 -D build-tests=false
290 -D vulkan-overlay-layer=true
291 -D llvm=false
292 -D osmesa=classic
293
294 scons-nollvm:
295 extends: .scons-build
296 variables:
297 SCONS_TARGET: "llvm=0"
298 SCONS_CHECK_COMMAND: "scons llvm=0 check"
299
300 scons-llvm:
301 extends: .scons-build
302 variables:
303 SCONS_TARGET: "llvm=1"
304 SCONS_CHECK_COMMAND: "scons llvm=1 check"
305 LLVM_VERSION: "3.4"
306 # LLVM 3.4 packages were built with an old libstdc++ ABI
307 CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0"