forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
88 lines (78 loc) · 3.61 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
language: cpp
sudo: required
services:
- docker
compiler:
- gcc
- clang
env:
- OPT=-O0 CXXSTD=11 NLS=false
- OPT=-O2 CXXSTD=11 NLS=false
- OPT=-O2 CXXSTD=1y NLS=false
- NLS=true
- CXXSTD=11 NLS=false USE_CMAKE=true
matrix:
exclude:
- compiler: gcc
env: OPT=-O2 CXXSTD=11 NLS=false
- compiler: gcc
env: NLS=true
- compiler: clang
env: OPT=-O2 CXXSTD=1y NLS=false
- compiler: clang
env: OPT=-O0 CXXSTD=11 NLS=false
allow_failures:
- env: OPT=-O2 CXXSTD=1y NLS=false
before_install:
- export TARGETS="wesnoth wesnothd campaignd test"
- export STRICT_COMPILATION=false
- export EXTRA_FLAGS_RELEASE=""
- export WML_TESTS=true CPP_TESTS=true PLAY_TEST=true MP_TEST=true
- export WML_TEST_TIME=15
- if $NLS; then
export TARGETS="translations" CXXSTD=11;
export WML_TESTS=false CPP_TESTS=false PLAY_TEST=false MP_TEST=false;
fi
- if [ "$OPT" == "-O0" ]; then
export STRICT_COMPILATION=true;
export EXTRA_FLAGS_RELEASE="-O0 -Wno-deprecated-declarations";
export PLAY_TEST=false MP_TEST=false WML_TEST_TIME=20;
fi
- if [[ "$OPT" == "-O0" ]] && [[ "$CXX" == "clang++" ]]; then export EXTRA_FLAGS_RELEASE="-O0 -Wno-deprecated-declarations -Wno-literal-suffix -Wno-deprecated-register"; fi
install:
- if [ "$CXXSTD" == "1y" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; fi
- travis_wait sudo apt-get update -qq
- travis_wait sudo apt-get install -qq libboost-filesystem-dev libboost-iostreams-dev libboost-random-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-test-dev libboost-locale-dev libboost-thread-dev libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev gdb moreutils scons xvfb cmake
- if [ "$CXXSTD" == "1y" ]; then
sudo apt-get install -qq g++-5;
export CXX=g++-5;
export CC=gcc-5;
fi
script:
- ./utils/travis/check_utf8.sh
- ./utils/travis/utf8_bom_dog.sh
- $CXX --version
- if [ "$USE_CMAKE" = true ]; then
cmake . -DENABLE_STRICT_COMPILATION=$STRICT_COMPILATION -DENABLE_NLS=$NLS -DENABLE_TESTS=$CPP_TESTS && make VERBOSE=1 -j2;
else
scons cxxtool=$CXX ctool=$CC --debug=time build=release extra_flags_config=-pipe extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx_std=$CXXSTD nls=$NLS jobs=2;
fi
- "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"
- if [ "$CPP_TESTS" = true ]; then ./utils/travis/test_wrapper.sh; fi
- if [ "$WML_TESTS" = true ]; then ./run_wml_tests -g -v -c -t "$WML_TEST_TIME"; fi
- if [ "$PLAY_TEST" = true ]; then ./utils/travis/play_test_executor.sh; fi
- if [ "$MP_TEST" = true ]; then ./utils/travis/mp_test_executor.sh; fi
after_failure:
- if [ -f "errors.log" ]; then echo -e "\n*** \n*\n* Errors reported in wml unit tests, here is errors.log...\n*\n*** \n"; cat errors.log; fi
- ./utils/travis/test_executor.sh;
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