-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
.travis.yml
109 lines (89 loc) · 3.5 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
language: cpp
sudo: required
services:
- docker
cache:
ccache: true
directories:
- build-cache
matrix:
include:
- compiler: clang
env: TOOL=scons CXXSTD=11 NLS=true
- compiler: gcc
env: TOOL=scons CXXSTD=14 NLS=false
- compiler: gcc
env: TOOL=scons CXXSTD=11 NLS=false OPT=-O0
- compiler: gcc
env: TOOL=cmake CXXSTD=11 NLS=false
- compiler: clang
env: TOOL=scons CXXSTD=11 NLS=false OPT=-O0
- compiler: clang
env: TOOL=cmake CXXSTD=11 NLS=false
- os: osx
compiler: clang
env: TOOL=scons CXXSTD=11 NLS=false OPT=-O0
- os: osx
compiler: clang
osx_image: xcode9.2
env: TOOL=xcodebuild
before_install:
- export EXTRA_FLAGS_RELEASE=""
- export WML_TESTS=true
- export PLAY_TEST=true
- export MP_TEST=true
- export WML_TEST_TIME=15
- export BOOST_TEST=true
- if [ "$OPT" = "-O0" ]; then
export EXTRA_FLAGS_RELEASE="-O0";
export PLAY_TEST=false;
export MP_TEST=false;
export WML_TEST_TIME=20;
fi
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$TOOL" = "xcodebuild" ]; then
brew install ccache;
travis_wait ./projectfiles/Xcode/Fix_Xcode_Dependencies;
else
travis_wait ./utils/travis/install_deps.sh;
export CXXFLAGS="-I/usr/local/opt/openssl/include $CFLAGS";
export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS";
fi
else
docker build -t wesnoth-repo:16.04 -f docker/Dockerfile-travis .;
fi
script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$TOOL" = "xcodebuild" ]; then
export PATH="/usr/local/opt/ccache/libexec:$PWD/utils/travis:$PATH";
export CC=ccache-clang;
export CXX=ccache-clang++;
cd ./projectfiles/Xcode;
export CCACHE_MAXSIZE=2G;
export CCACHE_COMPILERCHECK=content;
xcodebuild -project Wesnoth.xcodeproj -target Wesnoth;
ccache -s;
ccache -z;
else
ln -s build-cache/ build;
./utils/travis/check_utf8.sh;
./utils/travis/utf8_bom_dog.sh;
"$CXX" --version;
scons wesnoth wesnothd campaignd boost_unit_tests build=release ctool="$CC" cxxtool="$CXX" --debug=time extra_flags_config="-pipe" extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=true cxx_std="$CXXSTD" nls="$NLS" jobs=2 enable_lto=false;
fi
else
export DISPLAY=:99.0;
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1024x768x24;
docker run -v "$PWD"/build-cache:/home/wesnoth-travis/build -v "$HOME"/.ccache:/root/.ccache wesnoth-repo:16.04 bash -c './docker_run.sh "$@"' bash "$NLS" "$TOOL" "$CC" "$CXX" "$CXXSTD" "$EXTRA_FLAGS_RELEASE" "$WML_TESTS" "$WML_TEST_TIME" "$PLAY_TEST" "$MP_TEST" "$BOOST_TEST";
fi
notifications:
email: false
irc:
channels:
- "chat.freenode.net#wesnoth-dev"
template:
- "\x02%{repository}\x0f#\x0312%{build_number}\x0f (\x0307%{branch}\x0f - \x02%{commit}\x0f : \x0303%{author}\x0f): \x02%{message}\x0f"
- "Build details : \x0302%{build_url}\x0f"
on_success: change
on_failure: always