OSDN Git Service

cherry-ignore: add gitlab-ci fixup commit
[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             - libx11-xcb-dev
56             - libelf-dev
57             - python3.5
58             - python3-pip
59     - env:
60         - LABEL="meson loaders/classic DRI"
61         - BUILD=meson
62         - DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
63         - GALLIUM_DRIVERS=""
64         - VULKAN_DRIVERS=""
65       addons:
66         apt:
67           packages:
68             - xz-utils
69             - x11proto-xf86vidmode-dev
70             - libexpat1-dev
71             - libx11-xcb-dev
72             - libxdamage-dev
73             - libxfixes-dev
74             - python3.5
75             - python3-pip
76     - env:
77         - LABEL="make loaders/classic DRI"
78         - BUILD=make
79         - MAKEFLAGS="-j4"
80         - MAKE_CHECK_COMMAND="make check"
81         - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
82         - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
83         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
84         - GALLIUM_DRIVERS=""
85         - VULKAN_DRIVERS=""
86         - LIBUNWIND_FLAGS="--disable-libunwind"
87       addons:
88         apt:
89           packages:
90             - xz-utils
91             - x11proto-xf86vidmode-dev
92             - libexpat1-dev
93             - libx11-xcb-dev
94             - libxdamage-dev
95             - libxfixes-dev
96             - python3-pip
97     - env:
98         # NOTE: Building SWR is 2x (yes two) times slower than all the other
99         # gallium drivers combined.
100         # Start this early so that it doesn't hunder the run time.
101         - LABEL="make Gallium Drivers SWR"
102         - BUILD=make
103         - MAKEFLAGS="-j4"
104         - MAKE_CHECK_COMMAND="true"
105         - LLVM_VERSION=6.0
106         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
107         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
108         - DRI_DRIVERS=""
109         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
110         - GALLIUM_DRIVERS="swr"
111         - VULKAN_DRIVERS=""
112         - LIBUNWIND_FLAGS="--enable-libunwind"
113       addons:
114         apt:
115           sources:
116             - llvm-toolchain-trusty-6.0
117             # llvm-6 requires libstdc++4.9 which is not in main repo
118             - ubuntu-toolchain-r-test
119           packages:
120             # From sources above
121             - llvm-6.0-dev
122             # Common
123             - xz-utils
124             - libexpat1-dev
125             - libx11-xcb-dev
126             - libelf-dev
127             - libunwind8-dev
128             - python3-pip
129     - env:
130         - LABEL="make Gallium Drivers RadeonSI"
131         - BUILD=make
132         - MAKEFLAGS="-j4"
133         - MAKE_CHECK_COMMAND="true"
134         - LLVM_VERSION=6.0
135         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
136         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
137         - DRI_DRIVERS=""
138         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
139         - GALLIUM_DRIVERS="radeonsi"
140         - VULKAN_DRIVERS=""
141         - LIBUNWIND_FLAGS="--enable-libunwind"
142       addons:
143         apt:
144           sources:
145             - llvm-toolchain-trusty-6.0
146             # llvm-6 requires libstdc++4.9 which is not in main repo
147             - ubuntu-toolchain-r-test
148           packages:
149             # From sources above
150             - llvm-6.0-dev
151             # Common
152             - xz-utils
153             - libexpat1-dev
154             - libx11-xcb-dev
155             - libelf-dev
156             - libunwind8-dev
157             - python3-pip
158     - env:
159         - LABEL="make Gallium Drivers Other"
160         - BUILD=make
161         - MAKEFLAGS="-j4"
162         - MAKE_CHECK_COMMAND="true"
163         - LLVM_VERSION=3.9
164         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
165         # New binutils linker is required for llvm-3.9
166         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
167         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
168         - DRI_DRIVERS=""
169         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
170         - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,imx"
171         - VULKAN_DRIVERS=""
172         - LIBUNWIND_FLAGS="--enable-libunwind"
173       addons:
174         apt:
175           sources:
176             - llvm-toolchain-trusty-3.9
177           packages:
178             - binutils-2.26
179             # LLVM packaging is broken and misses these dependencies
180             - libedit-dev
181             # From sources above
182             - llvm-3.9-dev
183             # Common
184             - xz-utils
185             - libexpat1-dev
186             - libx11-xcb-dev
187             - libelf-dev
188             - libunwind8-dev
189             - python3-pip
190     - env:
191         - LABEL="make Gallium ST Clover LLVM-3.9"
192         - BUILD=make
193         - MAKEFLAGS="-j4"
194         - MAKE_CHECK_COMMAND="true"
195         - LLVM_VERSION=3.9
196         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
197         - OVERRIDE_CC=gcc-4.7
198         - OVERRIDE_CXX=g++-4.7
199         # New binutils linker is required for llvm-3.9
200         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
201         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
202         - DRI_DRIVERS=""
203         - 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"
204         - GALLIUM_DRIVERS="r600"
205         - VULKAN_DRIVERS=""
206         - LIBUNWIND_FLAGS="--enable-libunwind"
207       addons:
208         apt:
209           sources:
210             - llvm-toolchain-trusty-3.9
211           packages:
212             - binutils-2.26
213             - libclc-dev
214             # LLVM packaging is broken and misses these dependencies
215             - libedit-dev
216             - g++-4.7
217             # From sources above
218             - llvm-3.9-dev
219             - clang-3.9
220             - libclang-3.9-dev
221             # Common
222             - xz-utils
223             - libexpat1-dev
224             - libx11-xcb-dev
225             - libelf-dev
226             - libunwind8-dev
227             - python3-pip
228     - env:
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             - libexpat1-dev
259             - libx11-xcb-dev
260             - libelf-dev
261             - libunwind8-dev
262             - python3-pip
263     - env:
264         - LABEL="make Gallium ST Clover LLVM-5.0"
265         - BUILD=make
266         - MAKEFLAGS="-j4"
267         - MAKE_CHECK_COMMAND="true"
268         - LLVM_VERSION=5.0
269         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
270         - OVERRIDE_CC=gcc-4.8
271         - OVERRIDE_CXX=g++-4.8
272         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
273         - DRI_DRIVERS=""
274         - 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"
275         - GALLIUM_DRIVERS="r600"
276         - VULKAN_DRIVERS=""
277         - LIBUNWIND_FLAGS="--enable-libunwind"
278       addons:
279         apt:
280           sources:
281             - llvm-toolchain-trusty-5.0
282           packages:
283             - libclc-dev
284             # LLVM packaging is broken and misses these dependencies
285             - libedit-dev
286             - g++-4.8
287             # From sources above
288             - llvm-5.0-dev
289             - clang-5.0
290             - libclang-5.0-dev
291             # Common
292             - xz-utils
293             - libexpat1-dev
294             - libx11-xcb-dev
295             - libelf-dev
296             - libunwind8-dev
297             - python3-pip
298     - env:
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             - libexpat1-dev
326             - libx11-xcb-dev
327             - libelf-dev
328             - libunwind8-dev
329             - python3-pip
330     - env:
331         - LABEL="make Gallium ST Clover LLVM-7"
332         - BUILD=make
333         - MAKEFLAGS="-j4"
334         - MAKE_CHECK_COMMAND="true"
335         - LLVM_VERSION=7
336         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
337         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
338         - DRI_DRIVERS=""
339         - 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"
340         - GALLIUM_DRIVERS="r600,radeonsi"
341         - VULKAN_DRIVERS=""
342         - LIBUNWIND_FLAGS="--enable-libunwind"
343       addons:
344         apt:
345           sources:
346             - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-7 main'
347               key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
348             # llvm-7 requires libstdc++4.9 which is not in main repo
349             - ubuntu-toolchain-r-test
350           packages:
351             - libclc-dev
352             # From sources above
353             - llvm-7-dev
354             - clang-7
355             - libclang-7-dev
356             # Common
357             - xz-utils
358             - libexpat1-dev
359             - libx11-xcb-dev
360             - libelf-dev
361             - libunwind8-dev
362     - env:
363         - LABEL="make Gallium ST Other"
364         - BUILD=make
365         - MAKEFLAGS="-j4"
366         - MAKE_CHECK_COMMAND="true"
367         - LLVM_VERSION=3.3
368         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
369         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
370         - DRI_DRIVERS=""
371         - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
372         # We need swrast for osmesa and nine.
373         # i915 most likely doesn't work with most ST.
374         # Regardless - we're doing a quick build test here.
375         - GALLIUM_DRIVERS="i915,swrast"
376         - VULKAN_DRIVERS=""
377         - LIBUNWIND_FLAGS="--enable-libunwind"
378       addons:
379         apt:
380           packages:
381             # We actually want to test against llvm-3.3
382             - llvm-3.3-dev
383             # Nine requires gcc 4.6... which is the one we have right ?
384             - libxvmc-dev
385             # Build locally, for now.
386             #- libvdpau-dev
387             #- libva-dev
388             - libomxil-bellagio-dev
389             # LLVM packaging is broken and misses these dependencies
390             - libedit-dev
391             # Common
392             - xz-utils
393             - libexpat1-dev
394             - libx11-xcb-dev
395             - libelf-dev
396             - libunwind8-dev
397             - python3-pip
398     - env:
399         - LABEL="make Vulkan"
400         - BUILD=make
401         - MAKEFLAGS="-j4"
402         - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
403         - LLVM_VERSION=6.0
404         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
405         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
406         - DRI_DRIVERS=""
407         - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
408         - GALLIUM_DRIVERS=""
409         - VULKAN_DRIVERS="intel,radeon"
410         - LIBUNWIND_FLAGS="--disable-libunwind"
411       addons:
412         apt:
413           sources:
414             - llvm-toolchain-trusty-6.0
415             # llvm-6 requires libstdc++4.9 which is not in main repo
416             - ubuntu-toolchain-r-test
417           packages:
418             # From sources above
419             - llvm-6.0-dev
420             # Common
421             - xz-utils
422             - libexpat1-dev
423             - libx11-xcb-dev
424             - libelf-dev
425             - python3-pip
426     - env:
427         - LABEL="scons"
428         - BUILD=scons
429         - SCONSFLAGS="-j4"
430         # Explicitly disable.
431         - SCONS_TARGET="llvm=0"
432         # Keep it symmetrical to the make build.
433         - SCONS_CHECK_COMMAND="scons llvm=0 check"
434       addons:
435         apt:
436           packages:
437             # Common
438             - xz-utils
439             - x11proto-xf86vidmode-dev
440             - libexpat1-dev
441             - libx11-xcb-dev
442             - libelf-dev
443     - env:
444         - LABEL="scons LLVM"
445         - BUILD=scons
446         - SCONSFLAGS="-j4"
447         - SCONS_TARGET="llvm=1"
448         # Keep it symmetrical to the make build.
449         - SCONS_CHECK_COMMAND="scons llvm=1 check"
450         - LLVM_VERSION=3.3
451         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
452       addons:
453         apt:
454           packages:
455             # LLVM packaging is broken and misses these dependencies
456             - libedit-dev
457             - llvm-3.3-dev
458             # Common
459             - xz-utils
460             - x11proto-xf86vidmode-dev
461             - libexpat1-dev
462             - libx11-xcb-dev
463             - libelf-dev
464     - env:
465         - LABEL="scons SWR"
466         - BUILD=scons
467         - SCONSFLAGS="-j4"
468         - SCONS_TARGET="swr=1"
469         - LLVM_VERSION=6.0
470         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
471         # Keep it symmetrical to the make build. There's no actual SWR, yet.
472         - SCONS_CHECK_COMMAND="true"
473       addons:
474         apt:
475           sources:
476             - llvm-toolchain-trusty-6.0
477             # llvm-6 requires libstdc++4.9 which is not in main repo
478             - ubuntu-toolchain-r-test
479           packages:
480             # From sources above
481             - llvm-6.0-dev
482             # Common
483             - xz-utils
484             - x11proto-xf86vidmode-dev
485             - libexpat1-dev
486             - libx11-xcb-dev
487             - libelf-dev
488     - env:
489         - LABEL="macOS make"
490         - BUILD=make
491         - MAKEFLAGS="-j4"
492         - MAKE_CHECK_COMMAND="make check"
493         - DRI_LOADERS="--with-platforms=x11 --disable-egl"
494       os: osx
495     - env:
496         - LABEL="macOS meson"
497         - BUILD=meson
498       os: osx
499
500 before_install:
501   - |
502     if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
503       HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
504       # Set PATH for homebrew pip3 installs
505       PATH="$HOME/Library/Python/3.6/bin:${PATH}"
506       # Set PKG_CONFIG_PATH for keg-only expat
507       PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
508       # Set PATH for keg-only gettext
509       PATH="/usr/local/opt/gettext/bin:${PATH}"
510
511       # Install xquartz for prereqs ...
512       XQUARTZ_VERSION="2.7.11"
513       wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
514       hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
515       sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
516       hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
517       # ... and set paths
518       PATH="/opt/X11/bin:${PATH}"
519       PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
520       ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
521     fi
522
523 install:
524   # Install a more modern meson from pip, since the version in the
525   # ubuntu repos is often quite old. This requires python>=3.5, so
526   # let's make it default
527   - if test "x$BUILD" = xmeson; then
528       sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 10;
529       pip3 install --user meson;
530       pip3 install --user mako;
531     fi
532
533   # Install autotools build dependencies
534   - if test "x$BUILD" = xmake; then
535       pip2 install --user mako;
536     fi
537
538   # Install a more modern scons from pip.
539   - if test "x$BUILD" = xscons; then
540       pip2 install --user "scons>=2.4";
541       pip2 install --user mako;
542     fi
543
544   # Since libdrm gets updated in configure.ac regularly, try to pick up the
545   # latest version from there.
546   - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
547       old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
548       new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
549       if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
550         export LIBDRM_VERSION="libdrm-$new_ver";
551       fi;
552     done
553
554   # Install dependencies where we require specific versions (or where
555   # disallowed by Travis CI's package whitelisting).
556
557   - |
558     if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
559       wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
560       tar -jxvf $XORGMACROS_VERSION.tar.bz2
561       (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
562
563       wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
564       tar -jxvf $GLPROTO_VERSION.tar.bz2
565       (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
566
567       wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
568       tar -jxvf $DRI2PROTO_VERSION.tar.bz2
569       (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
570
571       wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
572       tar -jxvf $XCBPROTO_VERSION.tar.bz2
573       (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
574
575       wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
576       tar -jxvf $LIBXCB_VERSION.tar.bz2
577       (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
578
579       wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
580       tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
581       (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
582
583       wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
584       tar -jxvf $LIBDRM_VERSION.tar.bz2
585       (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
586
587       wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
588       tar -jxvf $RANDRPROTO_VERSION.tar.bz2
589       (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
590
591       wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
592       tar -jxvf $LIBXRANDR_VERSION.tar.bz2
593       (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
594
595       wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
596       tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
597       (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
598
599       wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
600       tar -jxvf $LIBVDPAU_VERSION.tar.bz2
601       (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
602
603       wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
604       tar -jxvf $LIBVA_VERSION.tar.bz2
605       (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
606
607       wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
608       tar -axvf $LIBWAYLAND_VERSION.tar.xz
609       (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
610
611       wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
612       tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
613       (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
614
615       # Meson requires ninja >= 1.6, but trusty has 1.3.x
616       wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
617       unzip ninja-linux.zip
618       mv ninja $HOME/prefix/bin/
619
620       # Generate this header since one is missing on the Travis instance
621       mkdir -p linux
622       printf "%s\n" \
623            "#ifndef _LINUX_MEMFD_H" \
624            "#define _LINUX_MEMFD_H" \
625            "" \
626            "#define MFD_CLOEXEC             0x0001U" \
627            "#define MFD_ALLOW_SEALING       0x0002U" \
628            "" \
629            "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
630
631       # Generate this header, including the missing SYS_memfd_create
632       # macro, which is not provided by the header in the Travis
633       # instance
634       mkdir -p sys
635       printf "%s\n" \
636            "#ifndef _SYSCALL_H" \
637            "#define _SYSCALL_H      1" \
638            "" \
639            "#include <asm/unistd.h>" \
640            "" \
641            "#ifndef _LIBC" \
642            "# include <bits/syscall.h>" \
643            "#endif" \
644            "" \
645            "#ifndef __NR_memfd_create" \
646            "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
647            "#endif" \
648            "" \
649            "#ifndef SYS_memfd_create" \
650            "# define SYS_memfd_create __NR_memfd_create" \
651            "#endif" \
652            "" \
653            "#endif" > sys/syscall.h
654     fi
655
656 script:
657   - if test "x$BUILD" = xmake; then
658       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
659       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
660       test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
661
662       export CFLAGS="$CFLAGS -isystem`pwd`";
663
664       mkdir build &&
665       cd build &&
666       ../autogen.sh --enable-debug
667         $LIBUNWIND_FLAGS
668         $DRI_LOADERS
669         --with-dri-drivers=$DRI_DRIVERS
670         $GALLIUM_ST
671         --with-gallium-drivers=$GALLIUM_DRIVERS
672         --with-vulkan-drivers=$VULKAN_DRIVERS
673         --disable-llvm-shared-libs
674         &&
675       make && eval $MAKE_CHECK_COMMAND;
676     fi
677
678   - if test "x$BUILD" = xscons; then
679       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
680       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
681       scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
682     fi
683
684   - |
685     if test "x$BUILD" = xmeson; then
686
687       if test "x$TRAVIS_OS_NAME" == xosx; then
688         MESON_OPTIONS="-Degl=false"
689       fi
690
691       if test "x$TRAVIS_OS_NAME" == xlinux; then
692         MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
693       fi
694
695       # Travis CI has moved to LLVM 5.0, and meson is detecting
696       # automatically the available version in /usr/local/bin based on
697       # the PATH env variable order preference.
698       #
699       # As for 0.44.x, Meson cannot receive the path to the
700       # llvm-config binary as a configuration parameter. See
701       # https://github.com/mesonbuild/meson/issues/2887 and
702       # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
703       #
704       # We want to use the custom (APT) installed version. Therefore,
705       # let's make Meson find our wanted version sooner than the one
706       # at /usr/local/bin
707       #
708       # Once this is corrected, we would still need a patch similar
709       # to:
710       # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
711       test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
712
713       export CFLAGS="$CFLAGS -isystem`pwd`"
714       meson _build $MESON_OPTIONS
715       ninja -C _build
716     fi