forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (72 loc) · 3.73 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
language: cpp
sudo: required
services:
- docker
compiler:
- gcc
- clang
env:
- BUILD="-O0"
- BUILD="-O2"
- BUILD="C++11 -O0"
- BUILD="translations"
matrix:
exclude:
- compiler: gcc
env: BUILD="-O2"
- compiler: gcc
env: BUILD="translations"
before_install:
- export TARGETS="wesnoth wesnothd campaignd test"
- export WML_TESTS=true
- export CPP_TESTS=true
- export PLAY_TEST=true
- export MP_TEST=true
- export STRICT_COMPILATION=true
- export EXTRA_FLAGS_ALL="-pipe"
- export EXTRA_FLAGS_RELEASE="-O0"
- export WML_TEST_TIME=20
- export NLS=false
- export CXX11=false
- if [ "$BUILD" == "-O2" ]; then export STRICT_COMPILATION=false; fi
- if [ "$BUILD" == "-O2" ]; then export EXTRA_FLAGS_RELEASE=""; fi
- if [ "$BUILD" == "-O2" ]; then export WML_TEST_TIME=15; fi
- if [ "$BUILD" == "C++11 -O0" ]; then export CXX11=true; fi
- if [ "$BUILD" == "C++11 -O0" ]; then export EXTRA_FLAGS_RELEASE="-O0 -Wno-literal-suffix -Wno-deprecated-declarations"; fi
- if [[ "$BUILD" == "C++11 -O0" ]] && [[ "$CXX" == "clang++" ]]; then export EXTRA_FLAGS_RELEASE="-O0 -Wno-literal-suffix -Wno-deprecated-declarations -Wno-deprecated-register"; fi
- if [ "$BUILD" == "C++11 -O0" ]; then export PLAY_TEST=false; fi
- if [ "$BUILD" == "C++11 -O0" ]; then export MP_TEST=false; fi
- if [ "$BUILD" == "translations" ]; then export NLS=true; fi
- if [ "$BUILD" == "translations" ]; then export TARGETS="translations"; fi
- if [ "$BUILD" == "translations" ]; then export WML_TESTS=false; fi
- if [ "$BUILD" == "translations" ]; then export CPP_TESTS=false; fi
- if [ "$BUILD" == "translations" ]; then export PLAY_TEST=false; fi
- if [ "$BUILD" == "translations" ]; then export MP_TEST=false; fi
install:
- 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 libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev gdb moreutils scons xvfb
script:
- ./utils/travis/check_utf8.sh
- ./utils/travis/utf8_bom_dog.sh
- $CXX --version
- echo "*Params* --- " "cxxtool=$CXX --debug=time build=release extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx0x=$CXX11 nls=$NLS jobs=2"
- scons cxxtool=$CXX --debug=time build=release extra_flags_config="$EXTRA_FLAGS_ALL" extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx0x=$CXX11 nls=$NLS jobs=2
- "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