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="llvm=1"
538 # Keep it symmetrical to the make build.
539 - SCONS_CHECK_COMMAND="scons llvm=1 check"
541 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
545 # LLVM packaging is broken and misses these dependencies
547 # We actually want to test against llvm-3.3, yet 3.5 is available
551 - x11proto-xf86vidmode-dev
559 - SCONS_TARGET="swr=1"
561 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
562 # Keep it symmetrical to the make build. There's no actual SWR, yet.
563 - SCONS_CHECK_COMMAND="true"
570 - x11proto-xf86vidmode-dev
578 - MAKE_CHECK_COMMAND="make check"
579 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
582 - LABEL="macOS meson"
585 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
586 - 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"
591 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
592 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
593 # Set PATH for homebrew pip3 installs
594 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
595 # Set PKG_CONFIG_PATH for keg-only expat
596 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
597 # Set PATH for keg-only gettext
598 PATH="/usr/local/opt/gettext/bin:${PATH}"
600 # Install xquartz for prereqs ...
601 XQUARTZ_VERSION="2.7.11"
602 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
603 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
604 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
605 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
607 PATH="/opt/X11/bin:${PATH}"
608 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
609 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
613 # Install a more modern meson from pip, since the version in the
614 # ubuntu repos is often quite old.
615 - if test "x$BUILD" = xmeson; then
616 pip3 install --user meson;
617 pip3 install --user mako;
620 # Install autotools build dependencies
621 - if test "x$BUILD" = xmake; then
622 pip2 install --user mako;
625 # Install a more modern scons from pip.
626 - if test "x$BUILD" = xscons; then
627 pip2 install --user "scons>=2.4";
628 pip2 install --user mako;
631 # Install dependencies where we require specific versions (or where
632 # disallowed by Travis CI's package whitelisting).
635 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
636 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
637 tar -jxvf $XORGMACROS_VERSION.tar.bz2
638 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
640 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
641 tar -jxvf $GLPROTO_VERSION.tar.bz2
642 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
644 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
645 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
646 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
648 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
649 tar -jxvf $XCBPROTO_VERSION.tar.bz2
650 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
652 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
653 tar -jxvf $LIBXCB_VERSION.tar.bz2
654 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
656 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
657 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
658 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
660 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
661 tar -jxvf $LIBDRM_VERSION.tar.bz2
662 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
664 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
665 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
666 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
668 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
669 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
670 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
672 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
673 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
674 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
676 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
677 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
678 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
680 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
681 tar -jxvf $LIBVA_VERSION.tar.bz2
682 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
684 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
685 tar -axvf $LIBWAYLAND_VERSION.tar.xz
686 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
688 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
689 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
690 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
692 # Meson requires ninja >= 1.6, but xenial has 1.3.x
693 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
694 unzip ninja-linux.zip
695 mv ninja $HOME/prefix/bin/
697 # Generate this header since one is missing on the Travis instance
700 "#ifndef _LINUX_MEMFD_H" \
701 "#define _LINUX_MEMFD_H" \
703 "#define MFD_CLOEXEC 0x0001U" \
704 "#define MFD_ALLOW_SEALING 0x0002U" \
706 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
708 # Generate this header, including the missing SYS_memfd_create
709 # macro, which is not provided by the header in the Travis
713 "#ifndef _SYSCALL_H" \
714 "#define _SYSCALL_H 1" \
716 "#include <asm/unistd.h>" \
719 "# include <bits/syscall.h>" \
722 "#ifndef __NR_memfd_create" \
723 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
726 "#ifndef SYS_memfd_create" \
727 "# define SYS_memfd_create __NR_memfd_create" \
730 "#endif" > sys/syscall.h
734 - if test "x$BUILD" = xmake; then
735 export CFLAGS="$CFLAGS -isystem`pwd`";
744 --with-dri-drivers=$DRI_DRIVERS
746 --with-gallium-drivers=$GALLIUM_DRIVERS
747 --with-vulkan-drivers=$VULKAN_DRIVERS
748 --disable-llvm-shared-libs
750 make && eval $MAKE_CHECK_COMMAND;
753 - if test "x$BUILD" = xscons; then
754 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
758 if test "x$BUILD" = xmeson; then
759 if test -n "$LLVM_CONFIG"; then
760 # We need to control the version of llvm-config we're using, so we'll
761 # generate a native file to do so. This requires meson >=0.49
763 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
765 $LLVM_CONFIG --version
770 export CFLAGS="$CFLAGS -isystem`pwd`"
772 --native-file=native.file \
774 -Dlibunwind=${UNWIND} \
776 -Ddri-drivers=${DRI_DRIVERS:-[]} \
778 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
779 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
780 meson configure _build