/
.travis.yml
96 lines (87 loc) · 2.79 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
sudo: required
language: cpp
cache: ccache
addons:
apt:
update: true
homebrew:
packages:
- ninja
- ccache
matrix:
fast_finish: true
include:
- name: "Linux game-native-dll using gcc"
os: linux
compiler: gcc
env: MODE=1
- name: "Linux game-native-dll using clang"
os: linux
compiler: clang
env: MODE=1
- name: "Linux nacl-nexe (pnacl-clang)"
os: linux
compiler: clang
env: MODE=2
- name: "macOS game-native-dll (clang)"
os: osx
compiler: clang
env: MODE=1
allow_failures:
- name: "macOS nacl-nexe (pnacl-clang)"
os: osx
compiler: clang
env: MODE=2
# 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
nettle-dev libfreetype6-dev
liblua5.2-dev
ninja-build python-yaml python-jinja2;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update;
brew install ccache ninja;
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
- pip2 install --user -r src/utils/cbse/requirements.txt
- curl https://gitlab.com/illwieckz/git-checkout-modules/raw/master/git-checkout-modules -o ~/git-checkout-modules
- chmod +x ~/git-checkout-modules
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"
- ~/git-checkout-modules --only-sub="${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}}":has='/sync$' --print
script:
- cmake -DUSE_PRECOMPILED_HEADER=0
-DBUILD_CLIENT=0 -DBUILD_TTY_CLIENT=0 -DBUILD_SERVER=0
-DBUILD_GAME_NATIVE_DLL=$(($MODE == 1)) -DBUILD_GAME_NATIVE_EXE=0
-DBUILD_GAME_NACL=$(($MODE == 2)) -DBUILD_GAME_NACL_NEXE=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#unvanquished-dev"
- "irc.quakenet.org#unvanquished"
on_success: change
on_failure: always
branches:
except:
- /^archive\/.*$/
- /^attic\/.*$/
- /^cbse\/.*$/
- debian