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"
40 - VULKAN_DRIVERS="intel,amd"
42 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
46 - llvm-toolchain-trusty-6.0
47 # llvm-6 requires libstdc++4.9 which is not in main repo
48 - ubuntu-toolchain-r-test
58 - LABEL="meson loaders/classic DRI"
60 - DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
67 - x11proto-xf86vidmode-dev
74 - LABEL="make loaders/classic DRI"
77 - MAKE_CHECK_COMMAND="make check"
78 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
79 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
80 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
83 - LIBUNWIND_FLAGS="--disable-libunwind"
88 - x11proto-xf86vidmode-dev
94 # NOTE: Building SWR is 2x (yes two) times slower than all the other
95 # gallium drivers combined.
96 # Start this early so that it doesn't hunder the run time.
97 - LABEL="make Gallium Drivers SWR"
100 - MAKE_CHECK_COMMAND="true"
102 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
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-6.0
113 # llvm-6 requires libstdc++4.9 which is not in main repo
114 - ubuntu-toolchain-r-test
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 requires libstdc++4.9 which is not in main repo
143 - ubuntu-toolchain-r-test
149 - x11proto-xf86vidmode-dev
155 - LABEL="make Gallium Drivers Other"
158 - MAKE_CHECK_COMMAND="true"
160 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
161 # New binutils linker is required for llvm-3.9
162 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
163 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
165 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
166 - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,imx"
168 - LIBUNWIND_FLAGS="--enable-libunwind"
172 - llvm-toolchain-trusty-3.9
175 # LLVM packaging is broken and misses these dependencies
181 - x11proto-xf86vidmode-dev
187 # NOTE: Analogous to SWR above, building Clover is quite slow.
188 - LABEL="make Gallium ST Clover LLVM-3.9"
191 - MAKE_CHECK_COMMAND="true"
193 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
194 - OVERRIDE_CC=gcc-4.7
195 - OVERRIDE_CXX=g++-4.7
196 # New binutils linker is required for llvm-3.9
197 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
198 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
200 - 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"
201 - GALLIUM_DRIVERS="r600"
203 - LIBUNWIND_FLAGS="--enable-libunwind"
207 - llvm-toolchain-trusty-3.9
211 # LLVM packaging is broken and misses these dependencies
220 - x11proto-xf86vidmode-dev
226 # NOTE: Analogous to SWR above, building Clover is quite slow.
227 - LABEL="make Gallium ST Clover LLVM-4.0"
230 - MAKE_CHECK_COMMAND="true"
232 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
233 - OVERRIDE_CC=gcc-4.8
234 - OVERRIDE_CXX=g++-4.8
235 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
237 - 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"
238 - GALLIUM_DRIVERS="r600"
240 - LIBUNWIND_FLAGS="--enable-libunwind"
244 - llvm-toolchain-trusty-4.0
247 # LLVM packaging is broken and misses these dependencies
256 - x11proto-xf86vidmode-dev
262 # NOTE: Analogous to SWR above, building Clover is quite slow.
263 - LABEL="make Gallium ST Clover LLVM-5.0"
266 - MAKE_CHECK_COMMAND="true"
268 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
269 - OVERRIDE_CC=gcc-4.8
270 - OVERRIDE_CXX=g++-4.8
271 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
273 - 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"
274 - GALLIUM_DRIVERS="r600"
276 - LIBUNWIND_FLAGS="--enable-libunwind"
280 - llvm-toolchain-trusty-5.0
283 # LLVM packaging is broken and misses these dependencies
292 - x11proto-xf86vidmode-dev
298 # NOTE: Analogous to SWR above, building Clover is quite slow.
299 - LABEL="make Gallium ST Clover LLVM-6.0"
302 - MAKE_CHECK_COMMAND="true"
304 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
305 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
307 - 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"
308 - GALLIUM_DRIVERS="r600,radeonsi"
310 - LIBUNWIND_FLAGS="--enable-libunwind"
314 - llvm-toolchain-trusty-6.0
315 # llvm-6 requires libstdc++4.9 which is not in main repo
316 - ubuntu-toolchain-r-test
325 - x11proto-xf86vidmode-dev
331 - LABEL="make Gallium ST Other"
334 - MAKE_CHECK_COMMAND="true"
336 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
337 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
339 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
340 # We need swrast for osmesa and nine.
341 # i915 most likely doesn't work with most ST.
342 # Regardless - we're doing a quick build test here.
343 - GALLIUM_DRIVERS="i915,swrast"
345 - LIBUNWIND_FLAGS="--enable-libunwind"
349 # We actually want to test against llvm-3.3
351 # Nine requires gcc 4.6... which is the one we have right ?
353 # Build locally, for now.
356 - libomxil-bellagio-dev
357 # LLVM packaging is broken and misses these dependencies
361 - x11proto-xf86vidmode-dev
367 - LABEL="make Vulkan"
370 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
372 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
373 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
375 - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
377 - VULKAN_DRIVERS="intel,radeon"
378 - LIBUNWIND_FLAGS="--disable-libunwind"
382 - llvm-toolchain-trusty-6.0
383 # llvm-6 requires libstdc++4.9 which is not in main repo
384 - ubuntu-toolchain-r-test
390 - x11proto-xf86vidmode-dev
398 # Explicitly disable.
399 - SCONS_TARGET="llvm=0"
400 # Keep it symmetrical to the make build.
401 - SCONS_CHECK_COMMAND="scons llvm=0 check"
407 - x11proto-xf86vidmode-dev
415 - SCONS_TARGET="llvm=1"
416 # Keep it symmetrical to the make build.
417 - SCONS_CHECK_COMMAND="scons llvm=1 check"
419 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
423 # LLVM packaging is broken and misses these dependencies
428 - x11proto-xf86vidmode-dev
436 - SCONS_TARGET="swr=1"
438 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
439 # Keep it symmetrical to the make build. There's no actual SWR, yet.
440 - SCONS_CHECK_COMMAND="true"
444 - llvm-toolchain-trusty-6.0
445 # llvm-6 requires libstdc++4.9 which is not in main repo
446 - ubuntu-toolchain-r-test
452 - x11proto-xf86vidmode-dev
460 - MAKE_CHECK_COMMAND="make check"
461 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
464 - LABEL="macOS meson"
470 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
471 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
472 # Set PATH for homebrew pip3 installs
473 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
474 # Set PKG_CONFIG_PATH for keg-only expat
475 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
476 # Set PATH for keg-only gettext
477 PATH="/usr/local/opt/gettext/bin:${PATH}"
479 # Install xquartz for prereqs ...
480 XQUARTZ_VERSION="2.7.11"
481 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
482 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
483 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
484 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
486 PATH="/opt/X11/bin:${PATH}"
487 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
488 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
492 # Install a more modern meson from pip, since the version in the
493 # ubuntu repos is often quite old.
494 - if test "x$BUILD" = xmeson; then
495 pip3 install --user meson;
496 pip3 install --user mako;
499 # Install autotools build dependencies
500 - if test "x$BUILD" = xmake; then
501 pip2 install --user mako;
504 # Install a more modern scons from pip.
505 - if test "x$BUILD" = xscons; then
506 pip2 install --user "scons>=2.4";
507 pip2 install --user mako;
510 # Since libdrm gets updated in configure.ac regularly, try to pick up the
511 # latest version from there.
512 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
513 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
514 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
515 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
516 export LIBDRM_VERSION="libdrm-$new_ver";
520 # Install dependencies where we require specific versions (or where
521 # disallowed by Travis CI's package whitelisting).
524 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
525 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
526 tar -jxvf $XORGMACROS_VERSION.tar.bz2
527 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
529 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
530 tar -jxvf $GLPROTO_VERSION.tar.bz2
531 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
533 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
534 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
535 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
537 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
538 tar -jxvf $XCBPROTO_VERSION.tar.bz2
539 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
541 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
542 tar -jxvf $LIBXCB_VERSION.tar.bz2
543 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
545 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
546 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
547 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
549 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
550 tar -jxvf $LIBDRM_VERSION.tar.bz2
551 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
553 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
554 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
555 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
557 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
558 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
559 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
561 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
562 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
563 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
565 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
566 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
567 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
569 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
570 tar -jxvf $LIBVA_VERSION.tar.bz2
571 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
573 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
574 tar -axvf $LIBWAYLAND_VERSION.tar.xz
575 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
577 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
578 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
579 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
581 # Meson requires ninja >= 1.6, but trusty has 1.3.x
582 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
583 unzip ninja-linux.zip
584 mv ninja $HOME/prefix/bin/
586 # Generate this header since one is missing on the Travis instance
589 "#ifndef _LINUX_MEMFD_H" \
590 "#define _LINUX_MEMFD_H" \
592 "#define MFD_CLOEXEC 0x0001U" \
593 "#define MFD_ALLOW_SEALING 0x0002U" \
595 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
597 # Generate this header, including the missing SYS_memfd_create
598 # macro, which is not provided by the header in the Travis
602 "#ifndef _SYSCALL_H" \
603 "#define _SYSCALL_H 1" \
605 "#include <asm/unistd.h>" \
608 "# include <bits/syscall.h>" \
611 "#ifndef __NR_memfd_create" \
612 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
615 "#ifndef SYS_memfd_create" \
616 "# define SYS_memfd_create __NR_memfd_create" \
619 "#endif" > sys/syscall.h
623 - if test "x$BUILD" = xmake; then
624 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
625 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
626 test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
628 export CFLAGS="$CFLAGS -isystem`pwd`";
632 ../autogen.sh --enable-debug
635 --with-dri-drivers=$DRI_DRIVERS
637 --with-gallium-drivers=$GALLIUM_DRIVERS
638 --with-vulkan-drivers=$VULKAN_DRIVERS
639 --disable-llvm-shared-libs
641 make && eval $MAKE_CHECK_COMMAND;
644 - if test "x$BUILD" = xscons; then
645 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
646 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
647 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
651 if test "x$BUILD" = xmeson; then
653 if test "x$TRAVIS_OS_NAME" == xosx; then
654 MESON_OPTIONS="-Degl=false"
657 if test "x$TRAVIS_OS_NAME" == xlinux; then
658 MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
661 # Travis CI has moved to LLVM 5.0, and meson is detecting
662 # automatically the available version in /usr/local/bin based on
663 # the PATH env variable order preference.
665 # As for 0.44.x, Meson cannot receive the path to the
666 # llvm-config binary as a configuration parameter. See
667 # https://github.com/mesonbuild/meson/issues/2887 and
668 # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
670 # We want to use the custom (APT) installed version. Therefore,
671 # let's make Meson find our wanted version sooner than the one
674 # Once this is corrected, we would still need a patch similar
676 # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
677 test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
679 export CFLAGS="$CFLAGS -isystem`pwd`"
680 meson _build $MESON_OPTIONS