File: .travis.yml

package info (click to toggle)
kodi 2:17.1+dfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 86,224 kB
  • ctags: 74,500
  • sloc: cpp: 588,012; xml: 57,760; ansic: 42,715; sh: 12,915; makefile: 4,780; python: 2,803; objc: 1,073; perl: 1,041; cs: 624; java: 500; asm: 294; sed: 16
file content (132 lines) | stat: -rw-r--r-- 4,476 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# 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: trusty
sudo: required
compiler:
  - gcc
  - clang

env:
  - BUILD=Kodi TOOLS=CMake
#  - ADDONS=adsp
#  - ADDONS=audiodecoder
#  - ADDONS=audioencoder
#  - ADDONS=pvr
#  - ADDONS=screensaver
#  - ADDONS=visualization

matrix:
  fast_finish: true
  allow_failures:
#    - env: ADDONS=adsp
#    - 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:george-edison55/cmake-3.x &&
      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 libbz2-dev libcap-dev libcdio-dev libcec4-dev libcrossguid-dev libcurl3
      libcurl4-openssl-dev libdbus-1-dev libfontconfig-dev libegl1-mesa-dev libfreetype6-dev libfribidi-dev liblcms2-dev libgif-dev
      libiso9660-dev libjpeg-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev
      libpcre3-dev libplist-dev libpng-dev libpulse-dev libsdl2-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 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 ../project/cmake;
    fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" && "$CXX" == "clang++" ]]; then
      cmake -DCMAKE_CXX_FLAGS="-Qunused-arguments" ../project/cmake;
    fi
  - if [[ "$BUILD" != "Kodi" ]] && [[ "$ADDONS" == "adsp" || "$ADDONS" == "audiodecoder" || "$ADDONS" == "audioencoder" ||
          "$ADDONS" == "pvr" || "$ADDONS" == "screensaver" || "$ADDONS" == "visualization" ]]; then
      cd $TRAVIS_BUILD_DIR/project/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" == "adsp" || "$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/project/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