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 - LIBXCB_VERSION=libxcb-1.13
22 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
23 - LIBVDPAU_VERSION=libvdpau-1.1
24 - LIBVA_VERSION=libva-1.6.2
25 - LIBWAYLAND_VERSION=wayland-1.11.1
26 - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
27 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
28 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
29 - PATH="$HOME/prefix/bin:$PATH"
34 - LABEL="meson Vulkan"
36 - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
38 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
42 - llvm-toolchain-trusty-4.0
44 # LLVM packaging is broken and misses these dependencies
54 - LABEL="meson loaders/classic DRI"
56 - MESON_OPTIONS="-Dvulkan-drivers= -Dgallium-drivers="
61 - x11proto-xf86vidmode-dev
68 - LABEL="make loaders/classic DRI"
71 - MAKE_CHECK_COMMAND="make check"
72 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
73 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
74 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
77 - LIBUNWIND_FLAGS="--disable-libunwind"
82 - x11proto-xf86vidmode-dev
88 # NOTE: Building SWR is 2x (yes two) times slower than all the other
89 # gallium drivers combined.
90 # Start this early so that it doesn't hunder the run time.
91 - LABEL="make Gallium Drivers SWR"
94 - MAKE_CHECK_COMMAND="true"
96 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
97 - OVERRIDE_CC="gcc-4.8"
98 - OVERRIDE_CXX="g++-4.8"
99 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
101 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
102 - GALLIUM_DRIVERS="swr"
104 - LIBUNWIND_FLAGS="--enable-libunwind"
108 - llvm-toolchain-trusty-4.0
110 # LLVM packaging is broken and misses these dependencies
116 - x11proto-xf86vidmode-dev
122 - LABEL="make Gallium Drivers RadeonSI"
125 - MAKE_CHECK_COMMAND="true"
127 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
128 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
130 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
131 - GALLIUM_DRIVERS="radeonsi"
133 - LIBUNWIND_FLAGS="--enable-libunwind"
137 - llvm-toolchain-trusty-4.0
139 # LLVM packaging is broken and misses these dependencies
145 - x11proto-xf86vidmode-dev
151 - LABEL="make Gallium Drivers Other"
154 - MAKE_CHECK_COMMAND="true"
156 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
157 # New binutils linker is required for llvm-3.9
158 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
159 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
161 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
162 - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
164 - LIBUNWIND_FLAGS="--enable-libunwind"
168 - llvm-toolchain-trusty-3.9
171 # LLVM packaging is broken and misses these dependencies
177 - x11proto-xf86vidmode-dev
183 # NOTE: Analogous to SWR above, building Clover is quite slow.
184 - LABEL="make Gallium ST Clover LLVM-3.9"
187 - MAKE_CHECK_COMMAND="true"
189 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
190 - OVERRIDE_CC=gcc-4.7
191 - OVERRIDE_CXX=g++-4.7
192 # New binutils linker is required for llvm-3.9
193 - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
194 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
196 - 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"
197 - GALLIUM_DRIVERS="r600"
199 - LIBUNWIND_FLAGS="--enable-libunwind"
203 - llvm-toolchain-trusty-3.9
207 # LLVM packaging is broken and misses these dependencies
216 - x11proto-xf86vidmode-dev
222 # NOTE: Analogous to SWR above, building Clover is quite slow.
223 - LABEL="make Gallium ST Clover LLVM-4.0"
226 - MAKE_CHECK_COMMAND="true"
228 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
229 - OVERRIDE_CC=gcc-4.8
230 - OVERRIDE_CXX=g++-4.8
231 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
233 - 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"
234 - GALLIUM_DRIVERS="r600,radeonsi"
236 - LIBUNWIND_FLAGS="--enable-libunwind"
240 - llvm-toolchain-trusty-4.0
243 # LLVM packaging is broken and misses these dependencies
252 - x11proto-xf86vidmode-dev
258 # NOTE: Analogous to SWR above, building Clover is quite slow.
259 - LABEL="make Gallium ST Clover LLVM-5.0"
262 - MAKE_CHECK_COMMAND="true"
264 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
265 - OVERRIDE_CC=gcc-4.8
266 - OVERRIDE_CXX=g++-4.8
267 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
269 - 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"
270 - GALLIUM_DRIVERS="r600,radeonsi"
272 - LIBUNWIND_FLAGS="--enable-libunwind"
276 - llvm-toolchain-trusty-5.0
279 # LLVM packaging is broken and misses these dependencies
288 - x11proto-xf86vidmode-dev
294 - LABEL="make Gallium ST Other"
297 - MAKE_CHECK_COMMAND="true"
299 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
300 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
302 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
303 # We need swrast for osmesa and nine.
304 # i915 most likely doesn't work with most ST.
305 # Regardless - we're doing a quick build test here.
306 - GALLIUM_DRIVERS="i915,swrast"
308 - LIBUNWIND_FLAGS="--enable-libunwind"
312 # We actually want to test against llvm-3.3
314 # Nine requires gcc 4.6... which is the one we have right ?
316 # Build locally, for now.
319 - libomxil-bellagio-dev
320 # LLVM packaging is broken and misses these dependencies
324 - x11proto-xf86vidmode-dev
330 - LABEL="make Vulkan"
333 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
335 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
336 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
338 - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
340 - VULKAN_DRIVERS="intel,radeon"
341 - LIBUNWIND_FLAGS="--disable-libunwind"
345 - llvm-toolchain-trusty-4.0
347 # LLVM packaging is broken and misses these dependencies
353 - x11proto-xf86vidmode-dev
361 # Explicitly disable.
362 - SCONS_TARGET="llvm=0"
363 # Keep it symmetrical to the make build.
364 - SCONS_CHECK_COMMAND="scons llvm=0 check"
371 - x11proto-xf86vidmode-dev
379 - SCONS_TARGET="llvm=1"
380 # Keep it symmetrical to the make build.
381 - SCONS_CHECK_COMMAND="scons llvm=1 check"
383 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
388 # LLVM packaging is broken and misses these dependencies
393 - x11proto-xf86vidmode-dev
401 - SCONS_TARGET="swr=1"
403 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
404 # Keep it symmetrical to the make build. There's no actual SWR, yet.
405 - SCONS_CHECK_COMMAND="true"
406 - OVERRIDE_CC="gcc-4.8"
407 - OVERRIDE_CXX="g++-4.8"
411 - llvm-toolchain-trusty-4.0
414 # LLVM packaging is broken and misses these dependencies
420 - x11proto-xf86vidmode-dev
428 - MAKE_CHECK_COMMAND="make check"
429 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
432 - LABEL="macOS meson"
434 - MESON_OPTIONS="-Degl=false"
439 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
440 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
441 # Set PATH for homebrew pip3 installs
442 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
443 # Set PKG_CONFIG_PATH for keg-only expat
444 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
445 # Set PATH for keg-only gettext
446 PATH="/usr/local/opt/gettext/bin:${PATH}"
448 # Install xquartz for prereqs ...
449 XQUARTZ_VERSION="2.7.11"
450 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
451 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
452 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
453 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
455 PATH="/opt/X11/bin:${PATH}"
456 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
457 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
461 - pip2 install --user mako
463 # Install a more modern meson from pip, since the version in the
464 # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
466 - if test "x$BUILD" = xmeson; then
467 pip3 install --user "meson<0.45.0";
470 # Since libdrm gets updated in configure.ac regularly, try to pick up the
471 # latest version from there.
472 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
473 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
474 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
475 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
476 export LIBDRM_VERSION="libdrm-$new_ver";
480 # Install dependencies where we require specific versions (or where
481 # disallowed by Travis CI's package whitelisting).
484 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
485 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
486 tar -jxvf $XORGMACROS_VERSION.tar.bz2
487 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
489 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
490 tar -jxvf $GLPROTO_VERSION.tar.bz2
491 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
493 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
494 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
495 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
497 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
498 tar -jxvf $XCBPROTO_VERSION.tar.bz2
499 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
501 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
502 tar -jxvf $LIBXCB_VERSION.tar.bz2
503 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
505 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
506 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
507 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
509 wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
510 tar -jxvf $LIBDRM_VERSION.tar.bz2
511 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
513 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
514 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
515 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
517 wget http://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
518 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
519 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
521 wget http://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
522 tar -jxvf $LIBVA_VERSION.tar.bz2
523 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
525 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
526 tar -axvf $LIBWAYLAND_VERSION.tar.xz
527 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
529 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
530 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
531 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
533 # Meson requires ninja >= 1.6, but trusty has 1.3.x
534 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
535 unzip ninja-linux.zip
536 mv ninja $HOME/prefix/bin/
538 # Generate this header since one is missing on the Travis instance
541 "#ifndef _LINUX_MEMFD_H" \
542 "#define _LINUX_MEMFD_H" \
544 "#define __NR_memfd_create 319" \
545 "#define SYS_memfd_create __NR_memfd_create" \
547 "#define MFD_CLOEXEC 0x0001U" \
548 "#define MFD_ALLOW_SEALING 0x0002U" \
550 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
554 - if test "x$BUILD" = xmake; then
555 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
556 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
557 test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
559 export CFLAGS="$CFLAGS -isystem`pwd`";
561 ./autogen.sh --enable-debug
564 --with-dri-drivers=$DRI_DRIVERS
566 --with-gallium-drivers=$GALLIUM_DRIVERS
567 --with-vulkan-drivers=$VULKAN_DRIVERS
568 --disable-llvm-shared-libs
570 make && eval $MAKE_CHECK_COMMAND;
573 - if test "x$BUILD" = xscons; then
574 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
575 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
576 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
580 if test "x$BUILD" = xmeson; then
582 # Travis CI has moved to LLVM 5.0, and meson is detecting
583 # automatically the available version in /usr/local/bin based on
584 # the PATH env variable order preference.
586 # As for 0.44.x, Meson cannot receive the path to the
587 # llvm-config binary as a configuration parameter. See
588 # https://github.com/mesonbuild/meson/issues/2887 and
589 # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
591 # We want to use the custom (APT) installed version. Therefore,
592 # let's make Meson find our wanted version sooner than the one
595 # Once this is corrected, we would still need a patch similar
597 # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
598 test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
600 export CFLAGS="$CFLAGS -isystem`pwd`"
601 meson _build $MESON_OPTIONS