diff --git a/.travis.yml b/.travis.yml index 0aeee77d8445..15ab4d314580 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,17 +3,21 @@ compiler: - gcc - clang env: - - STRICT_COMPILATION=True - - STRICT_COMPILATION=False + - ALTERNATE_CONFIGURATION=true + - ALTERNATE_CONFIGURATION=false matrix: exclude: - compiler: gcc - env: STRICT_COMPILATION=False + env: ALTERNATE_CONFIGURATION=false 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 @@ -30,7 +34,7 @@ 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 strict=$STRICT_COMPILATION $TARGETS + - 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