forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (73 loc) · 3.51 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
compiler:
- gcc
- clang
env:
- BUILD=1
- BUILD=2
- BUILD=3
- BUILD=4
matrix:
exclude:
- compiler: gcc
env: BUILD=2
- compiler: gcc
env: BUILD=3
- compiler: clang
env: BUILD=1
- compiler: clang
env: BUILD=4
before_install:
- export TARGETS="wesnoth wesnothd campaignd test"
- export WML_TESTS=true
- export CPP_TESTS=true
- export CHECK_UTF8=true
- export PLAY_TEST=true
- export STRICT_COMPILATION=true
- export EXTRA_FLAGS_RELEASE="-O0"
- export WML_TEST_TIME=40
- export NLS=true
- export ALTERNATE_CONFIGURATION=false
- export CXX11=false
- if [ "$BUILD" = 3 ]; then export ALTERNATE_CONFIGURATION=true; fi
- if [ "$BUILD" = 4 ]; then export CXX11=true; fi
- if [ "$BUILD" = 4 ]; then export CPP_TESTS=false; fi
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export STRICT_COMPILATION=false; fi
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export EXTRA_FLAGS_RELEASE=""; fi
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export WML_TEST_TIME=20; fi
- if [ "$CXX" = "g++" ]; then export WML_TESTS=false; fi
- if [ "$CXX" = "g++" ]; then export PLAY_TEST=false; fi
- if [ "$CXX" = "g++" ]; then export CHECK_UTF8=false; fi
- if [ "$CXX" = "g++" ]; then export NLS=false; fi
- if [ "$CXX11" = true ]; then export STRICT_COMPILATION=false; fi
install:
- sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ saucy main universe"
- time sudo apt-get update -qq
- time 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
- if [ "$CXX" = "g++" ]; then time sudo apt-get -qq install g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
- if [ "$CHECK_UTF8" = true ]; then time sudo apt-get install -qq moreutils; fi
- $CXX -v
script:
- if [ "$CHECK_UTF8" = true ]; then time ./utils/travis/check_utf8.sh; fi
- time ./utils/travis/utf8_bom_dog.sh
- echo "*Params* --- " "cxxtool=$CXX --debug=time build=release extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx0x=$CXX11 nls=$NLS"
- scons cxxtool=$CXX --debug=time build=release extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx0x=$CXX11 nls=$NLS
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- if [ "$CPP_TESTS" = true ]; then time ./test; fi # The test executor script seems to be blocking stderr, disabling for now... time ./utils/travis/test_executor.sh; fi
- if [ "$WML_TESTS" = true ]; then time ./run_wml_tests -g -v -c -t "$WML_TEST_TIME"; fi
- if [ "$PLAY_TEST" = true ]; then time ./utils/travis/play_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