12 - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual
13 - XCB_RELEASES=http://xcb.freedesktop.org/dist
14 - WAYLAND_RELEASES=http://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"
38 - MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
40 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
44 - llvm-toolchain-trusty-5.0
46 # LLVM packaging is broken and misses these dependencies
56 - LABEL="meson loaders/classic DRI"
58 - MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
63 - x11proto-xf86vidmode-dev
70 - LABEL="make loaders/classic DRI"
73 - MAKE_CHECK_COMMAND="make check"
74 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
75 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
76 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
79 - LIBUNWIND_FLAGS="--disable-libunwind"
84 - x11proto-xf86vidmode-dev
90 # NOTE: Building SWR is 2x (yes two) times slower than all the other
91 # gallium drivers combined.
92 # Start this early so that it doesn't hunder the run time.
93 - LABEL="make Gallium Drivers SWR"
96 - MAKE_CHECK_COMMAND="true"
98 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
99 - OVERRIDE_CC="gcc-4.8"
100 - OVERRIDE_CXX="g++-4.8"
101 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
103 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
104 - GALLIUM_DRIVERS="swr"
106 - LIBUNWIND_FLAGS="--enable-libunwind"
110 - llvm-toolchain-trusty-5.0
112 # LLVM packaging is broken and misses these dependencies
118 - x11proto-xf86vidmode-dev
124 - LABEL="make Gallium Drivers RadeonSI"
127 - MAKE_CHECK_COMMAND="true"
129 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
130 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
132 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
133 - GALLIUM_DRIVERS="radeonsi"
135 - LIBUNWIND_FLAGS="--enable-libunwind"
139 - llvm-toolchain-trusty-5.0
141 # LLVM packaging is broken and misses these dependencies
147 - x11proto-xf86vidmode-dev
153 - LABEL="make Gallium Drivers Other"
156 - MAKE_CHECK_COMMAND="true"
158 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
159 # New binutils linker is required for llvm-3.9
160 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
161 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
163 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
164 - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,imx"
166 - LIBUNWIND_FLAGS="--enable-libunwind"
170 - llvm-toolchain-trusty-3.9
173 # LLVM packaging is broken and misses these dependencies
179 - x11proto-xf86vidmode-dev
185 # NOTE: Analogous to SWR above, building Clover is quite slow.
186 - LABEL="make Gallium ST Clover LLVM-3.9"
189 - MAKE_CHECK_COMMAND="true"
191 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
192 - OVERRIDE_CC=gcc-4.7
193 - OVERRIDE_CXX=g++-4.7
194 # New binutils linker is required for llvm-3.9
195 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
196 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
198 - 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"
199 - GALLIUM_DRIVERS="r600"
201 - LIBUNWIND_FLAGS="--enable-libunwind"
205 - llvm-toolchain-trusty-3.9
209 # LLVM packaging is broken and misses these dependencies
218 - x11proto-xf86vidmode-dev
224 # NOTE: Analogous to SWR above, building Clover is quite slow.
225 - LABEL="make Gallium ST Clover LLVM-4.0"
228 - MAKE_CHECK_COMMAND="true"
230 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
231 - OVERRIDE_CC=gcc-4.8
232 - OVERRIDE_CXX=g++-4.8
233 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
235 - 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"
236 - GALLIUM_DRIVERS="r600"
238 - LIBUNWIND_FLAGS="--enable-libunwind"
242 - llvm-toolchain-trusty-4.0
245 # LLVM packaging is broken and misses these dependencies
254 - x11proto-xf86vidmode-dev
260 # NOTE: Analogous to SWR above, building Clover is quite slow.
261 - LABEL="make Gallium ST Clover LLVM-5.0"
264 - MAKE_CHECK_COMMAND="true"
266 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
267 - OVERRIDE_CC=gcc-4.8
268 - OVERRIDE_CXX=g++-4.8
269 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
271 - 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"
272 - GALLIUM_DRIVERS="r600,radeonsi"
274 - LIBUNWIND_FLAGS="--enable-libunwind"
278 - llvm-toolchain-trusty-5.0
281 # LLVM packaging is broken and misses these dependencies
290 - x11proto-xf86vidmode-dev
296 # NOTE: Analogous to SWR above, building Clover is quite slow.
297 - LABEL="make Gallium ST Clover LLVM-6.0"
300 - MAKE_CHECK_COMMAND="true"
302 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
303 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
305 - 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"
306 - GALLIUM_DRIVERS="r600,radeonsi"
308 - LIBUNWIND_FLAGS="--enable-libunwind"
312 - llvm-toolchain-trusty-6.0
313 # llvm-6 depends on gcc-4.9 which is not in main repo
314 - ubuntu-toolchain-r-test
323 - x11proto-xf86vidmode-dev
329 - LABEL="make Gallium ST Other"
332 - MAKE_CHECK_COMMAND="true"
334 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
335 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
337 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
338 # We need swrast for osmesa and nine.
339 # i915 most likely doesn't work with most ST.
340 # Regardless - we're doing a quick build test here.
341 - GALLIUM_DRIVERS="i915,swrast"
343 - LIBUNWIND_FLAGS="--enable-libunwind"
347 # We actually want to test against llvm-3.3
349 # Nine requires gcc 4.6... which is the one we have right ?
351 # Build locally, for now.
354 - libomxil-bellagio-dev
355 # LLVM packaging is broken and misses these dependencies
359 - x11proto-xf86vidmode-dev
365 - LABEL="make Vulkan"
368 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
370 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
371 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
373 - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
375 - VULKAN_DRIVERS="intel,radeon"
376 - LIBUNWIND_FLAGS="--disable-libunwind"
380 - llvm-toolchain-trusty-5.0
382 # LLVM packaging is broken and misses these dependencies
388 - x11proto-xf86vidmode-dev
396 # Explicitly disable.
397 - SCONS_TARGET="llvm=0"
398 # Keep it symmetrical to the make build.
399 - SCONS_CHECK_COMMAND="scons llvm=0 check"
406 - x11proto-xf86vidmode-dev
414 - SCONS_TARGET="llvm=1"
415 # Keep it symmetrical to the make build.
416 - SCONS_CHECK_COMMAND="scons llvm=1 check"
418 - 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"
441 - OVERRIDE_CC="gcc-4.8"
442 - OVERRIDE_CXX="g++-4.8"
446 - llvm-toolchain-trusty-5.0
449 # LLVM packaging is broken and misses these dependencies
455 - x11proto-xf86vidmode-dev
463 - MAKE_CHECK_COMMAND="make check"
464 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
467 - LABEL="macOS meson"
469 - MESON_OPTIONS="-Degl=false"
474 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
475 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
476 # Set PATH for homebrew pip3 installs
477 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
478 # Set PKG_CONFIG_PATH for keg-only expat
479 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
480 # Set PATH for keg-only gettext
481 PATH="/usr/local/opt/gettext/bin:${PATH}"
483 # Install xquartz for prereqs ...
484 XQUARTZ_VERSION="2.7.11"
485 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
486 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
487 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
488 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
490 PATH="/opt/X11/bin:${PATH}"
491 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
492 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
496 - pip2 install --user mako
498 # Install a more modern meson from pip, since the version in the
499 # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
501 - if test "x$BUILD" = xmeson; then
502 pip3 install --user "meson<0.45.0";
505 # Since libdrm gets updated in configure.ac regularly, try to pick up the
506 # latest version from there.
507 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
508 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
509 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
510 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
511 export LIBDRM_VERSION="libdrm-$new_ver";
515 # Install dependencies where we require specific versions (or where
516 # disallowed by Travis CI's package whitelisting).
519 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
520 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
521 tar -jxvf $XORGMACROS_VERSION.tar.bz2
522 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
524 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
525 tar -jxvf $GLPROTO_VERSION.tar.bz2
526 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
528 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
529 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
530 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
532 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
533 tar -jxvf $XCBPROTO_VERSION.tar.bz2
534 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
536 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
537 tar -jxvf $LIBXCB_VERSION.tar.bz2
538 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
540 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
541 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
542 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
544 wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
545 tar -jxvf $LIBDRM_VERSION.tar.bz2
546 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
548 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
549 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
550 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
552 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
553 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
554 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
556 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
557 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
558 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
560 wget http://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
561 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
562 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
564 wget http://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
565 tar -jxvf $LIBVA_VERSION.tar.bz2
566 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
568 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
569 tar -axvf $LIBWAYLAND_VERSION.tar.xz
570 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
572 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
573 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
574 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
576 # Meson requires ninja >= 1.6, but trusty has 1.3.x
577 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
578 unzip ninja-linux.zip
579 mv ninja $HOME/prefix/bin/
581 # Generate this header since one is missing on the Travis instance
584 "#ifndef _LINUX_MEMFD_H" \
585 "#define _LINUX_MEMFD_H" \
587 "#define __NR_memfd_create 319" \
588 "#define SYS_memfd_create __NR_memfd_create" \
590 "#define MFD_CLOEXEC 0x0001U" \
591 "#define MFD_ALLOW_SEALING 0x0002U" \
593 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
597 - if test "x$BUILD" = xmake; then
598 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
599 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
600 test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
602 export CFLAGS="$CFLAGS -isystem`pwd`";
606 ../autogen.sh --enable-debug
609 --with-dri-drivers=$DRI_DRIVERS
611 --with-gallium-drivers=$GALLIUM_DRIVERS
612 --with-vulkan-drivers=$VULKAN_DRIVERS
613 --disable-llvm-shared-libs
615 make && eval $MAKE_CHECK_COMMAND;
618 - if test "x$BUILD" = xscons; then
619 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
620 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
621 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
625 if test "x$BUILD" = xmeson; then
627 # Travis CI has moved to LLVM 5.0, and meson is detecting
628 # automatically the available version in /usr/local/bin based on
629 # the PATH env variable order preference.
631 # As for 0.44.x, Meson cannot receive the path to the
632 # llvm-config binary as a configuration parameter. See
633 # https://github.com/mesonbuild/meson/issues/2887 and
634 # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
636 # We want to use the custom (APT) installed version. Therefore,
637 # let's make Meson find our wanted version sooner than the one
640 # Once this is corrected, we would still need a patch similar
642 # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
643 test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
645 export CFLAGS="$CFLAGS -isystem`pwd`"
646 meson _build $MESON_OPTIONS