blob: 96235a72a4c1e0535b60ad30981e28d60b65ef5a [file] [log] [blame]
Eric Anholt1c0ac192015-11-23 16:25:29 -08001language: c
2
Emil Velikov7c38d7b2018-12-13 11:20:41 +00003dist: xenial
Eric Anholt1c0ac192015-11-23 16:25:29 -08004
5cache:
Emil Velikov6431b982017-04-06 14:02:38 +01006 ccache: true
Eric Anholt1c0ac192015-11-23 16:25:29 -08007
Eric Engestrom6e0effb2019-02-07 11:36:19 +00008env:
9 global:
10 - PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
11
Emil Velikov56ba2522017-04-06 14:38:40 +010012matrix:
13 include:
14 - env:
Jon Turneyb3a1d952018-01-18 13:05:06 +000015 - LABEL="macOS make"
16 - BUILD=make
17 - MAKEFLAGS="-j4"
18 - MAKE_CHECK_COMMAND="make check"
19 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
20 os: osx
Jon Turneyb5af1992018-01-16 17:51:53 +000021 - env:
22 - LABEL="macOS meson"
23 - BUILD=meson
Emil Velikove890aaa2018-12-12 13:33:14 +000024 - UNWIND="false"
Emil Velikov51318c32018-12-12 13:42:36 +000025 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
Emil Velikov39634f22018-12-12 13:52:20 +000026 - 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"
Jon Turneyb5af1992018-01-16 17:51:53 +000027 os: osx
Jon Turneyb3a1d952018-01-18 13:05:06 +000028
29before_install:
30 - |
31 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
32 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
33 # Set PATH for homebrew pip3 installs
34 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
35 # Set PKG_CONFIG_PATH for keg-only expat
36 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
37 # Set PATH for keg-only gettext
38 PATH="/usr/local/opt/gettext/bin:${PATH}"
39
40 # Install xquartz for prereqs ...
41 XQUARTZ_VERSION="2.7.11"
42 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
43 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
44 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
45 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
46 # ... and set paths
47 PATH="/opt/X11/bin:${PATH}"
48 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
49 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
50 fi
Eric Anholt1c0ac192015-11-23 16:25:29 -080051
52install:
Andres Gomez72552012018-03-05 17:25:36 +020053 # Install a more modern meson from pip, since the version in the
Emil Velikov7c38d7b2018-12-13 11:20:41 +000054 # ubuntu repos is often quite old.
Dylan Bakerdf820122017-09-27 10:37:28 -070055 - if test "x$BUILD" = xmeson; then
Eric Engestrom3824c8e2018-07-17 15:12:32 +010056 pip3 install --user meson;
Eric Engestromf976d222018-08-13 12:10:38 +010057 pip3 install --user mako;
58 fi
59
60 # Install autotools build dependencies
61 - if test "x$BUILD" = xmake; then
Emil Velikov4428eed2018-10-31 21:54:49 +000062 pip2 install --user mako;
Dylan Bakerdf820122017-09-27 10:37:28 -070063 fi
64
Eric Anholt1c0ac192015-11-23 16:25:29 -080065 # Install dependencies where we require specific versions (or where
66 # disallowed by Travis CI's package whitelisting).
67
Eric Anholt1c0ac192015-11-23 16:25:29 -080068script:
Eric Anholt18f8da72015-12-01 11:57:49 -080069 - if test "x$BUILD" = xmake; then
Eric Engestromd246aa32017-10-04 13:54:14 +010070 export CFLAGS="$CFLAGS -isystem`pwd`";
Emil Velikov7e2af372017-04-07 12:13:56 +010071
Eric Anholt3db39d842018-06-05 08:18:51 -070072 mkdir build &&
73 cd build &&
Eric Engestrom41a0c002019-01-21 10:03:37 +000074 ../autogen.sh
75 --enable-autotools
76 --enable-debug
Gert Wollny39fe51c2017-09-14 12:27:42 +020077 $LIBUNWIND_FLAGS
Emil Velikov7e2af372017-04-07 12:13:56 +010078 $DRI_LOADERS
Emil Velikov8479fd82017-04-06 18:01:19 +010079 --with-dri-drivers=$DRI_DRIVERS
Emil Velikov0e6a36c2017-04-07 14:06:25 +010080 $GALLIUM_ST
Emil Velikov8479fd82017-04-06 18:01:19 +010081 --with-gallium-drivers=$GALLIUM_DRIVERS
82 --with-vulkan-drivers=$VULKAN_DRIVERS
Eric Anholt78ab62b2016-08-18 14:10:57 -070083 --disable-llvm-shared-libs
Emil Velikov7e2af372017-04-07 12:13:56 +010084 &&
85 make && eval $MAKE_CHECK_COMMAND;
Emil Velikovabcfea22017-04-06 14:23:36 +010086 fi
87
Andres Gomezb5b912d2018-02-28 23:18:59 +020088 - |
89 if test "x$BUILD" = xmeson; then
Eric Engestrome12b0b52019-01-02 12:28:48 +000090 if test -n "$LLVM_CONFIG"; then
91 # We need to control the version of llvm-config we're using, so we'll
92 # generate a native file to do so. This requires meson >=0.49
93 #
94 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
Andres Gomezb5b912d2018-02-28 23:18:59 +020095
Eric Engestrome12b0b52019-01-02 12:28:48 +000096 $LLVM_CONFIG --version
97 else
98 : > native.file
99 fi
Emil Velikov81173fd2018-12-13 10:38:20 +0000100
Andres Gomezb5b912d2018-02-28 23:18:59 +0200101 export CFLAGS="$CFLAGS -isystem`pwd`"
Emil Velikov51318c32018-12-12 13:42:36 +0000102 meson _build \
Dylan Baker31c162a2018-12-11 10:34:51 -0800103 --native-file=native.file \
Emil Velikov266ae222018-12-12 13:18:54 +0000104 -Dbuild-tests=true \
Emil Velikove890aaa2018-12-12 13:33:14 +0000105 -Dlibunwind=${UNWIND} \
Emil Velikov51318c32018-12-12 13:42:36 +0000106 ${DRI_LOADERS} \
Emil Velikov266ae222018-12-12 13:18:54 +0000107 -Ddri-drivers=${DRI_DRIVERS:-[]} \
Emil Velikov39634f22018-12-12 13:52:20 +0000108 ${GALLIUM_ST} \
Emil Velikov266ae222018-12-12 13:18:54 +0000109 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
110 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
Emil Velikovde72c1f2018-12-12 17:43:07 +0000111 meson configure _build
Andres Gomezb5b912d2018-02-28 23:18:59 +0200112 ninja -C _build
Dylan Baker31c162a2018-12-11 10:34:51 -0800113 ninja -C _build test
Dylan Bakerdf820122017-09-27 10:37:28 -0700114 fi