forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (76 loc) · 3.18 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
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
include:
- os: osx
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 [ "$TRAVIS_OS_NAME" = osx ]; then 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:
- travis_wait ./utils/travis/install_deps.sh
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"
- "if [ \"$TRAVIS_OS_NAME\" != osx ]; then /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1024x768x24; fi"
- 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