forked from xoreos/phaethon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (75 loc) · 3.6 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
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
- clang
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "dn5Irr/svB2d/iouvSxxoe2SEAWlPUlkNlGWScngWhqSp+kEJ8p3ubQG0ogCK0vGGHPwUYXfIQvHQ8oSc2Z4na8rIwZqvkJnxYYKvPLZpweKhb+xQbpjPwDwEycFDxT+y7mPnRLKRDtdmcuRqMQh8gnxb6TMY9xqlCCvnTfwTmI="
- coverity_scan_run_condition='\( "$CC" = gcc \) -a \( $USECMAKE -eq 0 \)'
- coverity_scan_script_test_mode=false
matrix:
# Let's test both our autoconf and CMake build system
- USECMAKE=0
- USECMAKE=1
# Only test clang with autotools, not CMake.
# We now have three builds: autoconf+gcc, autoconf+clang, CMake+gcc
matrix:
exclude:
- compiler: clang
env: USECMAKE=1
# Install a new gcc and our library dependencies.
# This is a bit of a complicated setup, because:
# 1) The C++ ABI change means we can't mix-n-match C++ stuff from
# different sources
# 2) The dpkg version in Xenial added a new keyword that's used in
# Artful packages, most prominently libc-bin
#
# So we do this in 3 steps:
# 1) We add the Xenial repos, and upgrade dpkg
# 2) We add the Artful repos, and upgrade the libc, gcc and binutils
# 3) We install our library dependencies
before_script:
- echo "yes" | sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse"
- sudo apt-get update -qq
- sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" -o APT::Force-LoopBreak=1 install dpkg
- echo "yes" | sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu artful main universe restricted multiverse"
- sudo apt-get update -qq
- sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" -o APT::Force-LoopBreak=1 install dpkg gcc g++ libc6-dev libc6 binutils binutils-dev
- sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" -o APT::Force-LoopBreak=1 install libboost-all-dev libopenal-dev libmad0-dev libvorbis-dev zlib1g-dev liblzma-dev qtbase5-dev libqt5gui5 libqt5multimedia5 qtmultimedia5-dev libqt5multimediawidgets5
script:
# Configure, autotools
- if [ \( "$COVERITY_SCAN_BRANCH" != 1 \) -a \( $USECMAKE -eq 0 \) ]; then ./autogen.sh; fi
- if [ \( "$COVERITY_SCAN_BRANCH" != 1 \) -a \( $USECMAKE -eq 0 \) ]; then ./configure || cat config.log; fi
# Configure, CMake
- if [ \( "$COVERITY_SCAN_BRANCH" != 1 \) -a \( $USECMAKE -eq 1 \) ]; then cmake .; fi
# Compile
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -j4; fi
# Unit tests, autotools
- if [ \( "$COVERITY_SCAN_BRANCH" != 1 \) -a \( $USECMAKE -eq 0 \) ]; then echo "" > test-suite.log; make -j4 check || cat test-suite.log; fi
# Unit tests, CMake
- if [ \( "$COVERITY_SCAN_BRANCH" != 1 \) -a \( $USECMAKE -eq 1 \) ]; then make -j4 check; fi
addons:
coverity_scan:
build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis_coverity.sh
project:
name: $TRAVIS_REPO_SLUG
notification_email: [email protected]
build_command_prepend: "./autogen.sh && ./configure"
build_command: "make -j4 check"
branch_pattern: coverity_scan
notifications:
email:
recipients:
on_success: change
on_failure: always
irc:
channels:
- secure: "jPAkI6da6HEi+7KfiojReS3EQL1NnuQAe98Lv6dU9UMCsGR9bDMbzE0dMs8BU80MLsPFjy5OKBG0WMXTr43Los/igG9YG5g3VmYuV4w8D1+hjKbcDTxsUwusHz70W1p6NMd3WeWYkgNXRh9wZxAozNoAtouFKkjYlDzMqGAdTSc="
on_success: change
on_failure: always
use_notice: true