# Kodi's travis-ci.org integration file # TODO: # integrate with slack # make it perfect... or not ;-r language: cpp # Define the build matrix # # Travis defaults to building on Ubuntu Precise when building on Linux. We need Trusty in order to get up # to date versions of cmake and g++. # os: linux dist: xenial sudo: required compiler: - gcc - clang env: - BUILD=Kodi TOOLS=CMake # - ADDONS=audiodecoder # - ADDONS=audioencoder # - ADDONS=pvr # - ADDONS=screensaver # - ADDONS=visualization matrix: fast_finish: true allow_failures: # - env: ADDONS=audiodecoder # - env: ADDONS=audioencoder # - env: ADDONS=pvr # - env: ADDONS=screensaver # - env: ADDONS=visualization # Prepare system # # Prepare the system to install prerequisites or dependencies # before_install: # Prune non-root Python from PATH. Solves https://github.com/travis-ci/travis-ci/issues/4948 # see: https://github.com/travis-ci/travis-ci/issues/5326 - export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g") # Linux # # Install team-xbmc/xbmc-ppa-build-depends for some dependencies and ppa:wsnipex/vaapi for libda-dev 1.6.0. # Stupid libda-dev 1.3.0 does not work on Trusty. - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-ppa-build-depends && sudo add-apt-repository -y ppa:wsnipex/vaapi && sudo add-apt-repository -y ppa:pulse-eight/libcec && sudo apt-get update -qq; fi # Install dependencies # # Install any prerequisites or dependencies necessary to run our builds # install: # Linux dependencies # - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" ]]; then sudo apt-get install -qq automake autopoint build-essential cmake curl default-jre gawk gdb gdc gettext git-core gperf libasound2-dev libass-dev libbluray-dev libbz2-dev libcap-dev libcdio-dev libcec4-dev libcrossguid-dev libcurl3 libcurl4-openssl-dev libdbus-1-dev libfmt3-dev libfontconfig-dev libegl1-mesa-dev libfreetype6-dev libfribidi-dev libgif-dev libgl1-mesa-dev libglu1-mesa-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libtag1-dev libtinyxml-dev libtool libudev-dev libusb-dev libva-dev libvdpau-dev libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev libyajl-dev mesa-utils nasm pmount python-dev python-imaging python-sqlite rapidjson-dev swig unzip uuid-dev yasm zip zlib1g-dev; fi # Prepare builds # before_script: # Linux # - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" ]]; then ulimit -c unlimited -S; mkdir $TRAVIS_BUILD_DIR/build && cd $TRAVIS_BUILD_DIR/build; fi - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" && "$CXX" == "g++" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug ..; fi - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" && "$CXX" == "clang++" ]]; then cmake -DCMAKE_CXX_FLAGS="-Qunused-arguments" ..; fi - if [[ "$BUILD" != "Kodi" ]] && [[ "$ADDONS" == "audiodecoder" || "$ADDONS" == "audioencoder" || "$ADDONS" == "pvr" || "$ADDONS" == "screensaver" || "$ADDONS" == "visualization" ]]; then cd $TRAVIS_BUILD_DIR/cmake/addons && mkdir -p build && cd build/ && cmake ../bootstrap -DCMAKE_BUILD_TYPE=Debug && make -j4; fi # Actually build # script: - if [[ "$BUILD" == "Kodi" ]]; then make -j4 && make check; fi - if [[ "$BUILD" != "Kodi" ]] && [[ "$ADDONS" == "audiodecoder" || "$ADDONS" == "audioencoder" || "$ADDONS" == "pvr" || "$ADDONS" == "screensaver" || "$ADDONS" == "visualization" ]]; then cd $TRAVIS_BUILD_DIR/ && mkdir -p build && cmake -DADDONS_TO_BUILD="$ADDONS".* -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../addons $TRAVIS_BUILD_DIR/cmake/addons && make -j4; fi after_failure: - COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) - if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" kodi-test -ex "thread apply all bt" -ex "set pagination 0" -batch; fi # Disable annoying emails notifications: email: false