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.97
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"
35 - LABEL="make loaders/classic DRI"
38 - MAKE_CHECK_COMMAND="make check"
39 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
40 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
41 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
44 - LIBUNWIND_FLAGS="--disable-libunwind"
49 - x11proto-xf86vidmode-dev
58 - LABEL="meson Gallium ST Other"
61 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
62 - GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=true -Dgallium-xvmc=true -Dgallium-omx=bellagio -Dgallium-va=true -Dgallium-xa=true -Dgallium-nine=true -Dgallium-opencl=disabled -Dosmesa=gallium"
63 # We need swrast for osmesa and nine.
64 # Nouveau supports, or builds at least against all ST.
65 - GALLIUM_DRIVERS="nouveau,swrast"
67 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
72 # LLVM packaging is broken and misses these dependencies
74 # Nine requires gcc 4.6... which is the one we have right ?
76 # Build locally, for now.
79 - libomxil-bellagio-dev
90 # NOTE: Building SWR is 2x (yes two) times slower than all the other
91 # gallium drivers combined.
92 # Start this early so that it doesn't hunder the run time.
93 - LABEL="make Gallium Drivers SWR"
96 - MAKE_CHECK_COMMAND="true"
98 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
99 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
101 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
102 - GALLIUM_DRIVERS="swr"
104 - LIBUNWIND_FLAGS="--enable-libunwind"
118 - LABEL="make Gallium Drivers RadeonSI"
121 - MAKE_CHECK_COMMAND="true"
123 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
124 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
126 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
127 - GALLIUM_DRIVERS="radeonsi"
129 - LIBUNWIND_FLAGS="--enable-libunwind"
133 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
134 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
147 - LABEL="make Gallium Drivers Other"
150 - MAKE_CHECK_COMMAND="true"
152 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
153 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
155 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
156 - GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
158 - LIBUNWIND_FLAGS="--enable-libunwind"
162 # LLVM packaging is broken and misses these dependencies
174 - LABEL="make Gallium ST Clover LLVM-3.9"
177 - MAKE_CHECK_COMMAND="true"
179 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
180 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
182 - 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"
183 - GALLIUM_DRIVERS="r600"
185 - LIBUNWIND_FLAGS="--enable-libunwind"
190 # LLVM packaging is broken and misses these dependencies
204 - LABEL="make Gallium ST Clover LLVM-4.0"
207 - MAKE_CHECK_COMMAND="true"
209 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
210 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
212 - 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"
213 - GALLIUM_DRIVERS="r600"
215 - LIBUNWIND_FLAGS="--enable-libunwind"
220 # LLVM packaging is broken and misses these dependencies
234 - LABEL="make Gallium ST Clover LLVM-5.0"
237 - MAKE_CHECK_COMMAND="true"
239 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
240 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
242 - 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"
243 - GALLIUM_DRIVERS="r600"
245 - LIBUNWIND_FLAGS="--enable-libunwind"
250 # LLVM packaging is broken and misses these dependencies
264 - LABEL="make Gallium ST Clover LLVM-6.0"
267 - MAKE_CHECK_COMMAND="true"
269 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
270 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
272 - 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"
273 - GALLIUM_DRIVERS="r600"
275 - LIBUNWIND_FLAGS="--enable-libunwind"
292 - LABEL="make Gallium ST Clover LLVM-7"
295 - MAKE_CHECK_COMMAND="true"
297 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
298 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
300 - 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"
301 - GALLIUM_DRIVERS="r600,radeonsi"
303 - LIBUNWIND_FLAGS="--enable-libunwind"
307 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
308 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
322 - LABEL="make Gallium ST Other"
325 - MAKE_CHECK_COMMAND="true"
327 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
328 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
330 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
331 # We need swrast for osmesa and nine.
332 # i915 most likely doesn't work with most ST.
333 # Regardless - we're doing a quick build test here.
334 - GALLIUM_DRIVERS="i915,swrast"
336 - LIBUNWIND_FLAGS="--enable-libunwind"
340 # We actually want to test against llvm-3.3, yet 3.5 is available
342 # Nine requires gcc 4.6... which is the one we have right ?
344 # Build locally, for now.
347 - libomxil-bellagio-dev
348 # LLVM packaging is broken and misses these dependencies
362 - MAKE_CHECK_COMMAND="make check"
363 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
366 - LABEL="macOS meson"
369 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
370 - GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
375 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
376 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
377 # Set PATH for homebrew pip3 installs
378 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
379 # Set PKG_CONFIG_PATH for keg-only expat
380 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
381 # Set PATH for keg-only gettext
382 PATH="/usr/local/opt/gettext/bin:${PATH}"
384 # Install xquartz for prereqs ...
385 XQUARTZ_VERSION="2.7.11"
386 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
387 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
388 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
389 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
391 PATH="/opt/X11/bin:${PATH}"
392 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
393 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
397 # Install a more modern meson from pip, since the version in the
398 # ubuntu repos is often quite old.
399 - if test "x$BUILD" = xmeson; then
400 pip3 install --user meson;
401 pip3 install --user mako;
404 # Install autotools build dependencies
405 - if test "x$BUILD" = xmake; then
406 pip2 install --user mako;
409 # Install a more modern scons from pip.
410 - if test "x$BUILD" = xscons; then
411 pip2 install --user "scons>=2.4";
412 pip2 install --user mako;
415 # Install dependencies where we require specific versions (or where
416 # disallowed by Travis CI's package whitelisting).
419 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
420 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
421 tar -jxvf $XORGMACROS_VERSION.tar.bz2
422 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
424 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
425 tar -jxvf $GLPROTO_VERSION.tar.bz2
426 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
428 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
429 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
430 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
432 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
433 tar -jxvf $XCBPROTO_VERSION.tar.bz2
434 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
436 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
437 tar -jxvf $LIBXCB_VERSION.tar.bz2
438 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
440 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
441 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
442 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
444 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
445 tar -jxvf $LIBDRM_VERSION.tar.bz2
446 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
448 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
449 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
450 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
452 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
453 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
454 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
456 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
457 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
458 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
460 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
461 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
462 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
464 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
465 tar -jxvf $LIBVA_VERSION.tar.bz2
466 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
468 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
469 tar -axvf $LIBWAYLAND_VERSION.tar.xz
470 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
472 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
473 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
474 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
476 # Meson requires ninja >= 1.6, but xenial has 1.3.x
477 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
478 unzip ninja-linux.zip
479 mv ninja $HOME/prefix/bin/
481 # Generate this header since one is missing on the Travis instance
484 "#ifndef _LINUX_MEMFD_H" \
485 "#define _LINUX_MEMFD_H" \
487 "#define MFD_CLOEXEC 0x0001U" \
488 "#define MFD_ALLOW_SEALING 0x0002U" \
490 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
492 # Generate this header, including the missing SYS_memfd_create
493 # macro, which is not provided by the header in the Travis
497 "#ifndef _SYSCALL_H" \
498 "#define _SYSCALL_H 1" \
500 "#include <asm/unistd.h>" \
503 "# include <bits/syscall.h>" \
506 "#ifndef __NR_memfd_create" \
507 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
510 "#ifndef SYS_memfd_create" \
511 "# define SYS_memfd_create __NR_memfd_create" \
514 "#endif" > sys/syscall.h
518 - if test "x$BUILD" = xmake; then
519 export CFLAGS="$CFLAGS -isystem`pwd`";
528 --with-dri-drivers=$DRI_DRIVERS
530 --with-gallium-drivers=$GALLIUM_DRIVERS
531 --with-vulkan-drivers=$VULKAN_DRIVERS
532 --disable-llvm-shared-libs
534 make && eval $MAKE_CHECK_COMMAND;
537 - if test "x$BUILD" = xscons; then
538 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
542 if test "x$BUILD" = xmeson; then
543 if test -n "$LLVM_CONFIG"; then
544 # We need to control the version of llvm-config we're using, so we'll
545 # generate a native file to do so. This requires meson >=0.49
547 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
549 $LLVM_CONFIG --version
554 export CFLAGS="$CFLAGS -isystem`pwd`"
556 --native-file=native.file \
558 -Dlibunwind=${UNWIND} \
560 -Ddri-drivers=${DRI_DRIVERS:-[]} \
562 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
563 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
564 meson configure _build