12 - XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
13 - XCB_RELEASES=https://xcb.freedesktop.org/dist
14 - WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
15 - XORGMACROS_VERSION=util-macros-1.19.0
16 - GLPROTO_VERSION=glproto-1.4.17
17 - DRI2PROTO_VERSION=dri2proto-2.8
18 - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
19 - LIBDRM_VERSION=libdrm-2.4.74
20 - XCBPROTO_VERSION=xcb-proto-1.13
21 - RANDRPROTO_VERSION=randrproto-1.3.0
22 - LIBXRANDR_VERSION=libXrandr-1.3.0
23 - LIBXCB_VERSION=libxcb-1.13
24 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
25 - LIBVDPAU_VERSION=libvdpau-1.1
26 - LIBVA_VERSION=libva-1.7.0
27 - LIBWAYLAND_VERSION=wayland-1.15.0
28 - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
29 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
30 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
31 - PATH="$HOME/prefix/bin:$PATH"
36 - LABEL="meson Vulkan"
38 - MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
40 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
44 - llvm-toolchain-trusty-6.0
45 # llvm-6 depends on gcc-4.9 which is not in main repo
46 - ubuntu-toolchain-r-test
48 # LLVM packaging is broken and misses these dependencies
58 - LABEL="meson loaders/classic DRI"
60 - MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
65 - x11proto-xf86vidmode-dev
72 - LABEL="make loaders/classic DRI"
75 - MAKE_CHECK_COMMAND="make check"
76 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
77 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
78 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
81 - LIBUNWIND_FLAGS="--disable-libunwind"
86 - x11proto-xf86vidmode-dev
92 # NOTE: Building SWR is 2x (yes two) times slower than all the other
93 # gallium drivers combined.
94 # Start this early so that it doesn't hunder the run time.
95 - LABEL="make Gallium Drivers SWR"
98 - MAKE_CHECK_COMMAND="true"
100 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
101 - OVERRIDE_CC="gcc-4.8"
102 - OVERRIDE_CXX="g++-4.8"
103 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
105 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
106 - GALLIUM_DRIVERS="swr"
108 - LIBUNWIND_FLAGS="--enable-libunwind"
112 - llvm-toolchain-trusty-5.0
114 # LLVM packaging is broken and misses these dependencies
120 - x11proto-xf86vidmode-dev
126 - LABEL="make Gallium Drivers RadeonSI"
129 - MAKE_CHECK_COMMAND="true"
131 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
132 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
134 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
135 - GALLIUM_DRIVERS="radeonsi"
137 - LIBUNWIND_FLAGS="--enable-libunwind"
141 - llvm-toolchain-trusty-6.0
142 # llvm-6 depends on gcc-4.9 which is not in main repo
143 - ubuntu-toolchain-r-test
145 # LLVM packaging is broken and misses these dependencies
151 - x11proto-xf86vidmode-dev
157 - LABEL="make Gallium Drivers Other"
160 - MAKE_CHECK_COMMAND="true"
162 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
163 # New binutils linker is required for llvm-3.9
164 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
165 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
167 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
168 - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,imx"
170 - LIBUNWIND_FLAGS="--enable-libunwind"
174 - llvm-toolchain-trusty-3.9
177 # LLVM packaging is broken and misses these dependencies
183 - x11proto-xf86vidmode-dev
189 # NOTE: Analogous to SWR above, building Clover is quite slow.
190 - LABEL="make Gallium ST Clover LLVM-3.9"
193 - MAKE_CHECK_COMMAND="true"
195 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
196 - OVERRIDE_CC=gcc-4.7
197 - OVERRIDE_CXX=g++-4.7
198 # New binutils linker is required for llvm-3.9
199 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
200 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
202 - 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"
203 - GALLIUM_DRIVERS="r600"
205 - LIBUNWIND_FLAGS="--enable-libunwind"
209 - llvm-toolchain-trusty-3.9
213 # LLVM packaging is broken and misses these dependencies
222 - x11proto-xf86vidmode-dev
228 # NOTE: Analogous to SWR above, building Clover is quite slow.
229 - LABEL="make Gallium ST Clover LLVM-4.0"
232 - MAKE_CHECK_COMMAND="true"
234 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
235 - OVERRIDE_CC=gcc-4.8
236 - OVERRIDE_CXX=g++-4.8
237 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
239 - 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"
240 - GALLIUM_DRIVERS="r600"
242 - LIBUNWIND_FLAGS="--enable-libunwind"
246 - llvm-toolchain-trusty-4.0
249 # LLVM packaging is broken and misses these dependencies
258 - x11proto-xf86vidmode-dev
264 # NOTE: Analogous to SWR above, building Clover is quite slow.
265 - LABEL="make Gallium ST Clover LLVM-5.0"
268 - MAKE_CHECK_COMMAND="true"
270 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
271 - OVERRIDE_CC=gcc-4.8
272 - OVERRIDE_CXX=g++-4.8
273 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
275 - 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"
276 - GALLIUM_DRIVERS="r600"
278 - LIBUNWIND_FLAGS="--enable-libunwind"
282 - llvm-toolchain-trusty-5.0
285 # LLVM packaging is broken and misses these dependencies
294 - x11proto-xf86vidmode-dev
300 # NOTE: Analogous to SWR above, building Clover is quite slow.
301 - LABEL="make Gallium ST Clover LLVM-6.0"
304 - MAKE_CHECK_COMMAND="true"
306 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
307 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
309 - 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"
310 - GALLIUM_DRIVERS="r600,radeonsi"
312 - LIBUNWIND_FLAGS="--enable-libunwind"
316 - llvm-toolchain-trusty-6.0
317 # llvm-6 depends on gcc-4.9 which is not in main repo
318 - ubuntu-toolchain-r-test
327 - x11proto-xf86vidmode-dev
333 - LABEL="make Gallium ST Other"
336 - MAKE_CHECK_COMMAND="true"
338 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
339 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
341 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
342 # We need swrast for osmesa and nine.
343 # i915 most likely doesn't work with most ST.
344 # Regardless - we're doing a quick build test here.
345 - GALLIUM_DRIVERS="i915,swrast"
347 - LIBUNWIND_FLAGS="--enable-libunwind"
351 # We actually want to test against llvm-3.3
353 # Nine requires gcc 4.6... which is the one we have right ?
355 # Build locally, for now.
358 - libomxil-bellagio-dev
359 # LLVM packaging is broken and misses these dependencies
363 - x11proto-xf86vidmode-dev
369 - LABEL="make Vulkan"
372 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
374 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
375 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
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"
379 - VULKAN_DRIVERS="intel,radeon"
380 - LIBUNWIND_FLAGS="--disable-libunwind"
384 - llvm-toolchain-trusty-6.0
385 # llvm-6 depends on gcc-4.9 which is not in main repo
386 - ubuntu-toolchain-r-test
388 # LLVM packaging is broken and misses these dependencies
394 - x11proto-xf86vidmode-dev
402 # Explicitly disable.
403 - SCONS_TARGET="llvm=0"
404 # Keep it symmetrical to the make build.
405 - SCONS_CHECK_COMMAND="scons llvm=0 check"
411 - x11proto-xf86vidmode-dev
419 - SCONS_TARGET="llvm=1"
420 # Keep it symmetrical to the make build.
421 - SCONS_CHECK_COMMAND="scons llvm=1 check"
423 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
427 # LLVM packaging is broken and misses these dependencies
432 - x11proto-xf86vidmode-dev
440 - SCONS_TARGET="swr=1"
442 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
443 # Keep it symmetrical to the make build. There's no actual SWR, yet.
444 - SCONS_CHECK_COMMAND="true"
445 - OVERRIDE_CC="gcc-4.8"
446 - OVERRIDE_CXX="g++-4.8"
450 - llvm-toolchain-trusty-5.0
452 # LLVM packaging is broken and misses these dependencies
458 - x11proto-xf86vidmode-dev
466 - MAKE_CHECK_COMMAND="make check"
467 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
470 - LABEL="macOS meson"
472 - MESON_OPTIONS="-Degl=false"
477 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
478 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
479 # Set PATH for homebrew pip3 installs
480 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
481 # Set PKG_CONFIG_PATH for keg-only expat
482 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
483 # Set PATH for keg-only gettext
484 PATH="/usr/local/opt/gettext/bin:${PATH}"
486 # Install xquartz for prereqs ...
487 XQUARTZ_VERSION="2.7.11"
488 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
489 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
490 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
491 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
493 PATH="/opt/X11/bin:${PATH}"
494 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
495 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
499 - pip2 install --user mako
501 # Install a more modern meson from pip, since the version in the
502 # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
504 - if test "x$BUILD" = xmeson; then
505 pip3 install --user "meson<0.45.0";
508 # Install a more modern scons from pip.
509 - if test "x$BUILD" = xscons; then
510 pip2 install --user "scons>=2.4";
513 # Since libdrm gets updated in configure.ac regularly, try to pick up the
514 # latest version from there.
515 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
516 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
517 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
518 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
519 export LIBDRM_VERSION="libdrm-$new_ver";
523 # Install dependencies where we require specific versions (or where
524 # disallowed by Travis CI's package whitelisting).
527 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
528 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
529 tar -jxvf $XORGMACROS_VERSION.tar.bz2
530 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
532 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
533 tar -jxvf $GLPROTO_VERSION.tar.bz2
534 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
536 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
537 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
538 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
540 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
541 tar -jxvf $XCBPROTO_VERSION.tar.bz2
542 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
544 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
545 tar -jxvf $LIBXCB_VERSION.tar.bz2
546 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
548 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
549 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
550 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
552 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
553 tar -jxvf $LIBDRM_VERSION.tar.bz2
554 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
556 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
557 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
558 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
560 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
561 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
562 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
564 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
565 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
566 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
568 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
569 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
570 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
572 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
573 tar -jxvf $LIBVA_VERSION.tar.bz2
574 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
576 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
577 tar -axvf $LIBWAYLAND_VERSION.tar.xz
578 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
580 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
581 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
582 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
584 # Meson requires ninja >= 1.6, but trusty has 1.3.x
585 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
586 unzip ninja-linux.zip
587 mv ninja $HOME/prefix/bin/
589 # Generate this header since one is missing on the Travis instance
592 "#ifndef _LINUX_MEMFD_H" \
593 "#define _LINUX_MEMFD_H" \
595 "#define MFD_CLOEXEC 0x0001U" \
596 "#define MFD_ALLOW_SEALING 0x0002U" \
598 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
600 # Generate this header, including the missing SYS_memfd_create
601 # macro, which is not provided by the header in the Travis
605 "#ifndef _SYSCALL_H" \
606 "#define _SYSCALL_H 1" \
608 "#include <asm/unistd.h>" \
611 "# include <bits/syscall.h>" \
614 "#ifndef __NR_memfd_create" \
615 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
618 "#ifndef SYS_memfd_create" \
619 "# define SYS_memfd_create __NR_memfd_create" \
622 "#endif" > sys/syscall.h
626 - if test "x$BUILD" = xmake; then
627 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
628 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
629 test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
631 export CFLAGS="$CFLAGS -isystem`pwd`";
635 ../autogen.sh --enable-debug
638 --with-dri-drivers=$DRI_DRIVERS
640 --with-gallium-drivers=$GALLIUM_DRIVERS
641 --with-vulkan-drivers=$VULKAN_DRIVERS
642 --disable-llvm-shared-libs
644 make && eval $MAKE_CHECK_COMMAND;
647 - if test "x$BUILD" = xscons; then
648 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
649 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
650 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
654 if test "x$BUILD" = xmeson; then
656 # Travis CI has moved to LLVM 5.0, and meson is detecting
657 # automatically the available version in /usr/local/bin based on
658 # the PATH env variable order preference.
660 # As for 0.44.x, Meson cannot receive the path to the
661 # llvm-config binary as a configuration parameter. See
662 # https://github.com/mesonbuild/meson/issues/2887 and
663 # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
665 # We want to use the custom (APT) installed version. Therefore,
666 # let's make Meson find our wanted version sooner than the one
669 # Once this is corrected, we would still need a patch similar
671 # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
672 test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
674 export CFLAGS="$CFLAGS -isystem`pwd`"
675 meson _build $MESON_OPTIONS