Home | History | Annotate | Download | only in mesa3d
      1 language: c
      2 
      3 sudo: false
      4 dist: trusty
      5 
      6 cache:
      7   apt: true
      8   ccache: true
      9 
     10 env:
     11   global:
     12     - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual
     13     - XCB_RELEASES=http://xcb.freedesktop.org/dist
     14     - WAYLAND_RELEASES=http://wayland.freedesktop.org/releases
     15     - XORGMACROS_VERSION=util-macros-1.19.0
     16     - GLPROTO_VERSION=glproto-1.4.17
     17     - DRI2PROTO_VERSION=dri2proto-2.8
     18     - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
     19     - LIBDRM_VERSION=libdrm-2.4.74
     20     - XCBPROTO_VERSION=xcb-proto-1.11
     21     - LIBXCB_VERSION=libxcb-1.11
     22     - LIBXSHMFENCE_VERSION=libxshmfence-1.2
     23     - LIBVDPAU_VERSION=libvdpau-1.1
     24     - LIBVA_VERSION=libva-1.6.2
     25     - LIBWAYLAND_VERSION=wayland-1.11.1
     26     - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
     27     - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
     28     - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
     29     - PATH="$HOME/prefix/bin:$PATH"
     30 
     31 matrix:
     32   include:
     33     - env:
     34         - LABEL="meson Vulkan"
     35         - BUILD=meson
     36         - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
     37         - LLVM_VERSION=4.0
     38         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
     39       addons:
     40         apt:
     41           sources:
     42             - llvm-toolchain-trusty-4.0
     43           packages:
     44             # LLVM packaging is broken and misses these dependencies
     45             - libedit-dev
     46             # From sources above
     47             - llvm-4.0-dev
     48             # Common
     49             - xz-utils
     50             - libexpat1-dev
     51             - libelf-dev
     52             - python3-pip
     53     - env:
     54         - LABEL="meson loaders/classic DRI"
     55         - BUILD=meson
     56         - MESON_OPTIONS="-Dvulkan-drivers= -Dgallium-drivers="
     57       addons:
     58         apt:
     59           packages:
     60             - xz-utils
     61             - x11proto-xf86vidmode-dev
     62             - libexpat1-dev
     63             - libx11-xcb-dev
     64             - libxdamage-dev
     65             - libxfixes-dev
     66             - python3-pip
     67     - env:
     68         - LABEL="make loaders/classic DRI"
     69         - BUILD=make
     70         - MAKEFLAGS="-j4"
     71         - MAKE_CHECK_COMMAND="make check"
     72         - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
     73         - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
     74         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
     75         - GALLIUM_DRIVERS=""
     76         - VULKAN_DRIVERS=""
     77         - LIBUNWIND_FLAGS="--disable-libunwind"
     78       addons:
     79         apt:
     80           packages:
     81             - xz-utils
     82             - x11proto-xf86vidmode-dev
     83             - libexpat1-dev
     84             - libx11-xcb-dev
     85             - libxdamage-dev
     86             - libxfixes-dev
     87     - env:
     88         # NOTE: Building SWR is 2x (yes two) times slower than all the other
     89         # gallium drivers combined.
     90         # Start this early so that it doesn't hunder the run time.
     91         - LABEL="make Gallium Drivers SWR"
     92         - BUILD=make
     93         - MAKEFLAGS="-j4"
     94         - MAKE_CHECK_COMMAND="true"
     95         - LLVM_VERSION=3.9
     96         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
     97         - OVERRIDE_CC="gcc-4.8"
     98         - OVERRIDE_CXX="g++-4.8"
     99         # New binutils linker is required for llvm-3.9
    100         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
    101         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
    102         - DRI_DRIVERS=""
    103         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
    104         - GALLIUM_DRIVERS="swr"
    105         - VULKAN_DRIVERS=""
    106         - LIBUNWIND_FLAGS="--enable-libunwind"
    107       addons:
    108         apt:
    109           sources:
    110             - llvm-toolchain-trusty-3.9
    111           packages:
    112             - binutils-2.26
    113             # LLVM packaging is broken and misses these dependencies
    114             - libedit-dev
    115             # From sources above
    116             - llvm-3.9-dev
    117             # Common
    118             - xz-utils
    119             - x11proto-xf86vidmode-dev
    120             - libexpat1-dev
    121             - libx11-xcb-dev
    122             - libelf-dev
    123             - libunwind8-dev
    124     - env:
    125         - LABEL="make Gallium Drivers Other"
    126         - BUILD=make
    127         - MAKEFLAGS="-j4"
    128         - MAKE_CHECK_COMMAND="true"
    129         - LLVM_VERSION=3.9
    130         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    131         # New binutils linker is required for llvm-3.9
    132         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
    133         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
    134         - DRI_DRIVERS=""
    135         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
    136         - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
    137         - VULKAN_DRIVERS=""
    138         - LIBUNWIND_FLAGS="--enable-libunwind"
    139       addons:
    140         apt:
    141           sources:
    142             - llvm-toolchain-trusty-3.9
    143           packages:
    144             - binutils-2.26
    145             # LLVM packaging is broken and misses these dependencies
    146             - libedit-dev
    147             # From sources above
    148             - llvm-3.9-dev
    149             # Common
    150             - xz-utils
    151             - x11proto-xf86vidmode-dev
    152             - libexpat1-dev
    153             - libx11-xcb-dev
    154             - libelf-dev
    155             - libunwind8-dev
    156     - env:
    157         # NOTE: Analogous to SWR above, building Clover is quite slow.
    158         - LABEL="make Gallium ST Clover LLVM-3.9"
    159         - BUILD=make
    160         - MAKEFLAGS="-j4"
    161         - MAKE_CHECK_COMMAND="true"
    162         - LLVM_VERSION=3.9
    163         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    164         - OVERRIDE_CC=gcc-4.7
    165         - OVERRIDE_CXX=g++-4.7
    166         # New binutils linker is required for llvm-3.9
    167         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
    168         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
    169         - DRI_DRIVERS=""
    170         - 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"
    171         - GALLIUM_DRIVERS="r600,radeonsi"
    172         - VULKAN_DRIVERS=""
    173         - LIBUNWIND_FLAGS="--enable-libunwind"
    174       addons:
    175         apt:
    176           sources:
    177             - llvm-toolchain-trusty-3.9
    178           packages:
    179             - binutils-2.26
    180             - libclc-dev
    181             # LLVM packaging is broken and misses these dependencies
    182             - libedit-dev
    183             - g++-4.7
    184             # From sources above
    185             - llvm-3.9-dev
    186             - clang-3.9
    187             - libclang-3.9-dev
    188             # Common
    189             - xz-utils
    190             - x11proto-xf86vidmode-dev
    191             - libexpat1-dev
    192             - libx11-xcb-dev
    193             - libelf-dev
    194             - libunwind8-dev
    195     - env:
    196         # NOTE: Analogous to SWR above, building Clover is quite slow.
    197         - LABEL="make Gallium ST Clover LLVM-4.0"
    198         - BUILD=make
    199         - MAKEFLAGS="-j4"
    200         - MAKE_CHECK_COMMAND="true"
    201         - LLVM_VERSION=4.0
    202         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    203         - OVERRIDE_CC=gcc-4.8
    204         - OVERRIDE_CXX=g++-4.8
    205         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
    206         - DRI_DRIVERS=""
    207         - 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"
    208         - GALLIUM_DRIVERS="r600,radeonsi"
    209         - VULKAN_DRIVERS=""
    210         - LIBUNWIND_FLAGS="--enable-libunwind"
    211       addons:
    212         apt:
    213           sources:
    214             - llvm-toolchain-trusty-4.0
    215           packages:
    216             - libclc-dev
    217             # LLVM packaging is broken and misses these dependencies
    218             - libedit-dev
    219             - g++-4.8
    220             # From sources above
    221             - llvm-4.0-dev
    222             - clang-4.0
    223             - libclang-4.0-dev
    224             # Common
    225             - xz-utils
    226             - x11proto-xf86vidmode-dev
    227             - libexpat1-dev
    228             - libx11-xcb-dev
    229             - libelf-dev
    230             - libunwind8-dev
    231     - env:
    232         # NOTE: Analogous to SWR above, building Clover is quite slow.
    233         - LABEL="make Gallium ST Clover LLVM-5.0"
    234         - BUILD=make
    235         - MAKEFLAGS="-j4"
    236         - MAKE_CHECK_COMMAND="true"
    237         - LLVM_VERSION=5.0
    238         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    239         - OVERRIDE_CC=gcc-4.8
    240         - OVERRIDE_CXX=g++-4.8
    241         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
    242         - DRI_DRIVERS=""
    243         - 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"
    244         - GALLIUM_DRIVERS="r600,radeonsi"
    245         - VULKAN_DRIVERS=""
    246         - LIBUNWIND_FLAGS="--enable-libunwind"
    247       addons:
    248         apt:
    249           sources:
    250             - llvm-toolchain-trusty-5.0
    251           packages:
    252             - libclc-dev
    253             # LLVM packaging is broken and misses these dependencies
    254             - libedit-dev
    255             - g++-4.8
    256             # From sources above
    257             - llvm-5.0-dev
    258             - clang-5.0
    259             - libclang-5.0-dev
    260             # Common
    261             - xz-utils
    262             - x11proto-xf86vidmode-dev
    263             - libexpat1-dev
    264             - libx11-xcb-dev
    265             - libelf-dev
    266             - libunwind8-dev
    267     - env:
    268         - LABEL="make Gallium ST Other"
    269         - BUILD=make
    270         - MAKEFLAGS="-j4"
    271         - MAKE_CHECK_COMMAND="true"
    272         - LLVM_VERSION=3.3
    273         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    274         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
    275         - DRI_DRIVERS=""
    276         - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
    277         # We need swrast for osmesa and nine.
    278         # i915 most likely doesn't work with most ST.
    279         # Regardless - we're doing a quick build test here.
    280         - GALLIUM_DRIVERS="i915,swrast"
    281         - VULKAN_DRIVERS=""
    282         - LIBUNWIND_FLAGS="--enable-libunwind"
    283       addons:
    284         apt:
    285           packages:
    286             # We actually want to test against llvm-3.3
    287             - llvm-3.3-dev
    288             # Nine requires gcc 4.6... which is the one we have right ?
    289             - libxvmc-dev
    290             # Build locally, for now.
    291             #- libvdpau-dev
    292             #- libva-dev
    293             - libomxil-bellagio-dev
    294             # LLVM packaging is broken and misses these dependencies
    295             - libedit-dev
    296             # Common
    297             - xz-utils
    298             - x11proto-xf86vidmode-dev
    299             - libexpat1-dev
    300             - libx11-xcb-dev
    301             - libelf-dev
    302             - libunwind8-dev
    303     - env:
    304         - LABEL="make Vulkan"
    305         - BUILD=make
    306         - MAKEFLAGS="-j4"
    307         - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
    308         - LLVM_VERSION=3.9
    309         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    310         # New binutils linker is required for llvm-3.9
    311         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
    312         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
    313         - DRI_DRIVERS=""
    314         - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
    315         - GALLIUM_DRIVERS=""
    316         - VULKAN_DRIVERS="intel,radeon"
    317         - LIBUNWIND_FLAGS="--disable-libunwind"
    318       addons:
    319         apt:
    320           sources:
    321             - llvm-toolchain-trusty-3.9
    322           packages:
    323             - binutils-2.26
    324             # LLVM packaging is broken and misses these dependencies
    325             - libedit-dev
    326             # From sources above
    327             - llvm-3.9-dev
    328             # Common
    329             - xz-utils
    330             - x11proto-xf86vidmode-dev
    331             - libexpat1-dev
    332             - libx11-xcb-dev
    333             - libelf-dev
    334     - env:
    335         - LABEL="scons"
    336         - BUILD=scons
    337         - SCONSFLAGS="-j4"
    338         # Explicitly disable.
    339         - SCONS_TARGET="llvm=0"
    340         # Keep it symmetrical to the make build.
    341         - SCONS_CHECK_COMMAND="scons llvm=0 check"
    342       addons:
    343         apt:
    344           packages:
    345             - scons
    346             # Common
    347             - xz-utils
    348             - x11proto-xf86vidmode-dev
    349             - libexpat1-dev
    350             - libx11-xcb-dev
    351             - libelf-dev
    352     - env:
    353         - LABEL="scons LLVM"
    354         - BUILD=scons
    355         - SCONSFLAGS="-j4"
    356         - SCONS_TARGET="llvm=1"
    357         # Keep it symmetrical to the make build.
    358         - SCONS_CHECK_COMMAND="scons llvm=1 check"
    359         - LLVM_VERSION=3.3
    360         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    361       addons:
    362         apt:
    363           packages:
    364             - scons
    365             # LLVM packaging is broken and misses these dependencies
    366             - libedit-dev
    367             - llvm-3.3-dev
    368             # Common
    369             - xz-utils
    370             - x11proto-xf86vidmode-dev
    371             - libexpat1-dev
    372             - libx11-xcb-dev
    373             - libelf-dev
    374     - env:
    375         - LABEL="scons SWR"
    376         - BUILD=scons
    377         - SCONSFLAGS="-j4"
    378         - SCONS_TARGET="swr=1"
    379         - LLVM_VERSION=3.9
    380         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
    381         # Keep it symmetrical to the make build. There's no actual SWR, yet.
    382         - SCONS_CHECK_COMMAND="true"
    383         - OVERRIDE_CC="gcc-4.8"
    384         - OVERRIDE_CXX="g++-4.8"
    385       addons:
    386         apt:
    387           sources:
    388             - llvm-toolchain-trusty-3.9
    389           packages:
    390             - scons
    391             # LLVM packaging is broken and misses these dependencies
    392             - libedit-dev
    393             # From sources above
    394             - llvm-3.9-dev
    395             # Common
    396             - xz-utils
    397             - x11proto-xf86vidmode-dev
    398             - libexpat1-dev
    399             - libx11-xcb-dev
    400             - libelf-dev
    401     - env:
    402         - LABEL="macOS make"
    403         - BUILD=make
    404         - MAKEFLAGS="-j4"
    405         - MAKE_CHECK_COMMAND="make check"
    406         - DRI_LOADERS="--with-platforms=x11 --disable-egl"
    407       os: osx
    408 
    409 before_install:
    410   - |
    411     if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
    412       HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
    413       # Set PATH for homebrew pip3 installs
    414       PATH="$HOME/Library/Python/3.6/bin:${PATH}"
    415       # Set PKG_CONFIG_PATH for keg-only expat
    416       PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
    417       # Set PATH for keg-only gettext
    418       PATH="/usr/local/opt/gettext/bin:${PATH}"
    419 
    420       # Install xquartz for prereqs ...
    421       XQUARTZ_VERSION="2.7.11"
    422       wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
    423       hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
    424       sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
    425       hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
    426       # ... and set paths
    427       PATH="/opt/X11/bin:${PATH}"
    428       PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
    429       ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
    430     fi
    431 
    432 install:
    433   - pip2 install --user mako
    434 
    435   # Install a more modern meson from pip, since the version in the
    436   # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
    437   # 3.5+
    438   - if test "x$BUILD" = xmeson; then
    439       pip3 install --user "meson<0.45.0";
    440     fi
    441 
    442   # Since libdrm gets updated in configure.ac regularly, try to pick up the
    443   # latest version from there.
    444   - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
    445       old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
    446       new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
    447       if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
    448         export LIBDRM_VERSION="libdrm-$new_ver";
    449       fi;
    450     done
    451 
    452   # Install dependencies where we require specific versions (or where
    453   # disallowed by Travis CI's package whitelisting).
    454 
    455   - |
    456     if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
    457       wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
    458       tar -jxvf $XORGMACROS_VERSION.tar.bz2
    459       (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
    460 
    461       wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
    462       tar -jxvf $GLPROTO_VERSION.tar.bz2
    463       (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
    464 
    465       wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
    466       tar -jxvf $DRI2PROTO_VERSION.tar.bz2
    467       (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
    468 
    469       wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
    470       tar -jxvf $XCBPROTO_VERSION.tar.bz2
    471       (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
    472 
    473       wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
    474       tar -jxvf $LIBXCB_VERSION.tar.bz2
    475       (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
    476 
    477       wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
    478       tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
    479       (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
    480 
    481       wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
    482       tar -jxvf $LIBDRM_VERSION.tar.bz2
    483       (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
    484 
    485       wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
    486       tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
    487       (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
    488 
    489       wget http://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
    490       tar -jxvf $LIBVDPAU_VERSION.tar.bz2
    491       (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
    492 
    493       wget http://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
    494       tar -jxvf $LIBVA_VERSION.tar.bz2
    495       (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
    496 
    497       wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
    498       tar -axvf $LIBWAYLAND_VERSION.tar.xz
    499       (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
    500 
    501       wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
    502       tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
    503       (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
    504 
    505       # Meson requires ninja >= 1.6, but trusty has 1.3.x
    506       wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
    507       unzip ninja-linux.zip
    508       mv ninja $HOME/prefix/bin/
    509 
    510       # Generate this header since one is missing on the Travis instance
    511       mkdir -p linux
    512       printf "%s\n" \
    513            "#ifndef _LINUX_MEMFD_H" \
    514            "#define _LINUX_MEMFD_H" \
    515            "" \
    516            "#define __NR_memfd_create 319" \
    517            "#define SYS_memfd_create __NR_memfd_create" \
    518            "" \
    519            "#define MFD_CLOEXEC             0x0001U" \
    520            "#define MFD_ALLOW_SEALING       0x0002U" \
    521            "" \
    522            "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
    523     fi
    524 
    525 script:
    526   - if test "x$BUILD" = xmake; then
    527       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
    528       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
    529       test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
    530 
    531       export CFLAGS="$CFLAGS -isystem`pwd`";
    532 
    533       ./autogen.sh --enable-debug
    534         $LIBUNWIND_FLAGS
    535         $DRI_LOADERS
    536         --with-dri-drivers=$DRI_DRIVERS
    537         $GALLIUM_ST
    538         --with-gallium-drivers=$GALLIUM_DRIVERS
    539         --with-vulkan-drivers=$VULKAN_DRIVERS
    540         --disable-llvm-shared-libs
    541         &&
    542       make && eval $MAKE_CHECK_COMMAND;
    543     fi
    544 
    545   - if test "x$BUILD" = xscons; then
    546       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
    547       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
    548       scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
    549     fi
    550 
    551   - |
    552     if test "x$BUILD" = xmeson; then
    553 
    554       # Travis CI has moved to LLVM 5.0, and meson is detecting
    555       # automatically the available version in /usr/local/bin based on
    556       # the PATH env variable order preference.
    557       #
    558       # As for 0.44.x, Meson cannot receive the path to the
    559       # llvm-config binary as a configuration parameter. See
    560       # https://github.com/mesonbuild/meson/issues/2887 and
    561       # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
    562       #
    563       # We want to use the custom (APT) installed version. Therefore,
    564       # let's make Meson find our wanted version sooner than the one
    565       # at /usr/local/bin
    566       #
    567       # Once this is corrected, we would still need a patch similar
    568       # to:
    569       # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
    570       test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
    571 
    572       export CFLAGS="$CFLAGS -isystem`pwd`"
    573       meson _build $MESON_OPTIONS
    574       ninja -C _build
    575     fi
    576