-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
.travis.yml
52 lines (52 loc) · 2.69 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
language: cpp
compiler:
- gcc
- clang
env:
- ALTERNATE_CONFIGURATION=true
- ALTERNATE_CONFIGURATION=false
matrix:
exclude:
- compiler: gcc
env: ALTERNATE_CONFIGURATION=true
before_install:
- export TARGETS="wesnoth wesnothd campaignd test"
- export WML_TESTS=true
- export CPP_TESTS=true
- export CHECK_UTF8=true
- export STRICT_COMPILATION=true
- export EXTRA_FLAGS_RELEASE=""
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export STRICT_COMPILATION=false
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export EXTRA_FLAGS_RELEASE="-O0"
- if [ "$CXX" = "g++" ]; then export TARGETS="wesnoth test"; fi
- if [ "$CXX" = "g++" ]; then export WML_TESTS=false; fi
# - if [ "$CXX" = "g++" ]; then export CPP_TESTS=false; fi
- if [ "$CXX" = "g++" ]; then export CHECK_UTF8=false; fi
- if [ "$CXX" = "g++" ]; then time sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; fi
install:
- time sudo apt-get update -qq
- time sudo apt-get install -qq libboost-iostreams-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-test-dev libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev
- if [ "$CXX" = "g++" ]; then time sudo apt-get 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
script:
- if [ "$CHECK_UTF8" = true ]; then time ./utils/travis/check_utf8.sh; fi
- time if grep -qorHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ; then echo "Error, Found a UTF8 BOM:\n"; grep -orHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ; exit 1; fi
# UTF8 checks are the previous two lines. the second one checks po src data for UTF8 bom, this takes a few seconds.
- scons cxxtool=$CXX --debug=time build=release extra_flags_release="$EXRTA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- if [[ "$CPP_TESTS" = true ]]; then time ./utils/travis/test_wrapper.sh; fi
- if [[ "$WML_TESTS" = true ]]; then time ./run_wml_tests -v -t 20; 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
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