diff --git a/.travis.yml b/.travis.yml index 2cbdd03..8f9992b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ before_install: - ./ci/update_ci.sh script: - - script=compile CXX=clang++ CC=clang ./ci/execute.sh + - script=static_analysis ./ci/execute.sh - script=clean ./ci/execute.sh - script=compile CXX=g++ CC=gcc ./ci/execute.sh - - script=static_analysis ./ci/execute.sh diff --git a/ci/compile.sh b/ci/compile.sh index 5d6d073..56bfa94 100755 --- a/ci/compile.sh +++ b/ci/compile.sh @@ -19,7 +19,6 @@ if [ "${make_command}" == "" ]; then fi cd libclangmm || echo "Can't cd into libclangmm" -git submodule update --init --recursive # appveyor doesn't checkout recursively mkdir -p build && cd build || echo "Error making build directory" sh -c "${cmake_command}" || echo "Cmake configuration failed" exec sh -c "${make_command}" diff --git a/ci/static_analysis.sh b/ci/static_analysis.sh index fc58654..04b440b 100755 --- a/ci/static_analysis.sh +++ b/ci/static_analysis.sh @@ -1,8 +1,14 @@ #!/bin/bash +if [ "${cmake_command}" == "" ]; then + cmake_command="scan-build cmake .." +fi + if [ "${make_command}" == "" ]; then - make_command="make -j 2" + make_command="scan-build --status-bugs make -j 2" fi -cd libclangmm/build || exit -exec sh -c "scan-build -o ../html_${distribution} --status-bugs ${make_command}" +cd libclangmm || echo "Can't cd into libclangmm" +mkdir -p build && cd build || echo "Error making build directory" +sh -c "${cmake_command}" || echo "Cmake configuration failed" +exec sh -c "${make_command}"