-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
129 lines (112 loc) · 4.24 KB
/
.travis.yml
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
# 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 libegl1-mesa-dev libfmt3-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-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
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