aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2017-03-07 12:33:37 +0100
committerGravatar Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2017-03-10 23:18:33 +0100
commit56dc3e331c6b4b2bfa5ac072db57db8250884ce3 (patch)
tree38d4075980e360c25ae473dd42acadff871a786b
parent9add418e7699a812e7cf5257680a7550234deb2a (diff)
Improve build of travis target on local machine.
- Move the git clones to a specific subfolder to avoid pollution. - Do not fail when git clone already exist (but make sure it is up-to-date).
-rw-r--r--.gitignore1
-rw-r--r--dev/ci/ci-common.sh15
2 files changed, 13 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 35cdf9b4e..64c49b008 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,7 @@ TAGS
.DS_Store
.pc
bin/
+_build_ci
_build
myocamlbuild_config.ml
config/Makefile
diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh
index 412da626f..cc34bc295 100644
--- a/dev/ci/ci-common.sh
+++ b/dev/ci/ci-common.sh
@@ -12,6 +12,9 @@ ls `pwd`/bin
mathcomp_CI_BRANCH=master
mathcomp_CI_GITURL=https://github.com/math-comp/math-comp.git
+# Where we clone and build external developments
+CI_BUILD_DIR=`pwd`/_build_ci
+
# git_checkout branch
git_checkout()
{
@@ -19,9 +22,15 @@ git_checkout()
local _URL=${2}
local _DEST=${3}
- echo "Checking out ${_DEST}"
- git clone --depth 1 -b ${_BRANCH} ${_URL} ${_DEST}
- ( cd ${3} && echo "${_DEST}: `git log -1 --format='%s | %H | %cd | %aN'`" )
+ mkdir -p ${CI_BUILD_DIR}
+ cd ${CI_BUILD_DIR}
+
+ if [ ! -d ${_DEST} ] ; then
+ echo "Checking out ${_DEST}"
+ git clone --depth 1 -b ${_BRANCH} ${_URL} ${_DEST}
+ fi
+ ( cd ${_DEST} && git pull &&
+ echo "${_DEST}: `git log -1 --format='%s | %H | %cd | %aN'`" )
}
checkout_mathcomp()