gallium: trace: Add missing fence related wrappers
[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 #
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 :)
18 variables:
19 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
24 include:
25 - project: 'wayland/ci-templates'
26 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
27 file: '/templates/ubuntu.yml'
28
29 stages:
30 - containers-build
31 - build+test
32
33
34 # When to automatically run the CI
35 .ci-run-policy: &ci-run-policy
36 only:
37 - master
38 - merge_requests
39 - /^ci([-/].*)?$/
40 retry:
41 max: 2
42 when:
43 - runner_system_failure
44
45
46 # CONTAINERS
47
48 ubuntu:
49 extends: .ubuntu@container-ifnot-exists
50 stage: containers-build
51 <<: *ci-run-policy
52 variables:
53 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
54 UBUNTU_EXEC: 'bash .gitlab-ci/ubuntu-install.sh'
55
56
57 # BUILD
58
59 .build:
60 <<: *ci-run-policy
61 image: $UBUNTU_IMAGE
62 stage: build+test
63 cache:
64 paths:
65 - ccache
66 artifacts:
67 when: on_failure
68 untracked: true
69 # 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
80
81 .meson-build:
82 extends: .build
83 script:
84 # 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:-[]}
103 -D I-love-half-baked-turnips=true
104 - cd _build
105 - meson configure
106 - ninja -j4
107 - ninja test
108
109 .scons-build:
110 extends: .build
111 variables:
112 SCONSFLAGS: "-j4"
113 script:
114 - if test -n "$LLVM_VERSION"; then
115 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
116 fi
117 - scons $SCONS_TARGET
118 - eval $SCONS_CHECK_COMMAND
119
120 autotools:
121 extends: .build
122 variables:
123 MAKEFLAGS: "-j8"
124 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.
138 meson-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
158 meson-clang:
159 extends: .meson-build
160 variables:
161 UNWIND: "true"
162 DRI_DRIVERS: "auto"
163 GALLIUM_DRIVERS: "auto"
164 CC: "ccache clang-7"
165 CXX: "ccache clang++-7"
166
167 meson-vulkan:
168 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
186 VULKAN_DRIVERS: intel,amd,freedreno
187 LLVM_VERSION: "7"
188
189 meson-loader-classic-dri:
190 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
210 meson-glvnd:
211 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
229 meson-gallium-radeonsi:
230 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
249 meson-gallium-drivers-other:
250 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
266 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost"
267 LLVM_VERSION: "5.0"
268
269 meson-gallium-clover-llvm:
270 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
286 GALLIUM_DRIVERS: "r600,radeonsi"
287
288 meson-gallium-clover-llvm39:
289 extends: meson-gallium-clover-llvm
290 variables:
291 GALLIUM_DRIVERS: "r600"
292 LLVM_VERSION: "3.9"
293
294 meson-gallium-st-other:
295 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
315 scons-nollvm:
316 extends: .scons-build
317 variables:
318 SCONS_TARGET: "llvm=0"
319 SCONS_CHECK_COMMAND: "scons llvm=0 check"
320
321 scons-llvm:
322 extends: .scons-build
323 variables:
324 SCONS_TARGET: "llvm=1"
325 SCONS_CHECK_COMMAND: "scons llvm=1 check"
326 LLVM_VERSION: "3.9"
327
328 scons-swr:
329 extends: .scons-build
330 variables:
331 SCONS_TARGET: "swr=1"
332 SCONS_CHECK_COMMAND: "true"
333 LLVM_VERSION: "6.0"