-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
.travis.yml
50 lines (50 loc) · 2.47 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
language: cpp
compiler:
- gcc
- clang
env:
- STRICT_COMPILATION=True
- STRICT_COMPILATION=False
matrix:
exclude:
- compiler: gcc
env: STRICT_COMPILATION=False
before_install:
- export TARGETS="wesnoth wesnothd campaignd test"
- export WML_TESTS=true
- export CPP_TESTS=true
- export CHECK_UTF8=true
- 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
- if [ "$CXX" = "g++" ]; then time sudo apt-get update -qq; fi
- if [ "$CXX" = "g++" ]; then time sudo apt-get install g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; 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 [ "$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 grep -qorHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ || exit 1
# UTF8 checks are the previous two lines. the second one checks po src data for UTF8 bom, this takes less than a second.
- scons cxxtool=$CXX --debug=time 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
- if [ grep -qorHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ]; then echo "Found a UTF8 BOM, see above."; 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