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 # Explicitly disable.
538 - SCONS_TARGET="llvm=0"
539 # Keep it symmetrical to the make build.
540 - SCONS_CHECK_COMMAND="scons llvm=0 check"
546 - x11proto-xf86vidmode-dev
554 - SCONS_TARGET="llvm=1"
555 # Keep it symmetrical to the make build.
556 - SCONS_CHECK_COMMAND="scons llvm=1 check"
558 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
562 # LLVM packaging is broken and misses these dependencies
564 # We actually want to test against llvm-3.3, yet 3.5 is available
568 - x11proto-xf86vidmode-dev
576 - SCONS_TARGET="swr=1"
578 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
579 # Keep it symmetrical to the make build. There's no actual SWR, yet.
580 - SCONS_CHECK_COMMAND="true"
587 - x11proto-xf86vidmode-dev
595 - MAKE_CHECK_COMMAND="make check"
596 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
599 - LABEL="macOS meson"
602 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
603 - 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"
608 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
609 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
610 # Set PATH for homebrew pip3 installs
611 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
612 # Set PKG_CONFIG_PATH for keg-only expat
613 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
614 # Set PATH for keg-only gettext
615 PATH="/usr/local/opt/gettext/bin:${PATH}"
617 # Install xquartz for prereqs ...
618 XQUARTZ_VERSION="2.7.11"
619 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
620 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
621 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
622 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
624 PATH="/opt/X11/bin:${PATH}"
625 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
626 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
630 # Install a more modern meson from pip, since the version in the
631 # ubuntu repos is often quite old.
632 - if test "x$BUILD" = xmeson; then
633 pip3 install --user meson;
634 pip3 install --user mako;
637 # Install autotools build dependencies
638 - if test "x$BUILD" = xmake; then
639 pip2 install --user mako;
642 # Install a more modern scons from pip.
643 - if test "x$BUILD" = xscons; then
644 pip2 install --user "scons>=2.4";
645 pip2 install --user mako;
648 # Install dependencies where we require specific versions (or where
649 # disallowed by Travis CI's package whitelisting).
652 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
653 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
654 tar -jxvf $XORGMACROS_VERSION.tar.bz2
655 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
657 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
658 tar -jxvf $GLPROTO_VERSION.tar.bz2
659 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
661 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
662 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
663 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
665 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
666 tar -jxvf $XCBPROTO_VERSION.tar.bz2
667 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
669 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
670 tar -jxvf $LIBXCB_VERSION.tar.bz2
671 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
673 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
674 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
675 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
677 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
678 tar -jxvf $LIBDRM_VERSION.tar.bz2
679 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
681 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
682 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
683 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
685 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
686 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
687 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
689 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
690 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
691 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
693 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
694 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
695 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
697 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
698 tar -jxvf $LIBVA_VERSION.tar.bz2
699 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
701 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
702 tar -axvf $LIBWAYLAND_VERSION.tar.xz
703 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
705 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
706 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
707 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
709 # Meson requires ninja >= 1.6, but xenial has 1.3.x
710 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
711 unzip ninja-linux.zip
712 mv ninja $HOME/prefix/bin/
714 # Generate this header since one is missing on the Travis instance
717 "#ifndef _LINUX_MEMFD_H" \
718 "#define _LINUX_MEMFD_H" \
720 "#define MFD_CLOEXEC 0x0001U" \
721 "#define MFD_ALLOW_SEALING 0x0002U" \
723 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
725 # Generate this header, including the missing SYS_memfd_create
726 # macro, which is not provided by the header in the Travis
730 "#ifndef _SYSCALL_H" \
731 "#define _SYSCALL_H 1" \
733 "#include <asm/unistd.h>" \
736 "# include <bits/syscall.h>" \
739 "#ifndef __NR_memfd_create" \
740 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
743 "#ifndef SYS_memfd_create" \
744 "# define SYS_memfd_create __NR_memfd_create" \
747 "#endif" > sys/syscall.h
751 - if test "x$BUILD" = xmake; then
752 export CFLAGS="$CFLAGS -isystem`pwd`";
761 --with-dri-drivers=$DRI_DRIVERS
763 --with-gallium-drivers=$GALLIUM_DRIVERS
764 --with-vulkan-drivers=$VULKAN_DRIVERS
765 --disable-llvm-shared-libs
767 make && eval $MAKE_CHECK_COMMAND;
770 - if test "x$BUILD" = xscons; then
771 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
775 if test "x$BUILD" = xmeson; then
776 if test -n "$LLVM_CONFIG"; then
777 # We need to control the version of llvm-config we're using, so we'll
778 # generate a native file to do so. This requires meson >=0.49
780 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
782 $LLVM_CONFIG --version
787 export CFLAGS="$CFLAGS -isystem`pwd`"
789 --native-file=native.file \
791 -Dlibunwind=${UNWIND} \
793 -Ddri-drivers=${DRI_DRIVERS:-[]} \
795 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
796 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
797 meson configure _build