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="meson loaders/classic DRI"
38 - DRI_LOADERS="-Dglx=dri -Dgbm=true -Degl=true -Dplatforms=x11,wayland,drm,surfaceless -Dosmesa=classic"
39 - DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
40 - 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"
45 - x11proto-xf86vidmode-dev
55 - LABEL="make loaders/classic DRI"
58 - MAKE_CHECK_COMMAND="make check"
59 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
60 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
61 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
64 - LIBUNWIND_FLAGS="--disable-libunwind"
69 - x11proto-xf86vidmode-dev
78 # NOTE: Building SWR is 2x (yes two) times slower than all the other
79 # gallium drivers combined.
80 # Start this early so that it doesn't hunder the run time.
81 - LABEL="meson Gallium Drivers SWR"
84 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
85 - GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
86 - GALLIUM_DRIVERS="swr"
88 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
103 - LABEL="meson Gallium Drivers RadeonSI"
106 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
107 - GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
108 - GALLIUM_DRIVERS="radeonsi"
110 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
114 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
115 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
129 - LABEL="meson Gallium Drivers Other"
132 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
133 - GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
134 - GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
136 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
140 # LLVM packaging is broken and misses these dependencies
153 - LABEL="meson Gallium ST Clover LLVM-5.0"
156 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
157 - GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=icd"
158 - GALLIUM_DRIVERS="r600"
160 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
165 # LLVM packaging is broken and misses these dependencies
179 - LABEL="meson Gallium ST Clover LLVM-6.0"
182 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
183 - GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=icd"
184 - GALLIUM_DRIVERS="r600"
186 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
204 - LABEL="meson Gallium ST Clover LLVM-7"
207 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
208 - GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=icd"
209 - GALLIUM_DRIVERS="r600,radeonsi"
211 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
215 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
216 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
233 - LABEL="meson Gallium ST Other"
236 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
237 - 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"
238 # We need swrast for osmesa and nine.
239 # Nouveau supports, or builds at least against all ST.
240 - GALLIUM_DRIVERS="nouveau,swrast"
242 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
247 # LLVM packaging is broken and misses these dependencies
249 # Nine requires gcc 4.6... which is the one we have right ?
251 # Build locally, for now.
254 - libomxil-bellagio-dev
265 # NOTE: Building SWR is 2x (yes two) times slower than all the other
266 # gallium drivers combined.
267 # Start this early so that it doesn't hunder the run time.
268 - LABEL="make Gallium Drivers SWR"
271 - MAKE_CHECK_COMMAND="true"
273 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
274 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
276 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
277 - GALLIUM_DRIVERS="swr"
279 - LIBUNWIND_FLAGS="--enable-libunwind"
293 - LABEL="make Gallium Drivers RadeonSI"
296 - MAKE_CHECK_COMMAND="true"
298 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
299 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
301 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
302 - GALLIUM_DRIVERS="radeonsi"
304 - LIBUNWIND_FLAGS="--enable-libunwind"
308 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
309 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
322 - LABEL="make Gallium Drivers 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 --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
331 - GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
333 - LIBUNWIND_FLAGS="--enable-libunwind"
337 # LLVM packaging is broken and misses these dependencies
349 - LABEL="make Gallium ST Clover LLVM-3.9"
352 - MAKE_CHECK_COMMAND="true"
354 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
355 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
357 - 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"
358 - GALLIUM_DRIVERS="r600"
360 - LIBUNWIND_FLAGS="--enable-libunwind"
365 # LLVM packaging is broken and misses these dependencies
379 - LABEL="make Gallium ST Clover LLVM-4.0"
382 - MAKE_CHECK_COMMAND="true"
384 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
385 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
387 - 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"
388 - GALLIUM_DRIVERS="r600"
390 - LIBUNWIND_FLAGS="--enable-libunwind"
395 # LLVM packaging is broken and misses these dependencies
409 - LABEL="make Gallium ST Clover LLVM-5.0"
412 - MAKE_CHECK_COMMAND="true"
414 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
415 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
417 - 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"
418 - GALLIUM_DRIVERS="r600"
420 - LIBUNWIND_FLAGS="--enable-libunwind"
425 # LLVM packaging is broken and misses these dependencies
439 - LABEL="make Gallium ST Clover LLVM-6.0"
442 - MAKE_CHECK_COMMAND="true"
444 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
445 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
447 - 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"
448 - GALLIUM_DRIVERS="r600"
450 - LIBUNWIND_FLAGS="--enable-libunwind"
467 - LABEL="make Gallium ST Clover LLVM-7"
470 - MAKE_CHECK_COMMAND="true"
472 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
473 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
475 - 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"
476 - GALLIUM_DRIVERS="r600,radeonsi"
478 - LIBUNWIND_FLAGS="--enable-libunwind"
482 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
483 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
497 - LABEL="make Gallium ST Other"
500 - MAKE_CHECK_COMMAND="true"
502 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
503 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
505 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
506 # We need swrast for osmesa and nine.
507 # i915 most likely doesn't work with most ST.
508 # Regardless - we're doing a quick build test here.
509 - GALLIUM_DRIVERS="i915,swrast"
511 - LIBUNWIND_FLAGS="--enable-libunwind"
515 # We actually want to test against llvm-3.3, yet 3.5 is available
517 # Nine requires gcc 4.6... which is the one we have right ?
519 # Build locally, for now.
522 - libomxil-bellagio-dev
523 # LLVM packaging is broken and misses these dependencies
537 - SCONS_TARGET="swr=1"
539 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
540 # Keep it symmetrical to the make build. There's no actual SWR, yet.
541 - SCONS_CHECK_COMMAND="true"
548 - x11proto-xf86vidmode-dev
556 - MAKE_CHECK_COMMAND="make check"
557 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
560 - LABEL="macOS meson"
563 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
564 - 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"
569 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
570 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
571 # Set PATH for homebrew pip3 installs
572 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
573 # Set PKG_CONFIG_PATH for keg-only expat
574 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
575 # Set PATH for keg-only gettext
576 PATH="/usr/local/opt/gettext/bin:${PATH}"
578 # Install xquartz for prereqs ...
579 XQUARTZ_VERSION="2.7.11"
580 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
581 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
582 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
583 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
585 PATH="/opt/X11/bin:${PATH}"
586 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
587 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
591 # Install a more modern meson from pip, since the version in the
592 # ubuntu repos is often quite old.
593 - if test "x$BUILD" = xmeson; then
594 pip3 install --user meson;
595 pip3 install --user mako;
598 # Install autotools build dependencies
599 - if test "x$BUILD" = xmake; then
600 pip2 install --user mako;
603 # Install a more modern scons from pip.
604 - if test "x$BUILD" = xscons; then
605 pip2 install --user "scons>=2.4";
606 pip2 install --user mako;
609 # Install dependencies where we require specific versions (or where
610 # disallowed by Travis CI's package whitelisting).
613 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
614 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
615 tar -jxvf $XORGMACROS_VERSION.tar.bz2
616 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
618 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
619 tar -jxvf $GLPROTO_VERSION.tar.bz2
620 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
622 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
623 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
624 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
626 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
627 tar -jxvf $XCBPROTO_VERSION.tar.bz2
628 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
630 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
631 tar -jxvf $LIBXCB_VERSION.tar.bz2
632 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
634 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
635 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
636 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
638 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
639 tar -jxvf $LIBDRM_VERSION.tar.bz2
640 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
642 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
643 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
644 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
646 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
647 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
648 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
650 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
651 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
652 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
654 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
655 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
656 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
658 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
659 tar -jxvf $LIBVA_VERSION.tar.bz2
660 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
662 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
663 tar -axvf $LIBWAYLAND_VERSION.tar.xz
664 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
666 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
667 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
668 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
670 # Meson requires ninja >= 1.6, but xenial has 1.3.x
671 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
672 unzip ninja-linux.zip
673 mv ninja $HOME/prefix/bin/
675 # Generate this header since one is missing on the Travis instance
678 "#ifndef _LINUX_MEMFD_H" \
679 "#define _LINUX_MEMFD_H" \
681 "#define MFD_CLOEXEC 0x0001U" \
682 "#define MFD_ALLOW_SEALING 0x0002U" \
684 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
686 # Generate this header, including the missing SYS_memfd_create
687 # macro, which is not provided by the header in the Travis
691 "#ifndef _SYSCALL_H" \
692 "#define _SYSCALL_H 1" \
694 "#include <asm/unistd.h>" \
697 "# include <bits/syscall.h>" \
700 "#ifndef __NR_memfd_create" \
701 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
704 "#ifndef SYS_memfd_create" \
705 "# define SYS_memfd_create __NR_memfd_create" \
708 "#endif" > sys/syscall.h
712 - if test "x$BUILD" = xmake; then
713 export CFLAGS="$CFLAGS -isystem`pwd`";
722 --with-dri-drivers=$DRI_DRIVERS
724 --with-gallium-drivers=$GALLIUM_DRIVERS
725 --with-vulkan-drivers=$VULKAN_DRIVERS
726 --disable-llvm-shared-libs
728 make && eval $MAKE_CHECK_COMMAND;
731 - if test "x$BUILD" = xscons; then
732 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
736 if test "x$BUILD" = xmeson; then
737 if test -n "$LLVM_CONFIG"; then
738 # We need to control the version of llvm-config we're using, so we'll
739 # generate a native file to do so. This requires meson >=0.49
741 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
743 $LLVM_CONFIG --version
748 export CFLAGS="$CFLAGS -isystem`pwd`"
750 --native-file=native.file \
752 -Dlibunwind=${UNWIND} \
754 -Ddri-drivers=${DRI_DRIVERS:-[]} \
756 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
757 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
758 meson configure _build