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