From: Joel Rosdahl Date: Sun, 5 Jul 2020 19:00:47 +0000 (+0200) Subject: Tweak ci/build script X-Git-Tag: v4.0~353 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=876071f9b3d293ce6635d7a3998efb67d0c2b653;p=thirdparty%2Fccache.git Tweak ci/build script - Removed redundant “exit 0” command again. - Removed now obsolete and misleading comments. - If JOBS is set to the empty string then detect the number of CPUs instead of running a limitless number of jobs. --- diff --git a/ci/build b/ci/build index b326e9a63..4baeded49 100755 --- a/ci/build +++ b/ci/build @@ -11,15 +11,12 @@ fi if [ -n "${SPECIAL:-}" ]; then exec "ci/$SPECIAL" else - [ -z ${JOBS+x} ] && JOBS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) - [ -z ${JOBS+x} ] && JOBS=2 + [ -z ${JOBS:+x} ] && JOBS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) + [ -z ${JOBS:+x} ] && JOBS=2 mkdir -p ${BUILDDIR:-build} cd ${BUILDDIR:-build} ${CMAKE_PREFIX:-} cmake ${CMAKE_PARAMS:-} ${CCACHE_LOC:-..} - # 4 jobs seem to be a reasonable default for Travis. - ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j${JOBS} - # Warning: Rare random failures when running with -j4. - [ "${RUN_TESTS:-1}" -ne "1" ] || ctest --output-on-failure -j${JOBS} "$@" + ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j$JOBS + [ "${RUN_TESTS:-1}" -ne "1" ] || ctest --output-on-failure -j$JOBS "$@" fi -exit 0