X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=.travis.yml;h=97720cf118ac24fa819504878f71952f63e7fd9f;hb=770ab4db822e110884cc918c5306db62ea1842f3;hp=2f0b6edece1d829aa03ffa22ac5712818eee94c1;hpb=087af992a276e7478c9c84552e18c07ddb942e9d;p=mesa.git diff --git a/.travis.yml b/.travis.yml index 2f0b6edece1..97720cf118a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,120 +1,62 @@ language: c -dist: xenial +os: osx cache: ccache: true +env: + global: + - PKG_CONFIG_PATH="" + matrix: include: - env: - - LABEL="macOS make" - - BUILD=make - - MAKEFLAGS="-j4" - - MAKE_CHECK_COMMAND="make check" - - DRI_LOADERS="--with-platforms=x11 --disable-egl" - os: osx + - BUILD=meson - env: - - LABEL="macOS meson" - - BUILD=meson - - UNWIND="false" - - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none" - - 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" - os: osx + - BUILD=scons before_install: - - | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext - # Set PATH for homebrew pip3 installs - PATH="$HOME/Library/Python/3.6/bin:${PATH}" - # Set PKG_CONFIG_PATH for keg-only expat - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}" - # Set PATH for keg-only gettext - PATH="/usr/local/opt/gettext/bin:${PATH}" - - # Install xquartz for prereqs ... - XQUARTZ_VERSION="2.7.11" - wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg - hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg - sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target / - hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION} - # ... and set paths - PATH="/opt/X11/bin:${PATH}" - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}" - ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal" + - HOMEBREW_NO_AUTO_UPDATE=1 brew install expat gettext + - if test "x$BUILD" = xmeson; then + HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja; + fi + - if test "x$BUILD" = xscons; then + HOMEBREW_NO_AUTO_UPDATE=1 brew install python2 scons; fi + # Set PATH for homebrew pip3 installs + - PATH="$HOME/Library/Python/3.6/bin:${PATH}" + # Set PKG_CONFIG_PATH for keg-only expat + - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}" + # Set PATH for keg-only gettext + - PATH="/usr/local/opt/gettext/bin:${PATH}" + + # Install xquartz for prereqs ... + - XQUARTZ_VERSION="2.7.11" + - wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg + - hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg + - sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target / + - hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION} + # ... and set paths + - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}" + install: - # Install a more modern meson from pip, since the version in the - # ubuntu repos is often quite old. - if test "x$BUILD" = xmeson; then pip3 install --user meson; pip3 install --user mako; fi - - # Install autotools build dependencies - - if test "x$BUILD" = xmake; then - pip2 install --user mako; - fi - - # Install a more modern scons from pip. - if test "x$BUILD" = xscons; then - pip2 install --user "scons>=2.4"; pip2 install --user mako; fi - # Install dependencies where we require specific versions (or where - # disallowed by Travis CI's package whitelisting). - script: - - if test "x$BUILD" = xmake; then - export CFLAGS="$CFLAGS -isystem`pwd`"; - - mkdir build && - cd build && - ../autogen.sh - --enable-autotools - --enable-debug - $LIBUNWIND_FLAGS - $DRI_LOADERS - --with-dri-drivers=$DRI_DRIVERS - $GALLIUM_ST - --with-gallium-drivers=$GALLIUM_DRIVERS - --with-vulkan-drivers=$VULKAN_DRIVERS - --disable-llvm-shared-libs - && - make && eval $MAKE_CHECK_COMMAND; + - if test "x$BUILD" = xmeson; then + meson _build -Dbuild-tests=true; + ninja -C _build || travis_terminate 1; + ninja -C _build test || travis_terminate 1; fi - - if test "x$BUILD" = xscons; then - scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND; - fi - - - | - if test "x$BUILD" = xmeson; then - if test -n "$LLVM_CONFIG"; then - # We need to control the version of llvm-config we're using, so we'll - # generate a native file to do so. This requires meson >=0.49 - # - echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file - - $LLVM_CONFIG --version - else - : > native.file - fi - - export CFLAGS="$CFLAGS -isystem`pwd`" - meson _build \ - --native-file=native.file \ - -Dbuild-tests=true \ - -Dlibunwind=${UNWIND} \ - ${DRI_LOADERS} \ - -Ddri-drivers=${DRI_DRIVERS:-[]} \ - ${GALLIUM_ST} \ - -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \ - -Dvulkan-drivers=${VULKAN_DRIVERS:-[]} - meson configure _build - ninja -C _build - ninja -C _build test + scons || travis_terminate 1; + scons check || travis_terminate 1; fi