OSDN Git Service

intel: tools: import ImGui
[android-x86/external-mesa.git] / .travis.yml
1 language: c
2
3 sudo: false
4 dist: trusty
5
6 cache:
7   apt: true
8   ccache: true
9
10 env:
11   global:
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"
32
33 matrix:
34   include:
35     - env:
36         - LABEL="meson Vulkan"
37         - BUILD=meson
38         - DRI_DRIVERS=""
39         - GALLIUM_DRIVERS=""
40         - VULKAN_DRIVERS="intel,amd"
41         - LLVM_VERSION=6.0
42         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
43       addons:
44         apt:
45           sources:
46             - llvm-toolchain-trusty-6.0
47             # llvm-6 requires libstdc++4.9 which is not in main repo
48             - ubuntu-toolchain-r-test
49           packages:
50             # From sources above
51             - llvm-6.0-dev
52             # Common
53             - xz-utils
54             - libexpat1-dev
55             - libelf-dev
56             - python3-pip
57     - env:
58         - LABEL="meson loaders/classic DRI"
59         - BUILD=meson
60         - DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
61         - GALLIUM_DRIVERS=""
62         - VULKAN_DRIVERS=""
63       addons:
64         apt:
65           packages:
66             - xz-utils
67             - x11proto-xf86vidmode-dev
68             - libexpat1-dev
69             - libx11-xcb-dev
70             - libxdamage-dev
71             - libxfixes-dev
72             - python3-pip
73     - env:
74         - LABEL="make loaders/classic DRI"
75         - BUILD=make
76         - MAKEFLAGS="-j4"
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"
81         - GALLIUM_DRIVERS=""
82         - VULKAN_DRIVERS=""
83         - LIBUNWIND_FLAGS="--disable-libunwind"
84       addons:
85         apt:
86           packages:
87             - xz-utils
88             - x11proto-xf86vidmode-dev
89             - libexpat1-dev
90             - libx11-xcb-dev
91             - libxdamage-dev
92             - libxfixes-dev
93     - env:
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"
98         - BUILD=make
99         - MAKEFLAGS="-j4"
100         - MAKE_CHECK_COMMAND="true"
101         - LLVM_VERSION=6.0
102         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
103         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
104         - DRI_DRIVERS=""
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"
107         - VULKAN_DRIVERS=""
108         - LIBUNWIND_FLAGS="--enable-libunwind"
109       addons:
110         apt:
111           sources:
112             - llvm-toolchain-trusty-6.0
113             # llvm-6 requires libstdc++4.9 which is not in main repo
114             - ubuntu-toolchain-r-test
115           packages:
116             # From sources above
117             - llvm-6.0-dev
118             # Common
119             - xz-utils
120             - x11proto-xf86vidmode-dev
121             - libexpat1-dev
122             - libx11-xcb-dev
123             - libelf-dev
124             - libunwind8-dev
125     - env:
126         - LABEL="make Gallium Drivers RadeonSI"
127         - BUILD=make
128         - MAKEFLAGS="-j4"
129         - MAKE_CHECK_COMMAND="true"
130         - LLVM_VERSION=6.0
131         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
132         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
133         - DRI_DRIVERS=""
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"
136         - VULKAN_DRIVERS=""
137         - LIBUNWIND_FLAGS="--enable-libunwind"
138       addons:
139         apt:
140           sources:
141             - llvm-toolchain-trusty-6.0
142             # llvm-6 requires libstdc++4.9 which is not in main repo
143             - ubuntu-toolchain-r-test
144           packages:
145             # From sources above
146             - llvm-6.0-dev
147             # Common
148             - xz-utils
149             - x11proto-xf86vidmode-dev
150             - libexpat1-dev
151             - libx11-xcb-dev
152             - libelf-dev
153             - libunwind8-dev
154     - env:
155         - LABEL="make Gallium Drivers Other"
156         - BUILD=make
157         - MAKEFLAGS="-j4"
158         - MAKE_CHECK_COMMAND="true"
159         - LLVM_VERSION=3.9
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"
164         - DRI_DRIVERS=""
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"
167         - VULKAN_DRIVERS=""
168         - LIBUNWIND_FLAGS="--enable-libunwind"
169       addons:
170         apt:
171           sources:
172             - llvm-toolchain-trusty-3.9
173           packages:
174             - binutils-2.26
175             # LLVM packaging is broken and misses these dependencies
176             - libedit-dev
177             # From sources above
178             - llvm-3.9-dev
179             # Common
180             - xz-utils
181             - x11proto-xf86vidmode-dev
182             - libexpat1-dev
183             - libx11-xcb-dev
184             - libelf-dev
185             - libunwind8-dev
186     - env:
187         # NOTE: Analogous to SWR above, building Clover is quite slow.
188         - LABEL="make Gallium ST Clover LLVM-3.9"
189         - BUILD=make
190         - MAKEFLAGS="-j4"
191         - MAKE_CHECK_COMMAND="true"
192         - LLVM_VERSION=3.9
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"
199         - DRI_DRIVERS=""
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"
202         - VULKAN_DRIVERS=""
203         - LIBUNWIND_FLAGS="--enable-libunwind"
204       addons:
205         apt:
206           sources:
207             - llvm-toolchain-trusty-3.9
208           packages:
209             - binutils-2.26
210             - libclc-dev
211             # LLVM packaging is broken and misses these dependencies
212             - libedit-dev
213             - g++-4.7
214             # From sources above
215             - llvm-3.9-dev
216             - clang-3.9
217             - libclang-3.9-dev
218             # Common
219             - xz-utils
220             - x11proto-xf86vidmode-dev
221             - libexpat1-dev
222             - libx11-xcb-dev
223             - libelf-dev
224             - libunwind8-dev
225     - env:
226         # NOTE: Analogous to SWR above, building Clover is quite slow.
227         - LABEL="make Gallium ST Clover LLVM-4.0"
228         - BUILD=make
229         - MAKEFLAGS="-j4"
230         - MAKE_CHECK_COMMAND="true"
231         - LLVM_VERSION=4.0
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"
236         - DRI_DRIVERS=""
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"
239         - VULKAN_DRIVERS=""
240         - LIBUNWIND_FLAGS="--enable-libunwind"
241       addons:
242         apt:
243           sources:
244             - llvm-toolchain-trusty-4.0
245           packages:
246             - libclc-dev
247             # LLVM packaging is broken and misses these dependencies
248             - libedit-dev
249             - g++-4.8
250             # From sources above
251             - llvm-4.0-dev
252             - clang-4.0
253             - libclang-4.0-dev
254             # Common
255             - xz-utils
256             - x11proto-xf86vidmode-dev
257             - libexpat1-dev
258             - libx11-xcb-dev
259             - libelf-dev
260             - libunwind8-dev
261     - env:
262         # NOTE: Analogous to SWR above, building Clover is quite slow.
263         - LABEL="make Gallium ST Clover LLVM-5.0"
264         - BUILD=make
265         - MAKEFLAGS="-j4"
266         - MAKE_CHECK_COMMAND="true"
267         - LLVM_VERSION=5.0
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"
272         - DRI_DRIVERS=""
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"
275         - VULKAN_DRIVERS=""
276         - LIBUNWIND_FLAGS="--enable-libunwind"
277       addons:
278         apt:
279           sources:
280             - llvm-toolchain-trusty-5.0
281           packages:
282             - libclc-dev
283             # LLVM packaging is broken and misses these dependencies
284             - libedit-dev
285             - g++-4.8
286             # From sources above
287             - llvm-5.0-dev
288             - clang-5.0
289             - libclang-5.0-dev
290             # Common
291             - xz-utils
292             - x11proto-xf86vidmode-dev
293             - libexpat1-dev
294             - libx11-xcb-dev
295             - libelf-dev
296             - libunwind8-dev
297     - env:
298         # NOTE: Analogous to SWR above, building Clover is quite slow.
299         - LABEL="make Gallium ST Clover LLVM-6.0"
300         - BUILD=make
301         - MAKEFLAGS="-j4"
302         - MAKE_CHECK_COMMAND="true"
303         - LLVM_VERSION=6.0
304         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
305         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
306         - DRI_DRIVERS=""
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"
309         - VULKAN_DRIVERS=""
310         - LIBUNWIND_FLAGS="--enable-libunwind"
311       addons:
312         apt:
313           sources:
314             - llvm-toolchain-trusty-6.0
315             # llvm-6 requires libstdc++4.9 which is not in main repo
316             - ubuntu-toolchain-r-test
317           packages:
318             - libclc-dev
319             # From sources above
320             - llvm-6.0-dev
321             - clang-6.0
322             - libclang-6.0-dev
323             # Common
324             - xz-utils
325             - x11proto-xf86vidmode-dev
326             - libexpat1-dev
327             - libx11-xcb-dev
328             - libelf-dev
329             - libunwind8-dev
330     - env:
331         - LABEL="make Gallium ST Other"
332         - BUILD=make
333         - MAKEFLAGS="-j4"
334         - MAKE_CHECK_COMMAND="true"
335         - LLVM_VERSION=3.3
336         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
337         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
338         - DRI_DRIVERS=""
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"
344         - VULKAN_DRIVERS=""
345         - LIBUNWIND_FLAGS="--enable-libunwind"
346       addons:
347         apt:
348           packages:
349             # We actually want to test against llvm-3.3
350             - llvm-3.3-dev
351             # Nine requires gcc 4.6... which is the one we have right ?
352             - libxvmc-dev
353             # Build locally, for now.
354             #- libvdpau-dev
355             #- libva-dev
356             - libomxil-bellagio-dev
357             # LLVM packaging is broken and misses these dependencies
358             - libedit-dev
359             # Common
360             - xz-utils
361             - x11proto-xf86vidmode-dev
362             - libexpat1-dev
363             - libx11-xcb-dev
364             - libelf-dev
365             - libunwind8-dev
366     - env:
367         - LABEL="make Vulkan"
368         - BUILD=make
369         - MAKEFLAGS="-j4"
370         - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
371         - LLVM_VERSION=6.0
372         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
373         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
374         - DRI_DRIVERS=""
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"
376         - GALLIUM_DRIVERS=""
377         - VULKAN_DRIVERS="intel,radeon"
378         - LIBUNWIND_FLAGS="--disable-libunwind"
379       addons:
380         apt:
381           sources:
382             - llvm-toolchain-trusty-6.0
383             # llvm-6 requires libstdc++4.9 which is not in main repo
384             - ubuntu-toolchain-r-test
385           packages:
386             # From sources above
387             - llvm-6.0-dev
388             # Common
389             - xz-utils
390             - x11proto-xf86vidmode-dev
391             - libexpat1-dev
392             - libx11-xcb-dev
393             - libelf-dev
394     - env:
395         - LABEL="scons"
396         - BUILD=scons
397         - SCONSFLAGS="-j4"
398         # Explicitly disable.
399         - SCONS_TARGET="llvm=0"
400         # Keep it symmetrical to the make build.
401         - SCONS_CHECK_COMMAND="scons llvm=0 check"
402       addons:
403         apt:
404           packages:
405             # Common
406             - xz-utils
407             - x11proto-xf86vidmode-dev
408             - libexpat1-dev
409             - libx11-xcb-dev
410             - libelf-dev
411     - env:
412         - LABEL="scons LLVM"
413         - BUILD=scons
414         - SCONSFLAGS="-j4"
415         - SCONS_TARGET="llvm=1"
416         # Keep it symmetrical to the make build.
417         - SCONS_CHECK_COMMAND="scons llvm=1 check"
418         - LLVM_VERSION=3.3
419         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
420       addons:
421         apt:
422           packages:
423             # LLVM packaging is broken and misses these dependencies
424             - libedit-dev
425             - llvm-3.3-dev
426             # Common
427             - xz-utils
428             - x11proto-xf86vidmode-dev
429             - libexpat1-dev
430             - libx11-xcb-dev
431             - libelf-dev
432     - env:
433         - LABEL="scons SWR"
434         - BUILD=scons
435         - SCONSFLAGS="-j4"
436         - SCONS_TARGET="swr=1"
437         - LLVM_VERSION=6.0
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       addons:
442         apt:
443           sources:
444             - llvm-toolchain-trusty-6.0
445             # llvm-6 requires libstdc++4.9 which is not in main repo
446             - ubuntu-toolchain-r-test
447           packages:
448             # From sources above
449             - llvm-6.0-dev
450             # Common
451             - xz-utils
452             - x11proto-xf86vidmode-dev
453             - libexpat1-dev
454             - libx11-xcb-dev
455             - libelf-dev
456     - env:
457         - LABEL="macOS make"
458         - BUILD=make
459         - MAKEFLAGS="-j4"
460         - MAKE_CHECK_COMMAND="make check"
461         - DRI_LOADERS="--with-platforms=x11 --disable-egl"
462       os: osx
463     - env:
464         - LABEL="macOS meson"
465         - BUILD=meson
466       os: osx
467
468 before_install:
469   - |
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}"
478
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}
485       # ... and set paths
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"
489     fi
490
491 install:
492   # Install a more modern meson from pip, since the version in the
493   # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
494   # 3.5+
495   - if test "x$BUILD" = xmeson; then
496       pip3 install --user "meson<0.45.0";
497       pip3 install --user mako;
498     fi
499
500   # Install autotools build dependencies
501   - if test "x$BUILD" = xmake; then
502       pip2 install --user mako;
503     fi
504
505   # Install a more modern scons from pip.
506   - if test "x$BUILD" = xscons; then
507       pip2 install --user "scons>=2.4";
508       pip2 install --user mako;
509     fi
510
511   # Since libdrm gets updated in configure.ac regularly, try to pick up the
512   # latest version from there.
513   - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
514       old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
515       new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
516       if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
517         export LIBDRM_VERSION="libdrm-$new_ver";
518       fi;
519     done
520
521   # Install dependencies where we require specific versions (or where
522   # disallowed by Travis CI's package whitelisting).
523
524   - |
525     if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
526       wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
527       tar -jxvf $XORGMACROS_VERSION.tar.bz2
528       (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
529
530       wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
531       tar -jxvf $GLPROTO_VERSION.tar.bz2
532       (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
533
534       wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
535       tar -jxvf $DRI2PROTO_VERSION.tar.bz2
536       (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
537
538       wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
539       tar -jxvf $XCBPROTO_VERSION.tar.bz2
540       (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
541
542       wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
543       tar -jxvf $LIBXCB_VERSION.tar.bz2
544       (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
545
546       wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
547       tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
548       (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
549
550       wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
551       tar -jxvf $LIBDRM_VERSION.tar.bz2
552       (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
553
554       wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
555       tar -jxvf $RANDRPROTO_VERSION.tar.bz2
556       (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
557
558       wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
559       tar -jxvf $LIBXRANDR_VERSION.tar.bz2
560       (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
561
562       wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
563       tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
564       (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
565
566       wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
567       tar -jxvf $LIBVDPAU_VERSION.tar.bz2
568       (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
569
570       wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
571       tar -jxvf $LIBVA_VERSION.tar.bz2
572       (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
573
574       wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
575       tar -axvf $LIBWAYLAND_VERSION.tar.xz
576       (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
577
578       wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
579       tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
580       (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
581
582       # Meson requires ninja >= 1.6, but trusty has 1.3.x
583       wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
584       unzip ninja-linux.zip
585       mv ninja $HOME/prefix/bin/
586
587       # Generate this header since one is missing on the Travis instance
588       mkdir -p linux
589       printf "%s\n" \
590            "#ifndef _LINUX_MEMFD_H" \
591            "#define _LINUX_MEMFD_H" \
592            "" \
593            "#define MFD_CLOEXEC             0x0001U" \
594            "#define MFD_ALLOW_SEALING       0x0002U" \
595            "" \
596            "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
597
598       # Generate this header, including the missing SYS_memfd_create
599       # macro, which is not provided by the header in the Travis
600       # instance
601       mkdir -p sys
602       printf "%s\n" \
603            "#ifndef _SYSCALL_H" \
604            "#define _SYSCALL_H      1" \
605            "" \
606            "#include <asm/unistd.h>" \
607            "" \
608            "#ifndef _LIBC" \
609            "# include <bits/syscall.h>" \
610            "#endif" \
611            "" \
612            "#ifndef __NR_memfd_create" \
613            "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
614            "#endif" \
615            "" \
616            "#ifndef SYS_memfd_create" \
617            "# define SYS_memfd_create __NR_memfd_create" \
618            "#endif" \
619            "" \
620            "#endif" > sys/syscall.h
621     fi
622
623 script:
624   - if test "x$BUILD" = xmake; then
625       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
626       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
627       test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
628
629       export CFLAGS="$CFLAGS -isystem`pwd`";
630
631       mkdir build &&
632       cd build &&
633       ../autogen.sh --enable-debug
634         $LIBUNWIND_FLAGS
635         $DRI_LOADERS
636         --with-dri-drivers=$DRI_DRIVERS
637         $GALLIUM_ST
638         --with-gallium-drivers=$GALLIUM_DRIVERS
639         --with-vulkan-drivers=$VULKAN_DRIVERS
640         --disable-llvm-shared-libs
641         &&
642       make && eval $MAKE_CHECK_COMMAND;
643     fi
644
645   - if test "x$BUILD" = xscons; then
646       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
647       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
648       scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
649     fi
650
651   - |
652     if test "x$BUILD" = xmeson; then
653
654       if test "x$TRAVIS_OS_NAME" == xosx; then
655         MESON_OPTIONS="-Degl=false"
656       fi
657
658       if test "x$TRAVIS_OS_NAME" == xlinux; then
659         MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
660       fi
661
662       # Travis CI has moved to LLVM 5.0, and meson is detecting
663       # automatically the available version in /usr/local/bin based on
664       # the PATH env variable order preference.
665       #
666       # As for 0.44.x, Meson cannot receive the path to the
667       # llvm-config binary as a configuration parameter. See
668       # https://github.com/mesonbuild/meson/issues/2887 and
669       # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
670       #
671       # We want to use the custom (APT) installed version. Therefore,
672       # let's make Meson find our wanted version sooner than the one
673       # at /usr/local/bin
674       #
675       # Once this is corrected, we would still need a patch similar
676       # to:
677       # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
678       test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
679
680       export CFLAGS="$CFLAGS -isystem`pwd`"
681       meson _build $MESON_OPTIONS
682       ninja -C _build
683     fi