travis: build with AddressSanitizer enabled

This requires us to use a more recent compiler.
This commit is contained in:
Michael Stapelberg 2016-01-11 20:59:26 +01:00
parent 4c1ca3e29a
commit dd33cd36dd
1 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,8 @@ addons:
packages: packages:
- clang-format-3.5 - clang-format-3.5
- libllvm3.5 - libllvm3.5
- clang-3.5
- gcc-5
before_install: before_install:
# The travis VMs run on Ubuntu 12.04 which is very old and a huge pain to get # The travis VMs run on Ubuntu 12.04 which is very old and a huge pain to get
# into a state where we can build a recent version of i3 :(. # into a state where we can build a recent version of i3 :(.
@ -49,7 +51,9 @@ install:
- sudo /bin/sh -c 'cpanm -n -v AnyEvent::I3 || true' - sudo /bin/sh -c 'cpanm -n -v AnyEvent::I3 || true'
script: script:
- if [ -a .git/shallow ]; then git fetch --unshallow; fi - if [ -a .git/shallow ]; then git fetch --unshallow; fi
- CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror" make -j - if [ "$CC" = "clang" ]; then export CC="clang-3.5"; fi
- if [ "$CC" = "gcc" ]; then export CC="gcc-5"; fi
- CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror" make -j ASAN=1
- (cd testcases && xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false)) - (cd testcases && xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false))
- clang-format-3.5 -i $(find . -name "*.[ch]" | tr '\n' ' ') && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false) - clang-format-3.5 -i $(find . -name "*.[ch]" | tr '\n' ' ') && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)
- | - |