gitlab-ci: add make Gallium Drivers RadeonSI build
[mesa.git] / .travis.yml
1 language: c
2
3 dist: xenial
4
5 cache:
6 apt: true
7 ccache: true
8
9 env:
10 global:
11 - XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
12 - XCB_RELEASES=https://xcb.freedesktop.org/dist
13 - WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
14 - XORGMACROS_VERSION=util-macros-1.19.0
15 - GLPROTO_VERSION=glproto-1.4.17
16 - DRI2PROTO_VERSION=dri2proto-2.8
17 - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
18 - LIBDRM_VERSION=libdrm-2.4.97
19 - XCBPROTO_VERSION=xcb-proto-1.13
20 - RANDRPROTO_VERSION=randrproto-1.3.0
21 - LIBXRANDR_VERSION=libXrandr-1.3.0
22 - LIBXCB_VERSION=libxcb-1.13
23 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
24 - LIBVDPAU_VERSION=libvdpau-1.1
25 - LIBVA_VERSION=libva-1.7.0
26 - LIBWAYLAND_VERSION=wayland-1.15.0
27 - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
28 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
29 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
30 - PATH="$HOME/prefix/bin:$PATH"
31
32 matrix:
33 include:
34 - env:
35 - LABEL="make Gallium Drivers Other"
36 - BUILD=make
37 - MAKEFLAGS="-j4"
38 - MAKE_CHECK_COMMAND="true"
39 - LLVM_VERSION=3.9
40 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
41 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
42 - DRI_DRIVERS=""
43 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
44 - GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
45 - VULKAN_DRIVERS=""
46 - LIBUNWIND_FLAGS="--enable-libunwind"
47 addons:
48 apt:
49 packages:
50 # LLVM packaging is broken and misses these dependencies
51 - libedit-dev
52 - llvm-3.9-dev
53 # Common
54 - xz-utils
55 - libexpat1-dev
56 - libx11-xcb-dev
57 - libelf-dev
58 - libunwind8-dev
59 - python3-pip
60 - python3-setuptools
61 - env:
62 - LABEL="make Gallium ST Clover LLVM-3.9"
63 - BUILD=make
64 - MAKEFLAGS="-j4"
65 - MAKE_CHECK_COMMAND="true"
66 - LLVM_VERSION=3.9
67 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
68 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
69 - DRI_DRIVERS=""
70 - 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"
71 - GALLIUM_DRIVERS="r600"
72 - VULKAN_DRIVERS=""
73 - LIBUNWIND_FLAGS="--enable-libunwind"
74 addons:
75 apt:
76 packages:
77 - libclc-dev
78 # LLVM packaging is broken and misses these dependencies
79 - libedit-dev
80 - llvm-3.9-dev
81 - clang-3.9
82 - libclang-3.9-dev
83 # Common
84 - xz-utils
85 - libexpat1-dev
86 - libx11-xcb-dev
87 - libelf-dev
88 - libunwind8-dev
89 - python3-pip
90 - python3-setuptools
91 - env:
92 - LABEL="make Gallium ST Clover LLVM-4.0"
93 - BUILD=make
94 - MAKEFLAGS="-j4"
95 - MAKE_CHECK_COMMAND="true"
96 - LLVM_VERSION=4.0
97 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
98 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
99 - DRI_DRIVERS=""
100 - 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"
101 - GALLIUM_DRIVERS="r600"
102 - VULKAN_DRIVERS=""
103 - LIBUNWIND_FLAGS="--enable-libunwind"
104 addons:
105 apt:
106 packages:
107 - libclc-dev
108 # LLVM packaging is broken and misses these dependencies
109 - libedit-dev
110 - llvm-4.0-dev
111 - clang-4.0
112 - libclang-4.0-dev
113 # Common
114 - xz-utils
115 - libexpat1-dev
116 - libx11-xcb-dev
117 - libelf-dev
118 - libunwind8-dev
119 - python3-pip
120 - python3-setuptools
121 - env:
122 - LABEL="make Gallium ST Clover LLVM-5.0"
123 - BUILD=make
124 - MAKEFLAGS="-j4"
125 - MAKE_CHECK_COMMAND="true"
126 - LLVM_VERSION=5.0
127 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
128 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
129 - DRI_DRIVERS=""
130 - 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"
131 - GALLIUM_DRIVERS="r600"
132 - VULKAN_DRIVERS=""
133 - LIBUNWIND_FLAGS="--enable-libunwind"
134 addons:
135 apt:
136 packages:
137 - libclc-dev
138 # LLVM packaging is broken and misses these dependencies
139 - libedit-dev
140 - llvm-5.0-dev
141 - clang-5.0
142 - libclang-5.0-dev
143 # Common
144 - xz-utils
145 - libexpat1-dev
146 - libx11-xcb-dev
147 - libelf-dev
148 - libunwind8-dev
149 - python3-pip
150 - python3-setuptools
151 - env:
152 - LABEL="make Gallium ST Clover LLVM-6.0"
153 - BUILD=make
154 - MAKEFLAGS="-j4"
155 - MAKE_CHECK_COMMAND="true"
156 - LLVM_VERSION=6.0
157 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
158 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
159 - DRI_DRIVERS=""
160 - 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"
161 - GALLIUM_DRIVERS="r600"
162 - VULKAN_DRIVERS=""
163 - LIBUNWIND_FLAGS="--enable-libunwind"
164 addons:
165 apt:
166 packages:
167 - libclc-dev
168 - llvm-6.0-dev
169 - clang-6.0
170 - libclang-6.0-dev
171 # Common
172 - xz-utils
173 - libexpat1-dev
174 - libx11-xcb-dev
175 - libelf-dev
176 - libunwind8-dev
177 - python3-pip
178 - python3-setuptools
179 - env:
180 - LABEL="make Gallium ST Clover LLVM-7"
181 - BUILD=make
182 - MAKEFLAGS="-j4"
183 - MAKE_CHECK_COMMAND="true"
184 - LLVM_VERSION=7
185 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
186 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
187 - DRI_DRIVERS=""
188 - 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"
189 - GALLIUM_DRIVERS="r600,radeonsi"
190 - VULKAN_DRIVERS=""
191 - LIBUNWIND_FLAGS="--enable-libunwind"
192 addons:
193 apt:
194 sources:
195 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
196 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
197 packages:
198 - libclc-dev
199 # From sources above
200 - llvm-7-dev
201 - clang-7
202 - libclang-7-dev
203 # Common
204 - xz-utils
205 - libexpat1-dev
206 - libx11-xcb-dev
207 - libelf-dev
208 - libunwind8-dev
209 - env:
210 - LABEL="make Gallium ST Other"
211 - BUILD=make
212 - MAKEFLAGS="-j4"
213 - MAKE_CHECK_COMMAND="true"
214 - LLVM_VERSION=3.5
215 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
216 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
217 - DRI_DRIVERS=""
218 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
219 # We need swrast for osmesa and nine.
220 # i915 most likely doesn't work with most ST.
221 # Regardless - we're doing a quick build test here.
222 - GALLIUM_DRIVERS="i915,swrast"
223 - VULKAN_DRIVERS=""
224 - LIBUNWIND_FLAGS="--enable-libunwind"
225 addons:
226 apt:
227 packages:
228 # We actually want to test against llvm-3.3, yet 3.5 is available
229 - llvm-3.5-dev
230 # Nine requires gcc 4.6... which is the one we have right ?
231 - libxvmc-dev
232 # Build locally, for now.
233 #- libvdpau-dev
234 #- libva-dev
235 - libomxil-bellagio-dev
236 # LLVM packaging is broken and misses these dependencies
237 - libedit-dev
238 # Common
239 - xz-utils
240 - libexpat1-dev
241 - libx11-xcb-dev
242 - libelf-dev
243 - libunwind8-dev
244 - python3-pip
245 - python3-setuptools
246 - env:
247 - LABEL="macOS make"
248 - BUILD=make
249 - MAKEFLAGS="-j4"
250 - MAKE_CHECK_COMMAND="make check"
251 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
252 os: osx
253 - env:
254 - LABEL="macOS meson"
255 - BUILD=meson
256 - UNWIND="false"
257 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
258 - GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
259 os: osx
260
261 before_install:
262 - |
263 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
264 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
265 # Set PATH for homebrew pip3 installs
266 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
267 # Set PKG_CONFIG_PATH for keg-only expat
268 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
269 # Set PATH for keg-only gettext
270 PATH="/usr/local/opt/gettext/bin:${PATH}"
271
272 # Install xquartz for prereqs ...
273 XQUARTZ_VERSION="2.7.11"
274 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
275 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
276 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
277 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
278 # ... and set paths
279 PATH="/opt/X11/bin:${PATH}"
280 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
281 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
282 fi
283
284 install:
285 # Install a more modern meson from pip, since the version in the
286 # ubuntu repos is often quite old.
287 - if test "x$BUILD" = xmeson; then
288 pip3 install --user meson;
289 pip3 install --user mako;
290 fi
291
292 # Install autotools build dependencies
293 - if test "x$BUILD" = xmake; then
294 pip2 install --user mako;
295 fi
296
297 # Install a more modern scons from pip.
298 - if test "x$BUILD" = xscons; then
299 pip2 install --user "scons>=2.4";
300 pip2 install --user mako;
301 fi
302
303 # Install dependencies where we require specific versions (or where
304 # disallowed by Travis CI's package whitelisting).
305
306 - |
307 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
308 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
309 tar -jxvf $XORGMACROS_VERSION.tar.bz2
310 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
311
312 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
313 tar -jxvf $GLPROTO_VERSION.tar.bz2
314 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
315
316 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
317 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
318 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
319
320 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
321 tar -jxvf $XCBPROTO_VERSION.tar.bz2
322 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
323
324 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
325 tar -jxvf $LIBXCB_VERSION.tar.bz2
326 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
327
328 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
329 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
330 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
331
332 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
333 tar -jxvf $LIBDRM_VERSION.tar.bz2
334 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
335
336 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
337 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
338 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
339
340 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
341 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
342 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
343
344 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
345 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
346 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
347
348 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
349 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
350 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
351
352 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
353 tar -jxvf $LIBVA_VERSION.tar.bz2
354 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
355
356 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
357 tar -axvf $LIBWAYLAND_VERSION.tar.xz
358 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
359
360 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
361 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
362 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
363
364 # Meson requires ninja >= 1.6, but xenial has 1.3.x
365 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
366 unzip ninja-linux.zip
367 mv ninja $HOME/prefix/bin/
368
369 # Generate this header since one is missing on the Travis instance
370 mkdir -p linux
371 printf "%s\n" \
372 "#ifndef _LINUX_MEMFD_H" \
373 "#define _LINUX_MEMFD_H" \
374 "" \
375 "#define MFD_CLOEXEC 0x0001U" \
376 "#define MFD_ALLOW_SEALING 0x0002U" \
377 "" \
378 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
379
380 # Generate this header, including the missing SYS_memfd_create
381 # macro, which is not provided by the header in the Travis
382 # instance
383 mkdir -p sys
384 printf "%s\n" \
385 "#ifndef _SYSCALL_H" \
386 "#define _SYSCALL_H 1" \
387 "" \
388 "#include <asm/unistd.h>" \
389 "" \
390 "#ifndef _LIBC" \
391 "# include <bits/syscall.h>" \
392 "#endif" \
393 "" \
394 "#ifndef __NR_memfd_create" \
395 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
396 "#endif" \
397 "" \
398 "#ifndef SYS_memfd_create" \
399 "# define SYS_memfd_create __NR_memfd_create" \
400 "#endif" \
401 "" \
402 "#endif" > sys/syscall.h
403 fi
404
405 script:
406 - if test "x$BUILD" = xmake; then
407 export CFLAGS="$CFLAGS -isystem`pwd`";
408
409 mkdir build &&
410 cd build &&
411 ../autogen.sh
412 --enable-autotools
413 --enable-debug
414 $LIBUNWIND_FLAGS
415 $DRI_LOADERS
416 --with-dri-drivers=$DRI_DRIVERS
417 $GALLIUM_ST
418 --with-gallium-drivers=$GALLIUM_DRIVERS
419 --with-vulkan-drivers=$VULKAN_DRIVERS
420 --disable-llvm-shared-libs
421 &&
422 make && eval $MAKE_CHECK_COMMAND;
423 fi
424
425 - if test "x$BUILD" = xscons; then
426 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
427 fi
428
429 - |
430 if test "x$BUILD" = xmeson; then
431 if test -n "$LLVM_CONFIG"; then
432 # We need to control the version of llvm-config we're using, so we'll
433 # generate a native file to do so. This requires meson >=0.49
434 #
435 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
436
437 $LLVM_CONFIG --version
438 else
439 : > native.file
440 fi
441
442 export CFLAGS="$CFLAGS -isystem`pwd`"
443 meson _build \
444 --native-file=native.file \
445 -Dbuild-tests=true \
446 -Dlibunwind=${UNWIND} \
447 ${DRI_LOADERS} \
448 -Ddri-drivers=${DRI_DRIVERS:-[]} \
449 ${GALLIUM_ST} \
450 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
451 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
452 meson configure _build
453 ninja -C _build
454 ninja -C _build test
455 fi