From 2a783b0df2f9d8a75922fbde50419a809e372325 Mon Sep 17 00:00:00 2001 From: pentarctagon Date: Sat, 3 Mar 2018 14:27:00 -0600 Subject: [PATCH] Fix for failed ccache builds being considered successful. Travis looks at the return code of the final command run, and since printing the ccache statistics never fails, building would never be considered as failing. Manually calling exit also causes travis to treat the build as errored, since by sourcing the build it results in the entire travis wrapper shell exiting. --- utils/travis/docker_run.sh | 6 ------ utils/travis/steps/script.sh | 3 --- 2 files changed, 9 deletions(-) diff --git a/utils/travis/docker_run.sh b/utils/travis/docker_run.sh index d13ba012126..1e2b35f15f3 100755 --- a/utils/travis/docker_run.sh +++ b/utils/travis/docker_run.sh @@ -54,16 +54,10 @@ else echo "compiler_check = content" >> $HOME/.ccache/ccache.conf cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true -DENABLE_TESTS=true -DENABLE_NLS=false -DEXTRA_FLAGS_CONFIG="-pipe" -DEXTRA_FLAGS_RELEASE="$EXTRA_FLAGS_RELEASE" -DENABLE_STRICT_COMPILATION="$STRICT" -DENABLE_LTO=false -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache && make VERBOSE=1 -j2 - -# print ccache statistics - ccache -s -# clear ccache statistics, so only per run info is printed rather than cumulative - ccache -z else scons wesnoth wesnothd campaignd boost_unit_tests build=release ctool=$CC cxxtool=$CXX --debug=time extra_flags_config="-pipe" extra_flags_release="$EXTRA_FLAGS_RELEASE" strict="$STRICT" cxx_std=$CXXSTD nls=false jobs=2 enable_lto=false fi -# check if the build was successful BUILD_RET=$? if [ $BUILD_RET != 0 ]; then exit $BUILD_RET diff --git a/utils/travis/steps/script.sh b/utils/travis/steps/script.sh index 5bfc0a0950e..8ab800b88e9 100755 --- a/utils/travis/steps/script.sh +++ b/utils/travis/steps/script.sh @@ -12,9 +12,6 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then export CCACHE_COMPILERCHECK=content xcodebuild -project Wesnoth.xcodeproj -target Wesnoth - - ccache -s - ccache -z else ln -s build-cache/ build ./utils/travis/check_utf8.sh