aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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()