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