Skip to content

Commit

Permalink
make the "alternate" clang build use -O0 optimizations
Browse files Browse the repository at this point in the history
The alternate clang build currently uses strict compilation = false,
this was requested so that we get as many error messages as possible.

We would also like to have an -O0 build run against the unit tests,
as sometimes -O0 will segfault while -O2 won't, etc. So in this
commit the alternate build uses that option also. I also rename
the environment variables, so that the build matrix is based on
casing out whether "alternate_configuration" is true (not strict_
compilation) as previously, and the alternate_configuration flag
leads to options being exported in the before_install phase.
  • Loading branch information
cbeck88 committed Jul 4, 2014
1 parent 314b6cb commit 8bff084
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8bff084

Please sign in to comment.