travis: meson: enable unit tests
[mesa.git] / .travis.yml
1 language: c
2
3 dist: xenial
4
5 cache:
6 apt: true
7 ccache: true
8
9 env:
10 global:
11 - XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
12 - XCB_RELEASES=https://xcb.freedesktop.org/dist
13 - WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
14 - XORGMACROS_VERSION=util-macros-1.19.0
15 - GLPROTO_VERSION=glproto-1.4.17
16 - DRI2PROTO_VERSION=dri2proto-2.8
17 - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
18 - LIBDRM_VERSION=libdrm-2.4.95
19 - XCBPROTO_VERSION=xcb-proto-1.13
20 - RANDRPROTO_VERSION=randrproto-1.3.0
21 - LIBXRANDR_VERSION=libXrandr-1.3.0
22 - LIBXCB_VERSION=libxcb-1.13
23 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
24 - LIBVDPAU_VERSION=libvdpau-1.1
25 - LIBVA_VERSION=libva-1.7.0
26 - LIBWAYLAND_VERSION=wayland-1.15.0
27 - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
28 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
29 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
30 - PATH="$HOME/prefix/bin:$PATH"
31
32 matrix:
33 include:
34 - env:
35 - LABEL="meson Vulkan"
36 - BUILD=meson
37 - DRI_DRIVERS=""
38 - GALLIUM_DRIVERS=""
39 - VULKAN_DRIVERS="intel,amd"
40 - LLVM_VERSION=7
41 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
42 addons:
43 apt:
44 sources:
45 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
46 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
47 packages:
48 - llvm-7-dev
49 # Common
50 - xz-utils
51 - libexpat1-dev
52 - libx11-xcb-dev
53 - libelf-dev
54 - python3.5
55 - python3-pip
56 - python3-setuptools
57 - env:
58 - LABEL="meson loaders/classic DRI"
59 - BUILD=meson
60 - DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
61 - GALLIUM_DRIVERS=""
62 - VULKAN_DRIVERS=""
63 addons:
64 apt:
65 packages:
66 - xz-utils
67 - x11proto-xf86vidmode-dev
68 - libxxf86vm-dev
69 - libexpat1-dev
70 - libx11-xcb-dev
71 - libxdamage-dev
72 - libxfixes-dev
73 - python3.5
74 - python3-pip
75 - python3-setuptools
76 - env:
77 - LABEL="make loaders/classic DRI"
78 - BUILD=make
79 - MAKEFLAGS="-j4"
80 - MAKE_CHECK_COMMAND="make check"
81 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
82 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
83 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
84 - GALLIUM_DRIVERS=""
85 - VULKAN_DRIVERS=""
86 - LIBUNWIND_FLAGS="--disable-libunwind"
87 addons:
88 apt:
89 packages:
90 - xz-utils
91 - x11proto-xf86vidmode-dev
92 - libxxf86vm-dev
93 - libexpat1-dev
94 - libx11-xcb-dev
95 - libxdamage-dev
96 - libxfixes-dev
97 - python3-pip
98 - python3-setuptools
99 - env:
100 # NOTE: Building SWR is 2x (yes two) times slower than all the other
101 # gallium drivers combined.
102 # Start this early so that it doesn't hunder the run time.
103 - LABEL="make Gallium Drivers SWR"
104 - BUILD=make
105 - MAKEFLAGS="-j4"
106 - MAKE_CHECK_COMMAND="true"
107 - LLVM_VERSION=6.0
108 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
109 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
110 - DRI_DRIVERS=""
111 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
112 - GALLIUM_DRIVERS="swr"
113 - VULKAN_DRIVERS=""
114 - LIBUNWIND_FLAGS="--enable-libunwind"
115 addons:
116 apt:
117 packages:
118 - llvm-6.0-dev
119 # Common
120 - xz-utils
121 - libexpat1-dev
122 - libx11-xcb-dev
123 - libelf-dev
124 - libunwind8-dev
125 - python3-pip
126 - python3-setuptools
127 - env:
128 - LABEL="make Gallium Drivers RadeonSI"
129 - BUILD=make
130 - MAKEFLAGS="-j4"
131 - MAKE_CHECK_COMMAND="true"
132 - LLVM_VERSION=7
133 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
134 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
135 - DRI_DRIVERS=""
136 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
137 - GALLIUM_DRIVERS="radeonsi"
138 - VULKAN_DRIVERS=""
139 - LIBUNWIND_FLAGS="--enable-libunwind"
140 addons:
141 apt:
142 sources:
143 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
144 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
145 packages:
146 # From sources above
147 - llvm-7-dev
148 # Common
149 - xz-utils
150 - libexpat1-dev
151 - libx11-xcb-dev
152 - libelf-dev
153 - libunwind8-dev
154 - python3-pip
155 - python3-setuptools
156 - env:
157 - LABEL="make Gallium Drivers Other"
158 - BUILD=make
159 - MAKEFLAGS="-j4"
160 - MAKE_CHECK_COMMAND="true"
161 - LLVM_VERSION=3.9
162 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
163 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
164 - DRI_DRIVERS=""
165 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
166 - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,imx"
167 - VULKAN_DRIVERS=""
168 - LIBUNWIND_FLAGS="--enable-libunwind"
169 addons:
170 apt:
171 packages:
172 # LLVM packaging is broken and misses these dependencies
173 - libedit-dev
174 - llvm-3.9-dev
175 # Common
176 - xz-utils
177 - libexpat1-dev
178 - libx11-xcb-dev
179 - libelf-dev
180 - libunwind8-dev
181 - python3-pip
182 - python3-setuptools
183 - env:
184 - LABEL="make Gallium ST Clover LLVM-3.9"
185 - BUILD=make
186 - MAKEFLAGS="-j4"
187 - MAKE_CHECK_COMMAND="true"
188 - LLVM_VERSION=3.9
189 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
190 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
191 - DRI_DRIVERS=""
192 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
193 - GALLIUM_DRIVERS="r600"
194 - VULKAN_DRIVERS=""
195 - LIBUNWIND_FLAGS="--enable-libunwind"
196 addons:
197 apt:
198 packages:
199 - libclc-dev
200 # LLVM packaging is broken and misses these dependencies
201 - libedit-dev
202 - llvm-3.9-dev
203 - clang-3.9
204 - libclang-3.9-dev
205 # Common
206 - xz-utils
207 - libexpat1-dev
208 - libx11-xcb-dev
209 - libelf-dev
210 - libunwind8-dev
211 - python3-pip
212 - python3-setuptools
213 - env:
214 - LABEL="make Gallium ST Clover LLVM-4.0"
215 - BUILD=make
216 - MAKEFLAGS="-j4"
217 - MAKE_CHECK_COMMAND="true"
218 - LLVM_VERSION=4.0
219 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
220 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
221 - DRI_DRIVERS=""
222 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
223 - GALLIUM_DRIVERS="r600"
224 - VULKAN_DRIVERS=""
225 - LIBUNWIND_FLAGS="--enable-libunwind"
226 addons:
227 apt:
228 packages:
229 - libclc-dev
230 # LLVM packaging is broken and misses these dependencies
231 - libedit-dev
232 - llvm-4.0-dev
233 - clang-4.0
234 - libclang-4.0-dev
235 # Common
236 - xz-utils
237 - libexpat1-dev
238 - libx11-xcb-dev
239 - libelf-dev
240 - libunwind8-dev
241 - python3-pip
242 - python3-setuptools
243 - env:
244 - LABEL="make Gallium ST Clover LLVM-5.0"
245 - BUILD=make
246 - MAKEFLAGS="-j4"
247 - MAKE_CHECK_COMMAND="true"
248 - LLVM_VERSION=5.0
249 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
250 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
251 - DRI_DRIVERS=""
252 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
253 - GALLIUM_DRIVERS="r600"
254 - VULKAN_DRIVERS=""
255 - LIBUNWIND_FLAGS="--enable-libunwind"
256 addons:
257 apt:
258 packages:
259 - libclc-dev
260 # LLVM packaging is broken and misses these dependencies
261 - libedit-dev
262 - llvm-5.0-dev
263 - clang-5.0
264 - libclang-5.0-dev
265 # Common
266 - xz-utils
267 - libexpat1-dev
268 - libx11-xcb-dev
269 - libelf-dev
270 - libunwind8-dev
271 - python3-pip
272 - python3-setuptools
273 - env:
274 - LABEL="make Gallium ST Clover LLVM-6.0"
275 - BUILD=make
276 - MAKEFLAGS="-j4"
277 - MAKE_CHECK_COMMAND="true"
278 - LLVM_VERSION=6.0
279 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
280 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
281 - DRI_DRIVERS=""
282 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
283 - GALLIUM_DRIVERS="r600"
284 - VULKAN_DRIVERS=""
285 - LIBUNWIND_FLAGS="--enable-libunwind"
286 addons:
287 apt:
288 packages:
289 - libclc-dev
290 - llvm-6.0-dev
291 - clang-6.0
292 - libclang-6.0-dev
293 # Common
294 - xz-utils
295 - libexpat1-dev
296 - libx11-xcb-dev
297 - libelf-dev
298 - libunwind8-dev
299 - python3-pip
300 - python3-setuptools
301 - env:
302 - LABEL="make Gallium ST Clover LLVM-7"
303 - BUILD=make
304 - MAKEFLAGS="-j4"
305 - MAKE_CHECK_COMMAND="true"
306 - LLVM_VERSION=7
307 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
308 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
309 - DRI_DRIVERS=""
310 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
311 - GALLIUM_DRIVERS="r600,radeonsi"
312 - VULKAN_DRIVERS=""
313 - LIBUNWIND_FLAGS="--enable-libunwind"
314 addons:
315 apt:
316 sources:
317 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
318 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
319 packages:
320 - libclc-dev
321 # From sources above
322 - llvm-7-dev
323 - clang-7
324 - libclang-7-dev
325 # Common
326 - xz-utils
327 - libexpat1-dev
328 - libx11-xcb-dev
329 - libelf-dev
330 - libunwind8-dev
331 - env:
332 - LABEL="make Gallium ST Other"
333 - BUILD=make
334 - MAKEFLAGS="-j4"
335 - MAKE_CHECK_COMMAND="true"
336 - LLVM_VERSION=3.5
337 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
338 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
339 - DRI_DRIVERS=""
340 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
341 # We need swrast for osmesa and nine.
342 # i915 most likely doesn't work with most ST.
343 # Regardless - we're doing a quick build test here.
344 - GALLIUM_DRIVERS="i915,swrast"
345 - VULKAN_DRIVERS=""
346 - LIBUNWIND_FLAGS="--enable-libunwind"
347 addons:
348 apt:
349 packages:
350 # We actually want to test against llvm-3.3, yet 3.5 is available
351 - llvm-3.5-dev
352 # Nine requires gcc 4.6... which is the one we have right ?
353 - libxvmc-dev
354 # Build locally, for now.
355 #- libvdpau-dev
356 #- libva-dev
357 - libomxil-bellagio-dev
358 # LLVM packaging is broken and misses these dependencies
359 - libedit-dev
360 # Common
361 - xz-utils
362 - libexpat1-dev
363 - libx11-xcb-dev
364 - libelf-dev
365 - libunwind8-dev
366 - python3-pip
367 - python3-setuptools
368 - env:
369 - LABEL="make Vulkan"
370 - BUILD=make
371 - MAKEFLAGS="-j4"
372 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
373 - LLVM_VERSION=7
374 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
375 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
376 - DRI_DRIVERS=""
377 - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
378 - GALLIUM_DRIVERS=""
379 - VULKAN_DRIVERS="intel,radeon"
380 - LIBUNWIND_FLAGS="--disable-libunwind"
381 addons:
382 apt:
383 sources:
384 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
385 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
386 packages:
387 # From sources above
388 - llvm-7-dev
389 # Common
390 - xz-utils
391 - libexpat1-dev
392 - libx11-xcb-dev
393 - libelf-dev
394 - python3-pip
395 - python3-setuptools
396 - env:
397 - LABEL="scons"
398 - BUILD=scons
399 - SCONSFLAGS="-j4"
400 # Explicitly disable.
401 - SCONS_TARGET="llvm=0"
402 # Keep it symmetrical to the make build.
403 - SCONS_CHECK_COMMAND="scons llvm=0 check"
404 addons:
405 apt:
406 packages:
407 # Common
408 - xz-utils
409 - x11proto-xf86vidmode-dev
410 - libexpat1-dev
411 - libx11-xcb-dev
412 - libelf-dev
413 - env:
414 - LABEL="scons LLVM"
415 - BUILD=scons
416 - SCONSFLAGS="-j4"
417 - SCONS_TARGET="llvm=1"
418 # Keep it symmetrical to the make build.
419 - SCONS_CHECK_COMMAND="scons llvm=1 check"
420 - LLVM_VERSION=3.5
421 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
422 addons:
423 apt:
424 packages:
425 # LLVM packaging is broken and misses these dependencies
426 - libedit-dev
427 # We actually want to test against llvm-3.3, yet 3.5 is available
428 - llvm-3.5-dev
429 # Common
430 - xz-utils
431 - x11proto-xf86vidmode-dev
432 - libexpat1-dev
433 - libx11-xcb-dev
434 - libelf-dev
435 - env:
436 - LABEL="scons SWR"
437 - BUILD=scons
438 - SCONSFLAGS="-j4"
439 - SCONS_TARGET="swr=1"
440 - LLVM_VERSION=6.0
441 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
442 # Keep it symmetrical to the make build. There's no actual SWR, yet.
443 - SCONS_CHECK_COMMAND="true"
444 addons:
445 apt:
446 packages:
447 - llvm-6.0-dev
448 # Common
449 - xz-utils
450 - x11proto-xf86vidmode-dev
451 - libexpat1-dev
452 - libx11-xcb-dev
453 - libelf-dev
454 - env:
455 - LABEL="macOS make"
456 - BUILD=make
457 - MAKEFLAGS="-j4"
458 - MAKE_CHECK_COMMAND="make check"
459 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
460 os: osx
461 - env:
462 - LABEL="macOS meson"
463 - BUILD=meson
464 os: osx
465
466 before_install:
467 - |
468 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
469 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
470 # Set PATH for homebrew pip3 installs
471 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
472 # Set PKG_CONFIG_PATH for keg-only expat
473 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
474 # Set PATH for keg-only gettext
475 PATH="/usr/local/opt/gettext/bin:${PATH}"
476
477 # Install xquartz for prereqs ...
478 XQUARTZ_VERSION="2.7.11"
479 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
480 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
481 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
482 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
483 # ... and set paths
484 PATH="/opt/X11/bin:${PATH}"
485 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
486 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
487 fi
488
489 install:
490 # Install a more modern meson from pip, since the version in the
491 # ubuntu repos is often quite old.
492 - if test "x$BUILD" = xmeson; then
493 pip3 install --user meson;
494 pip3 install --user mako;
495 fi
496
497 # Install autotools build dependencies
498 - if test "x$BUILD" = xmake; then
499 pip2 install --user mako;
500 fi
501
502 # Install a more modern scons from pip.
503 - if test "x$BUILD" = xscons; then
504 pip2 install --user "scons>=2.4";
505 pip2 install --user mako;
506 fi
507
508 # Install dependencies where we require specific versions (or where
509 # disallowed by Travis CI's package whitelisting).
510
511 - |
512 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
513 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
514 tar -jxvf $XORGMACROS_VERSION.tar.bz2
515 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
516
517 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
518 tar -jxvf $GLPROTO_VERSION.tar.bz2
519 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
520
521 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
522 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
523 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
524
525 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
526 tar -jxvf $XCBPROTO_VERSION.tar.bz2
527 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
528
529 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
530 tar -jxvf $LIBXCB_VERSION.tar.bz2
531 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
532
533 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
534 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
535 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
536
537 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
538 tar -jxvf $LIBDRM_VERSION.tar.bz2
539 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
540
541 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
542 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
543 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
544
545 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
546 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
547 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
548
549 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
550 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
551 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
552
553 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
554 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
555 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
556
557 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
558 tar -jxvf $LIBVA_VERSION.tar.bz2
559 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
560
561 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
562 tar -axvf $LIBWAYLAND_VERSION.tar.xz
563 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
564
565 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
566 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
567 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
568
569 # Meson requires ninja >= 1.6, but xenial has 1.3.x
570 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
571 unzip ninja-linux.zip
572 mv ninja $HOME/prefix/bin/
573
574 # Generate this header since one is missing on the Travis instance
575 mkdir -p linux
576 printf "%s\n" \
577 "#ifndef _LINUX_MEMFD_H" \
578 "#define _LINUX_MEMFD_H" \
579 "" \
580 "#define MFD_CLOEXEC 0x0001U" \
581 "#define MFD_ALLOW_SEALING 0x0002U" \
582 "" \
583 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
584
585 # Generate this header, including the missing SYS_memfd_create
586 # macro, which is not provided by the header in the Travis
587 # instance
588 mkdir -p sys
589 printf "%s\n" \
590 "#ifndef _SYSCALL_H" \
591 "#define _SYSCALL_H 1" \
592 "" \
593 "#include <asm/unistd.h>" \
594 "" \
595 "#ifndef _LIBC" \
596 "# include <bits/syscall.h>" \
597 "#endif" \
598 "" \
599 "#ifndef __NR_memfd_create" \
600 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
601 "#endif" \
602 "" \
603 "#ifndef SYS_memfd_create" \
604 "# define SYS_memfd_create __NR_memfd_create" \
605 "#endif" \
606 "" \
607 "#endif" > sys/syscall.h
608 fi
609
610 script:
611 - if test "x$BUILD" = xmake; then
612 export CFLAGS="$CFLAGS -isystem`pwd`";
613
614 mkdir build &&
615 cd build &&
616 ../autogen.sh --enable-debug
617 $LIBUNWIND_FLAGS
618 $DRI_LOADERS
619 --with-dri-drivers=$DRI_DRIVERS
620 $GALLIUM_ST
621 --with-gallium-drivers=$GALLIUM_DRIVERS
622 --with-vulkan-drivers=$VULKAN_DRIVERS
623 --disable-llvm-shared-libs
624 &&
625 make && eval $MAKE_CHECK_COMMAND;
626 fi
627
628 - if test "x$BUILD" = xscons; then
629 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
630 fi
631
632 - |
633 if test "x$BUILD" = xmeson; then
634
635 if test "x$TRAVIS_OS_NAME" == xosx; then
636 MESON_OPTIONS="-Degl=false"
637 fi
638
639 if test "x$TRAVIS_OS_NAME" == xlinux; then
640 MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
641 fi
642
643 # We need to control the version of llvm-config we're using, so we'll
644 # generate a native file to do so. This requires meson >=0.49
645 #
646 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
647
648 $LLVM_CONFIG --version
649
650 export CFLAGS="$CFLAGS -isystem`pwd`"
651 meson _build $MESON_OPTIONS \
652 --native-file=native.file \
653 -Dbuild-tests=true
654 meson configure _build
655 ninja -C _build
656 ninja -C _build test
657 fi