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 Drivers Other"
61 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
62 - 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"
63 - GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
65 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
69 # LLVM packaging is broken and misses these dependencies
82 - LABEL="meson Gallium ST Clover LLVM-5.0"
85 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
86 - 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"
87 - GALLIUM_DRIVERS="r600"
89 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
94 # LLVM packaging is broken and misses these dependencies
108 - LABEL="meson Gallium ST Clover LLVM-6.0"
111 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
112 - 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"
113 - GALLIUM_DRIVERS="r600"
115 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
133 - LABEL="meson Gallium ST Clover LLVM-7"
136 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
137 - 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"
138 - GALLIUM_DRIVERS="r600,radeonsi"
140 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
144 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
145 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
162 - LABEL="meson Gallium ST Other"
165 - DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
166 - 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"
167 # We need swrast for osmesa and nine.
168 # Nouveau supports, or builds at least against all ST.
169 - GALLIUM_DRIVERS="nouveau,swrast"
171 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
176 # LLVM packaging is broken and misses these dependencies
178 # Nine requires gcc 4.6... which is the one we have right ?
180 # Build locally, for now.
183 - libomxil-bellagio-dev
194 # NOTE: Building SWR is 2x (yes two) times slower than all the other
195 # gallium drivers combined.
196 # Start this early so that it doesn't hunder the run time.
197 - LABEL="make Gallium Drivers SWR"
200 - MAKE_CHECK_COMMAND="true"
202 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
203 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
205 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
206 - GALLIUM_DRIVERS="swr"
208 - LIBUNWIND_FLAGS="--enable-libunwind"
222 - LABEL="make Gallium Drivers RadeonSI"
225 - MAKE_CHECK_COMMAND="true"
227 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
228 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
230 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
231 - GALLIUM_DRIVERS="radeonsi"
233 - LIBUNWIND_FLAGS="--enable-libunwind"
237 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
238 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
251 - LABEL="make Gallium Drivers Other"
254 - MAKE_CHECK_COMMAND="true"
256 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
257 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
259 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
260 - GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
262 - LIBUNWIND_FLAGS="--enable-libunwind"
266 # LLVM packaging is broken and misses these dependencies
278 - LABEL="make Gallium ST Clover LLVM-3.9"
281 - MAKE_CHECK_COMMAND="true"
283 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
284 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
286 - 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"
287 - GALLIUM_DRIVERS="r600"
289 - LIBUNWIND_FLAGS="--enable-libunwind"
294 # LLVM packaging is broken and misses these dependencies
308 - LABEL="make Gallium ST Clover LLVM-4.0"
311 - MAKE_CHECK_COMMAND="true"
313 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
314 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
316 - 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"
317 - GALLIUM_DRIVERS="r600"
319 - LIBUNWIND_FLAGS="--enable-libunwind"
324 # LLVM packaging is broken and misses these dependencies
338 - LABEL="make Gallium ST Clover LLVM-5.0"
341 - MAKE_CHECK_COMMAND="true"
343 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
344 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
346 - 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"
347 - GALLIUM_DRIVERS="r600"
349 - LIBUNWIND_FLAGS="--enable-libunwind"
354 # LLVM packaging is broken and misses these dependencies
368 - LABEL="make Gallium ST Clover LLVM-6.0"
371 - MAKE_CHECK_COMMAND="true"
373 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
374 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
376 - 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"
377 - GALLIUM_DRIVERS="r600"
379 - LIBUNWIND_FLAGS="--enable-libunwind"
396 - LABEL="make Gallium ST Clover LLVM-7"
399 - MAKE_CHECK_COMMAND="true"
401 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
402 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
404 - 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"
405 - GALLIUM_DRIVERS="r600,radeonsi"
407 - LIBUNWIND_FLAGS="--enable-libunwind"
411 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
412 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
426 - LABEL="make Gallium ST Other"
429 - MAKE_CHECK_COMMAND="true"
431 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
432 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
434 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
435 # We need swrast for osmesa and nine.
436 # i915 most likely doesn't work with most ST.
437 # Regardless - we're doing a quick build test here.
438 - GALLIUM_DRIVERS="i915,swrast"
440 - LIBUNWIND_FLAGS="--enable-libunwind"
444 # We actually want to test against llvm-3.3, yet 3.5 is available
446 # Nine requires gcc 4.6... which is the one we have right ?
448 # Build locally, for now.
451 - libomxil-bellagio-dev
452 # LLVM packaging is broken and misses these dependencies
466 - MAKE_CHECK_COMMAND="make check"
467 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
470 - LABEL="macOS meson"
473 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
474 - 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"
479 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
480 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
481 # Set PATH for homebrew pip3 installs
482 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
483 # Set PKG_CONFIG_PATH for keg-only expat
484 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
485 # Set PATH for keg-only gettext
486 PATH="/usr/local/opt/gettext/bin:${PATH}"
488 # Install xquartz for prereqs ...
489 XQUARTZ_VERSION="2.7.11"
490 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
491 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
492 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
493 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
495 PATH="/opt/X11/bin:${PATH}"
496 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
497 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
501 # Install a more modern meson from pip, since the version in the
502 # ubuntu repos is often quite old.
503 - if test "x$BUILD" = xmeson; then
504 pip3 install --user meson;
505 pip3 install --user mako;
508 # Install autotools build dependencies
509 - if test "x$BUILD" = xmake; then
510 pip2 install --user mako;
513 # Install a more modern scons from pip.
514 - if test "x$BUILD" = xscons; then
515 pip2 install --user "scons>=2.4";
516 pip2 install --user mako;
519 # Install dependencies where we require specific versions (or where
520 # disallowed by Travis CI's package whitelisting).
523 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
524 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
525 tar -jxvf $XORGMACROS_VERSION.tar.bz2
526 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
528 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
529 tar -jxvf $GLPROTO_VERSION.tar.bz2
530 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
532 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
533 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
534 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
536 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
537 tar -jxvf $XCBPROTO_VERSION.tar.bz2
538 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
540 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
541 tar -jxvf $LIBXCB_VERSION.tar.bz2
542 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
544 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
545 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
546 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
548 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
549 tar -jxvf $LIBDRM_VERSION.tar.bz2
550 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
552 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
553 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
554 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
556 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
557 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
558 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
560 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
561 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
562 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
564 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
565 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
566 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
568 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
569 tar -jxvf $LIBVA_VERSION.tar.bz2
570 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
572 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
573 tar -axvf $LIBWAYLAND_VERSION.tar.xz
574 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
576 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
577 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
578 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
580 # Meson requires ninja >= 1.6, but xenial has 1.3.x
581 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
582 unzip ninja-linux.zip
583 mv ninja $HOME/prefix/bin/
585 # Generate this header since one is missing on the Travis instance
588 "#ifndef _LINUX_MEMFD_H" \
589 "#define _LINUX_MEMFD_H" \
591 "#define MFD_CLOEXEC 0x0001U" \
592 "#define MFD_ALLOW_SEALING 0x0002U" \
594 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
596 # Generate this header, including the missing SYS_memfd_create
597 # macro, which is not provided by the header in the Travis
601 "#ifndef _SYSCALL_H" \
602 "#define _SYSCALL_H 1" \
604 "#include <asm/unistd.h>" \
607 "# include <bits/syscall.h>" \
610 "#ifndef __NR_memfd_create" \
611 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
614 "#ifndef SYS_memfd_create" \
615 "# define SYS_memfd_create __NR_memfd_create" \
618 "#endif" > sys/syscall.h
622 - if test "x$BUILD" = xmake; then
623 export CFLAGS="$CFLAGS -isystem`pwd`";
632 --with-dri-drivers=$DRI_DRIVERS
634 --with-gallium-drivers=$GALLIUM_DRIVERS
635 --with-vulkan-drivers=$VULKAN_DRIVERS
636 --disable-llvm-shared-libs
638 make && eval $MAKE_CHECK_COMMAND;
641 - if test "x$BUILD" = xscons; then
642 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
646 if test "x$BUILD" = xmeson; then
647 if test -n "$LLVM_CONFIG"; then
648 # We need to control the version of llvm-config we're using, so we'll
649 # generate a native file to do so. This requires meson >=0.49
651 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
653 $LLVM_CONFIG --version
658 export CFLAGS="$CFLAGS -isystem`pwd`"
660 --native-file=native.file \
662 -Dlibunwind=${UNWIND} \
664 -Ddri-drivers=${DRI_DRIVERS:-[]} \
666 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
667 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
668 meson configure _build