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