forked from DaemonEngine/Daemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
77 lines (68 loc) · 2.11 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
sudo: required
language: cpp
cache: ccache
addons:
apt:
update: true
homebrew:
packages:
- ninja
- ccache
matrix:
include:
- name: "Linux build using gcc"
os: linux
compiler: gcc
- name: "Linux build using clang"
os: linux
compiler: clang
- name: "osx build"
os: osx
compiler: clang
# osx links gcc to clang; so skip
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get -y -q --no-install-recommends install
zlib1g-dev libncursesw5-dev libgeoip-dev
nettle-dev libgmp-dev libcurl4-gnutls-dev libsdl2-dev
libogg-dev libvorbis-dev libopusfile-dev libtheora-dev
libwebp-dev libjpeg8-dev libpng-dev
libfreetype6-dev libglew-dev libopenal-dev
liblua5.2-dev ninja-build;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update;
touch BrewFile;
echo 'brew "ccache"' >> BrewFile;
echo 'brew "ninja"' >> BrewFile;
brew bundle;
fi
- |
# workarounds to make ccache work
if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then
sudo ln -s $(which ccache) /usr/lib/ccache/clang
sudo ln -s $(which ccache) /usr/lib/ccache/clang++
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH"
fi
before_script:
- ccache --zero-stats
# In older versions of gcc the missing field initializer warning fires even when the initialization list is empty, which is stupid.
# This issue is fixed in version 5 of gcc, so if we get a newer version on Travis the warning can be re-enabled.
- if [ "$CC" == "gcc" ]; then export CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"; fi
- export CXXFLAGS="$CXXFLAGS -D__extern_always_inline=inline"
script:
- cmake -DUSE_PRECOMPILED_HEADER=0
-DUSE_WERROR=1 -DBE_VERBOSE=1 -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DUSE_DEBUG_OPTIMIZE=0
-H. -Bbuild
- cmake --build build -- -j8
before_cache:
- ccache --show-stats
notifications:
irc:
- "irc.freenode.org#daemon-engine"
on_success: change
on_failure: always
branches:
except:
- debian