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