OSDN Git Service

python: Fix inequality comparisons
[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 depends on gcc-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=5.0
102         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
103         - OVERRIDE_CC="gcc-4.8"
104         - OVERRIDE_CXX="g++-4.8"
105         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
106         - DRI_DRIVERS=""
107         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
108         - GALLIUM_DRIVERS="swr"
109         - VULKAN_DRIVERS=""
110         - LIBUNWIND_FLAGS="--enable-libunwind"
111       addons:
112         apt:
113           sources:
114             - llvm-toolchain-trusty-5.0
115           packages:
116             # LLVM packaging is broken and misses these dependencies
117             - libedit-dev
118             # From sources above
119             - llvm-5.0-dev
120             # Common
121             - xz-utils
122             - x11proto-xf86vidmode-dev
123             - libexpat1-dev
124             - libx11-xcb-dev
125             - libelf-dev
126             - libunwind8-dev
127     - env:
128         - LABEL="make Gallium Drivers RadeonSI"
129         - BUILD=make
130         - MAKEFLAGS="-j4"
131         - MAKE_CHECK_COMMAND="true"
132         - LLVM_VERSION=6.0
133         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
134         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
135         - DRI_DRIVERS=""
136         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
137         - GALLIUM_DRIVERS="radeonsi"
138         - VULKAN_DRIVERS=""
139         - LIBUNWIND_FLAGS="--enable-libunwind"
140       addons:
141         apt:
142           sources:
143             - llvm-toolchain-trusty-6.0
144             # llvm-6 depends on gcc-4.9 which is not in main repo
145             - ubuntu-toolchain-r-test
146           packages:
147             # From sources above
148             - llvm-6.0-dev
149             # Common
150             - xz-utils
151             - x11proto-xf86vidmode-dev
152             - libexpat1-dev
153             - libx11-xcb-dev
154             - libelf-dev
155             - libunwind8-dev
156     - env:
157         - LABEL="make Gallium Drivers Other"
158         - BUILD=make
159         - MAKEFLAGS="-j4"
160         - MAKE_CHECK_COMMAND="true"
161         - LLVM_VERSION=3.9
162         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
163         # New binutils linker is required for llvm-3.9
164         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
165         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
166         - DRI_DRIVERS=""
167         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
168         - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,imx"
169         - VULKAN_DRIVERS=""
170         - LIBUNWIND_FLAGS="--enable-libunwind"
171       addons:
172         apt:
173           sources:
174             - llvm-toolchain-trusty-3.9
175           packages:
176             - binutils-2.26
177             # LLVM packaging is broken and misses these dependencies
178             - libedit-dev
179             # From sources above
180             - llvm-3.9-dev
181             # Common
182             - xz-utils
183             - x11proto-xf86vidmode-dev
184             - libexpat1-dev
185             - libx11-xcb-dev
186             - libelf-dev
187             - libunwind8-dev
188     - env:
189         # NOTE: Analogous to SWR above, building Clover is quite slow.
190         - LABEL="make Gallium ST Clover LLVM-3.9"
191         - BUILD=make
192         - MAKEFLAGS="-j4"
193         - MAKE_CHECK_COMMAND="true"
194         - LLVM_VERSION=3.9
195         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
196         - OVERRIDE_CC=gcc-4.7
197         - OVERRIDE_CXX=g++-4.7
198         # New binutils linker is required for llvm-3.9
199         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
200         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
201         - DRI_DRIVERS=""
202         - 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"
203         - GALLIUM_DRIVERS="r600"
204         - VULKAN_DRIVERS=""
205         - LIBUNWIND_FLAGS="--enable-libunwind"
206       addons:
207         apt:
208           sources:
209             - llvm-toolchain-trusty-3.9
210           packages:
211             - binutils-2.26
212             - libclc-dev
213             # LLVM packaging is broken and misses these dependencies
214             - libedit-dev
215             - g++-4.7
216             # From sources above
217             - llvm-3.9-dev
218             - clang-3.9
219             - libclang-3.9-dev
220             # Common
221             - xz-utils
222             - x11proto-xf86vidmode-dev
223             - libexpat1-dev
224             - libx11-xcb-dev
225             - libelf-dev
226             - libunwind8-dev
227     - env:
228         # NOTE: Analogous to SWR above, building Clover is quite slow.
229         - LABEL="make Gallium ST Clover LLVM-4.0"
230         - BUILD=make
231         - MAKEFLAGS="-j4"
232         - MAKE_CHECK_COMMAND="true"
233         - LLVM_VERSION=4.0
234         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
235         - OVERRIDE_CC=gcc-4.8
236         - OVERRIDE_CXX=g++-4.8
237         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
238         - DRI_DRIVERS=""
239         - 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"
240         - GALLIUM_DRIVERS="r600"
241         - VULKAN_DRIVERS=""
242         - LIBUNWIND_FLAGS="--enable-libunwind"
243       addons:
244         apt:
245           sources:
246             - llvm-toolchain-trusty-4.0
247           packages:
248             - libclc-dev
249             # LLVM packaging is broken and misses these dependencies
250             - libedit-dev
251             - g++-4.8
252             # From sources above
253             - llvm-4.0-dev
254             - clang-4.0
255             - libclang-4.0-dev
256             # Common
257             - xz-utils
258             - x11proto-xf86vidmode-dev
259             - libexpat1-dev
260             - libx11-xcb-dev
261             - libelf-dev
262             - libunwind8-dev
263     - env:
264         # NOTE: Analogous to SWR above, building Clover is quite slow.
265         - LABEL="make Gallium ST Clover LLVM-5.0"
266         - BUILD=make
267         - MAKEFLAGS="-j4"
268         - MAKE_CHECK_COMMAND="true"
269         - LLVM_VERSION=5.0
270         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
271         - OVERRIDE_CC=gcc-4.8
272         - OVERRIDE_CXX=g++-4.8
273         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
274         - DRI_DRIVERS=""
275         - 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"
276         - GALLIUM_DRIVERS="r600"
277         - VULKAN_DRIVERS=""
278         - LIBUNWIND_FLAGS="--enable-libunwind"
279       addons:
280         apt:
281           sources:
282             - llvm-toolchain-trusty-5.0
283           packages:
284             - libclc-dev
285             # LLVM packaging is broken and misses these dependencies
286             - libedit-dev
287             - g++-4.8
288             # From sources above
289             - llvm-5.0-dev
290             - clang-5.0
291             - libclang-5.0-dev
292             # Common
293             - xz-utils
294             - x11proto-xf86vidmode-dev
295             - libexpat1-dev
296             - libx11-xcb-dev
297             - libelf-dev
298             - libunwind8-dev
299     - env:
300         # NOTE: Analogous to SWR above, building Clover is quite slow.
301         - LABEL="make Gallium ST Clover LLVM-6.0"
302         - BUILD=make
303         - MAKEFLAGS="-j4"
304         - MAKE_CHECK_COMMAND="true"
305         - LLVM_VERSION=6.0
306         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
307         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
308         - DRI_DRIVERS=""
309         - 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"
310         - GALLIUM_DRIVERS="r600,radeonsi"
311         - VULKAN_DRIVERS=""
312         - LIBUNWIND_FLAGS="--enable-libunwind"
313       addons:
314         apt:
315           sources:
316             - llvm-toolchain-trusty-6.0
317             # llvm-6 depends on gcc-4.9 which is not in main repo
318             - ubuntu-toolchain-r-test
319           packages:
320             - libclc-dev
321             # From sources above
322             - llvm-6.0-dev
323             - clang-6.0
324             - libclang-6.0-dev
325             # Common
326             - xz-utils
327             - x11proto-xf86vidmode-dev
328             - libexpat1-dev
329             - libx11-xcb-dev
330             - libelf-dev
331             - libunwind8-dev
332     - env:
333         - LABEL="make Gallium ST Other"
334         - BUILD=make
335         - MAKEFLAGS="-j4"
336         - MAKE_CHECK_COMMAND="true"
337         - LLVM_VERSION=3.3
338         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
339         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
340         - DRI_DRIVERS=""
341         - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
342         # We need swrast for osmesa and nine.
343         # i915 most likely doesn't work with most ST.
344         # Regardless - we're doing a quick build test here.
345         - GALLIUM_DRIVERS="i915,swrast"
346         - VULKAN_DRIVERS=""
347         - LIBUNWIND_FLAGS="--enable-libunwind"
348       addons:
349         apt:
350           packages:
351             # We actually want to test against llvm-3.3
352             - llvm-3.3-dev
353             # Nine requires gcc 4.6... which is the one we have right ?
354             - libxvmc-dev
355             # Build locally, for now.
356             #- libvdpau-dev
357             #- libva-dev
358             - libomxil-bellagio-dev
359             # LLVM packaging is broken and misses these dependencies
360             - libedit-dev
361             # Common
362             - xz-utils
363             - x11proto-xf86vidmode-dev
364             - libexpat1-dev
365             - libx11-xcb-dev
366             - libelf-dev
367             - libunwind8-dev
368     - env:
369         - LABEL="make Vulkan"
370         - BUILD=make
371         - MAKEFLAGS="-j4"
372         - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
373         - LLVM_VERSION=6.0
374         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
375         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
376         - DRI_DRIVERS=""
377         - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
378         - GALLIUM_DRIVERS=""
379         - VULKAN_DRIVERS="intel,radeon"
380         - LIBUNWIND_FLAGS="--disable-libunwind"
381       addons:
382         apt:
383           sources:
384             - llvm-toolchain-trusty-6.0
385             # llvm-6 depends on gcc-4.9 which is not in main repo
386             - ubuntu-toolchain-r-test
387           packages:
388             # From sources above
389             - llvm-6.0-dev
390             # Common
391             - xz-utils
392             - x11proto-xf86vidmode-dev
393             - libexpat1-dev
394             - libx11-xcb-dev
395             - libelf-dev
396     - env:
397         - LABEL="scons"
398         - BUILD=scons
399         - SCONSFLAGS="-j4"
400         # Explicitly disable.
401         - SCONS_TARGET="llvm=0"
402         # Keep it symmetrical to the make build.
403         - SCONS_CHECK_COMMAND="scons llvm=0 check"
404       addons:
405         apt:
406           packages:
407             # Common
408             - xz-utils
409             - x11proto-xf86vidmode-dev
410             - libexpat1-dev
411             - libx11-xcb-dev
412             - libelf-dev
413     - env:
414         - LABEL="scons LLVM"
415         - BUILD=scons
416         - SCONSFLAGS="-j4"
417         - SCONS_TARGET="llvm=1"
418         # Keep it symmetrical to the make build.
419         - SCONS_CHECK_COMMAND="scons llvm=1 check"
420         - LLVM_VERSION=3.3
421         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
422       addons:
423         apt:
424           packages:
425             # LLVM packaging is broken and misses these dependencies
426             - libedit-dev
427             - llvm-3.3-dev
428             # Common
429             - xz-utils
430             - x11proto-xf86vidmode-dev
431             - libexpat1-dev
432             - libx11-xcb-dev
433             - libelf-dev
434     - env:
435         - LABEL="scons SWR"
436         - BUILD=scons
437         - SCONSFLAGS="-j4"
438         - SCONS_TARGET="swr=1"
439         - LLVM_VERSION=5.0
440         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
441         # Keep it symmetrical to the make build. There's no actual SWR, yet.
442         - SCONS_CHECK_COMMAND="true"
443         - OVERRIDE_CC="gcc-4.8"
444         - OVERRIDE_CXX="g++-4.8"
445       addons:
446         apt:
447           sources:
448             - llvm-toolchain-trusty-5.0
449           packages:
450             # LLVM packaging is broken and misses these dependencies
451             - libedit-dev
452             # From sources above
453             - llvm-5.0-dev
454             # Common
455             - xz-utils
456             - x11proto-xf86vidmode-dev
457             - libexpat1-dev
458             - libx11-xcb-dev
459             - libelf-dev
460     - env:
461         - LABEL="macOS make"
462         - BUILD=make
463         - MAKEFLAGS="-j4"
464         - MAKE_CHECK_COMMAND="make check"
465         - DRI_LOADERS="--with-platforms=x11 --disable-egl"
466       os: osx
467     - env:
468         - LABEL="macOS meson"
469         - BUILD=meson
470       os: osx
471
472 before_install:
473   - |
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}"
482
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}
489       # ... and set paths
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"
493     fi
494
495 install:
496   - pip2 install --user mako
497
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
500   # 3.5+
501   - if test "x$BUILD" = xmeson; then
502       pip3 install --user "meson<0.45.0";
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     fi
509
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";
517       fi;
518     done
519
520   # Install dependencies where we require specific versions (or where
521   # disallowed by Travis CI's package whitelisting).
522
523   - |
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)
528
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)
532
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)
536
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)
540
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)
544
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)
548
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)
552
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)
556
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)
560
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)
564
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)
568
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)
572
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)
576
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)
580
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/
585
586       # Generate this header since one is missing on the Travis instance
587       mkdir -p linux
588       printf "%s\n" \
589            "#ifndef _LINUX_MEMFD_H" \
590            "#define _LINUX_MEMFD_H" \
591            "" \
592            "#define MFD_CLOEXEC             0x0001U" \
593            "#define MFD_ALLOW_SEALING       0x0002U" \
594            "" \
595            "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
596
597       # Generate this header, including the missing SYS_memfd_create
598       # macro, which is not provided by the header in the Travis
599       # instance
600       mkdir -p sys
601       printf "%s\n" \
602            "#ifndef _SYSCALL_H" \
603            "#define _SYSCALL_H      1" \
604            "" \
605            "#include <asm/unistd.h>" \
606            "" \
607            "#ifndef _LIBC" \
608            "# include <bits/syscall.h>" \
609            "#endif" \
610            "" \
611            "#ifndef __NR_memfd_create" \
612            "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
613            "#endif" \
614            "" \
615            "#ifndef SYS_memfd_create" \
616            "# define SYS_memfd_create __NR_memfd_create" \
617            "#endif" \
618            "" \
619            "#endif" > sys/syscall.h
620     fi
621
622 script:
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";
627
628       export CFLAGS="$CFLAGS -isystem`pwd`";
629
630       mkdir build &&
631       cd build &&
632       ../autogen.sh --enable-debug
633         $LIBUNWIND_FLAGS
634         $DRI_LOADERS
635         --with-dri-drivers=$DRI_DRIVERS
636         $GALLIUM_ST
637         --with-gallium-drivers=$GALLIUM_DRIVERS
638         --with-vulkan-drivers=$VULKAN_DRIVERS
639         --disable-llvm-shared-libs
640         &&
641       make && eval $MAKE_CHECK_COMMAND;
642     fi
643
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;
648     fi
649
650   - |
651     if test "x$BUILD" = xmeson; then
652
653       if test "x$TRAVIS_OS_NAME" == xosx; then
654         MESON_OPTIONS="-Degl=false"
655       fi
656
657       if test "x$TRAVIS_OS_NAME" == xlinux; then
658         MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
659       fi
660
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.
664       #
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
669       #
670       # We want to use the custom (APT) installed version. Therefore,
671       # let's make Meson find our wanted version sooner than the one
672       # at /usr/local/bin
673       #
674       # Once this is corrected, we would still need a patch similar
675       # to:
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
678
679       export CFLAGS="$CFLAGS -isystem`pwd`"
680       meson _build $MESON_OPTIONS
681       ninja -C _build
682     fi