diff options
author | Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net> | 2017-12-19 15:54:34 +0100 |
---|---|---|
committer | Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net> | 2017-12-21 00:07:34 +0100 |
commit | cf04e49c5426da3ea684f8e545652803106af0c2 (patch) | |
tree | 394baab9d1aff785f2eef7b75f9297a07c286a7c /dev/ci/ci-common.sh | |
parent | f431dac2e219cb2a76b22e452d6e407869d89f42 (diff) |
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.
Diffstat (limited to 'dev/ci/ci-common.sh')
-rw-r--r-- | dev/ci/ci-common.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh index 1bfdf7dfb..23131c94c 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() { |