travis: clean up
[mesa.git] / .travis.yml
1 language: c
2
3 dist: xenial
4
5 cache:
6 ccache: true
7
8 env:
9 global:
10 - PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
11
12 matrix:
13 include:
14 - env:
15 - LABEL="macOS make"
16 - BUILD=make
17 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
18 os: osx
19 - env:
20 - LABEL="macOS meson"
21 - BUILD=meson
22 - DRI_LOADERS="-Dplatforms=x11"
23 os: osx
24
25 before_install:
26 - |
27 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
28 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
29 # Set PATH for homebrew pip3 installs
30 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
31 # Set PKG_CONFIG_PATH for keg-only expat
32 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
33 # Set PATH for keg-only gettext
34 PATH="/usr/local/opt/gettext/bin:${PATH}"
35
36 # Install xquartz for prereqs ...
37 XQUARTZ_VERSION="2.7.11"
38 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
39 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
40 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
41 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
42 # ... and set paths
43 PATH="/opt/X11/bin:${PATH}"
44 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
45 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
46 fi
47
48 install:
49 # Install a more modern meson from pip, since the version in the
50 # ubuntu repos is often quite old.
51 - if test "x$BUILD" = xmeson; then
52 pip3 install --user meson;
53 pip3 install --user mako;
54 fi
55
56 # Install autotools build dependencies
57 - if test "x$BUILD" = xmake; then
58 pip2 install --user mako;
59 fi
60
61 # Install dependencies where we require specific versions (or where
62 # disallowed by Travis CI's package whitelisting).
63
64 script:
65 - if test "x$BUILD" = xmake; then
66 export CFLAGS="$CFLAGS -isystem`pwd`";
67 export MAKEFLAGS="-j4";
68
69 mkdir build &&
70 cd build &&
71 ../autogen.sh
72 --enable-autotools
73 --enable-debug
74 $DRI_LOADERS
75 --with-dri-drivers=$DRI_DRIVERS
76 --with-gallium-drivers=$GALLIUM_DRIVERS
77 --with-vulkan-drivers=$VULKAN_DRIVERS
78 --disable-llvm-shared-libs
79 &&
80 make && make check;
81 fi
82
83 - |
84 if test "x$BUILD" = xmeson; then
85 if test -n "$LLVM_CONFIG"; then
86 # We need to control the version of llvm-config we're using, so we'll
87 # generate a native file to do so. This requires meson >=0.49
88 #
89 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
90
91 $LLVM_CONFIG --version
92 else
93 : > native.file
94 fi
95
96 export CFLAGS="$CFLAGS -isystem`pwd`"
97 meson _build \
98 --native-file=native.file \
99 -Dbuild-tests=true \
100 ${DRI_LOADERS} \
101 -Ddri-drivers=${DRI_DRIVERS:-[]} \
102 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
103 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
104 meson configure _build
105 ninja -C _build
106 ninja -C _build test
107 fi