From cf04e49c5426da3ea684f8e545652803106af0c2 Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Tue, 19 Dec 2017 15:54:34 +0100 Subject: Fix CI with parallel make (messed up dependencies) When invoking through Makefile we always rebuild dependencies. To skip dependencies, invoke ci-wrapper directly. We make Circle CI do this. In order to properly support invoking ci-wrapper directly we replace "make" in ci-common by a bash function which adds -j to the make invocation outside submakes. We also set TIMED in the ci-wrapper. --- dev/ci/ci-common.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dev/ci/ci-common.sh') diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh index 1bfdf7dfbe..23131c94c6 100644 --- a/dev/ci/ci-common.sh +++ b/dev/ci/ci-common.sh @@ -53,6 +53,18 @@ checkout_mathcomp() git_checkout ${mathcomp_CI_BRANCH} ${mathcomp_CI_GITURL} ${1} } +make() +{ + # +x: add x only if defined + if [ -z "${MAKEFLAGS+x}" ] && [ -n "${NJOBS}" ]; + then + # Not submake and parallel make requested + command make -j "$NJOBS" "$@" + else + command make "$@" + fi +} + # this installs just the ssreflect library of math-comp install_ssreflect() { -- cgit v1.2.3