-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
.travis.yml
88 lines (77 loc) · 4.15 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
compiler:
- gcc
- clang
env:
- BUILD=1
- BUILD=3
- BUILD=4
- BUILD=5
matrix:
exclude:
- compiler: gcc
env: BUILD=3
- compiler: gcc
env: BUILD=5
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 MP_TEST=false
- export STRICT_COMPILATION=true
- export EXTRA_FLAGS_RELEASE="-O0"
- export WML_TEST_TIME=40
- export NLS=false
- export CXX11=false
- if [ "$BUILD" = 3 ]; then export STRICT_COMPILATION=false; fi
- if [ "$BUILD" = 3 ]; then export EXTRA_FLAGS_RELEASE=""; fi
- if [ "$BUILD" = 3 ]; then export WML_TEST_TIME=20; fi
- if [ "$BUILD" = 3 ]; then export MP_TEST=true; fi
- if [ "$BUILD" = 4 ]; then export CXX11=true; fi
- if [ "$BUILD" = 4 ]; then export EXTRA_FLAGS_RELEASE="-O0 -Wno-literal-suffix -Wno-deprecated-declarations"; fi
- if [[ "$BUILD" = 4 ]] && [[ "$CXX" == "clang++" ]]; then export EXTRA_FLAGS_RELEASE="-O0 -Wno-literal-suffix -Wno-deprecated-declarations -Wno-deprecated-register"; fi
- if [ "$BUILD" = 4 ]; then export PLAY_TEST=false; fi
- if [ "$BUILD" = 5 ]; then export NLS=true; fi
- if [ "$BUILD" = 5 ]; then export TARGETS="translations"; fi
- if [ "$BUILD" = 5 ]; then export WML_TESTS=false; fi
- if [ "$BUILD" = 5 ]; then export CPP_TESTS=false; fi
- if [ "$BUILD" = 5 ]; then export PLAY_TEST=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
# - if [ "$CPP_TESTS" = true ]; then time sudo update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz; fi
# - if [ "$CPP_TESTS" = true ]; then time sudo apt-get -f; fi
# - if [ "$CPP_TESTS" = true ]; then time sudo apt-get install --reinstall postgresql-9.1; fi
# - if [ "$CPP_TESTS" = true ]; then time sudo apt-get -o Dpkg::Options::='--force-confold' --force-yes -fuy upgrade; fi
- $CXX -v
script:
- if [ "$CHECK_UTF8" = true ]; then time ./utils/travis/check_utf8.sh; fi
- time ./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_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx0x=$CXX11 nls=$NLS jobs=2
- "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
- if [ "$MP_TEST" = true ]; then time ./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