travis: add ubuntu-toolchain-r-test
[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 - MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
39 - LLVM_VERSION=5.0
40 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
41 addons:
42 apt:
43 sources:
44 - llvm-toolchain-trusty-5.0
45 packages:
46 # LLVM packaging is broken and misses these dependencies
47 - libedit-dev
48 # From sources above
49 - llvm-5.0-dev
50 # Common
51 - xz-utils
52 - libexpat1-dev
53 - libelf-dev
54 - python3-pip
55 - env:
56 - LABEL="meson loaders/classic DRI"
57 - BUILD=meson
58 - MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
59 addons:
60 apt:
61 packages:
62 - xz-utils
63 - x11proto-xf86vidmode-dev
64 - libexpat1-dev
65 - libx11-xcb-dev
66 - libxdamage-dev
67 - libxfixes-dev
68 - python3-pip
69 - env:
70 - LABEL="make loaders/classic DRI"
71 - BUILD=make
72 - MAKEFLAGS="-j4"
73 - MAKE_CHECK_COMMAND="make check"
74 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
75 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
76 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
77 - GALLIUM_DRIVERS=""
78 - VULKAN_DRIVERS=""
79 - LIBUNWIND_FLAGS="--disable-libunwind"
80 addons:
81 apt:
82 packages:
83 - xz-utils
84 - x11proto-xf86vidmode-dev
85 - libexpat1-dev
86 - libx11-xcb-dev
87 - libxdamage-dev
88 - libxfixes-dev
89 - env:
90 # NOTE: Building SWR is 2x (yes two) times slower than all the other
91 # gallium drivers combined.
92 # Start this early so that it doesn't hunder the run time.
93 - LABEL="make Gallium Drivers SWR"
94 - BUILD=make
95 - MAKEFLAGS="-j4"
96 - MAKE_CHECK_COMMAND="true"
97 - LLVM_VERSION=5.0
98 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
99 - OVERRIDE_CC="gcc-4.8"
100 - OVERRIDE_CXX="g++-4.8"
101 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
102 - DRI_DRIVERS=""
103 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
104 - GALLIUM_DRIVERS="swr"
105 - VULKAN_DRIVERS=""
106 - LIBUNWIND_FLAGS="--enable-libunwind"
107 addons:
108 apt:
109 sources:
110 - llvm-toolchain-trusty-5.0
111 packages:
112 # LLVM packaging is broken and misses these dependencies
113 - libedit-dev
114 # From sources above
115 - llvm-5.0-dev
116 # Common
117 - xz-utils
118 - x11proto-xf86vidmode-dev
119 - libexpat1-dev
120 - libx11-xcb-dev
121 - libelf-dev
122 - libunwind8-dev
123 - env:
124 - LABEL="make Gallium Drivers RadeonSI"
125 - BUILD=make
126 - MAKEFLAGS="-j4"
127 - MAKE_CHECK_COMMAND="true"
128 - LLVM_VERSION=6.0
129 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
130 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
131 - DRI_DRIVERS=""
132 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
133 - GALLIUM_DRIVERS="radeonsi"
134 - VULKAN_DRIVERS=""
135 - LIBUNWIND_FLAGS="--enable-libunwind"
136 addons:
137 apt:
138 sources:
139 - llvm-toolchain-trusty-6.0
140 # llvm-6 depends on gcc-4.9 which is not in main repo
141 - ubuntu-toolchain-r-test
142 packages:
143 # LLVM packaging is broken and misses these dependencies
144 - libedit-dev
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 depends on gcc-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 depends on gcc-4.9 which is not in main repo
384 - ubuntu-toolchain-r-test
385 packages:
386 # LLVM packaging is broken and misses these dependencies
387 - libedit-dev
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 - MESON_OPTIONS="-Degl=false"
471 os: osx
472
473 before_install:
474 - |
475 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
476 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
477 # Set PATH for homebrew pip3 installs
478 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
479 # Set PKG_CONFIG_PATH for keg-only expat
480 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
481 # Set PATH for keg-only gettext
482 PATH="/usr/local/opt/gettext/bin:${PATH}"
483
484 # Install xquartz for prereqs ...
485 XQUARTZ_VERSION="2.7.11"
486 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
487 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
488 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
489 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
490 # ... and set paths
491 PATH="/opt/X11/bin:${PATH}"
492 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
493 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
494 fi
495
496 install:
497 - pip2 install --user mako
498
499 # Install a more modern meson from pip, since the version in the
500 # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
501 # 3.5+
502 - if test "x$BUILD" = xmeson; then
503 pip3 install --user "meson<0.45.0";
504 fi
505
506 # Install a more modern scons from pip.
507 - if test "x$BUILD" = xscons; then
508 pip2 install --user "scons>=2.4";
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 # Travis CI has moved to LLVM 5.0, and meson is detecting
655 # automatically the available version in /usr/local/bin based on
656 # the PATH env variable order preference.
657 #
658 # As for 0.44.x, Meson cannot receive the path to the
659 # llvm-config binary as a configuration parameter. See
660 # https://github.com/mesonbuild/meson/issues/2887 and
661 # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
662 #
663 # We want to use the custom (APT) installed version. Therefore,
664 # let's make Meson find our wanted version sooner than the one
665 # at /usr/local/bin
666 #
667 # Once this is corrected, we would still need a patch similar
668 # to:
669 # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
670 test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
671
672 export CFLAGS="$CFLAGS -isystem`pwd`"
673 meson _build $MESON_OPTIONS
674 ninja -C _build
675 fi