travis: fail the entire job as soon as one of the run commands exits non-zero.
This commit is contained in:
parent
7e2cef4952
commit
db99eacbe9
|
@ -35,6 +35,8 @@ before_install:
|
||||||
- sudo apt-get install -qq python-pygments qt5-default qt5-qmake qtbase5-dev qtcreator libxml2-utils libpcre3 gdb unzip
|
- sudo apt-get install -qq python-pygments qt5-default qt5-qmake qtbase5-dev qtcreator libxml2-utils libpcre3 gdb unzip
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
# fail the entire job as soon as one of the subcommands exist not-zero to save time and resources
|
||||||
|
- set -e
|
||||||
# download clang git, compile cppcheck, run cppcheck on clang code to look for crashes in cppcheck. if this is done, terminate build
|
# download clang git, compile cppcheck, run cppcheck on clang code to look for crashes in cppcheck. if this is done, terminate build
|
||||||
- if [[ "$CHECK_CLANG" == "yes" ]] && [[ "$CC" == "clang" ]]; then wget "https://github.com/llvm-mirror/clang/archive/bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip" & make -j 4 & wait; unzip bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip > /dev/null; touch /tmp/clang.cppcheck; cd ./clang-bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling --template="{callstack} ({severity}) {message} [{id}]" -iINPUTS -itest/Driver/Inputs/gen-response.c -itest/Index/index-many-logical-ops.c -itest/Sema/many-logical-ops.c -j 2 |& tee /tmp/clang.cppcheck; cd ../ ; echo "CLANG" ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/clang.cppcheck; exit; fi
|
- if [[ "$CHECK_CLANG" == "yes" ]] && [[ "$CC" == "clang" ]]; then wget "https://github.com/llvm-mirror/clang/archive/bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip" & make -j 4 & wait; unzip bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip > /dev/null; touch /tmp/clang.cppcheck; cd ./clang-bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling --template="{callstack} ({severity}) {message} [{id}]" -iINPUTS -itest/Driver/Inputs/gen-response.c -itest/Index/index-many-logical-ops.c -itest/Sema/many-logical-ops.c -j 2 |& tee /tmp/clang.cppcheck; cd ../ ; echo "CLANG" ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/clang.cppcheck; exit; fi
|
||||||
# check llvm as well
|
# check llvm as well
|
||||||
|
|
Loading…
Reference in New Issue