diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index 239cabd..cb18082 100644 --- a/scripts/jenkins-build.sh +++ b/scripts/jenkins-build.sh @@ -37,6 +37,14 @@ if [[ ! -n ${NO_GPU} ]] || [ ${NO_GPU} = false ]; then nvidia-smi fi +# set test Python and NumPy version +if [[ ! -n ${TEST_PY} ]] ; then + export TEST_PY='3.6' +fi +if [[ ! -n ${TEST_NP} ]] ; then + export TEST_NP='1.15' +fi + if [[ ! -n ${RECIPE_PATH} ]] ; then export RECIPE_PATH=Wrappers/Python/conda-recipe fi @@ -108,7 +116,11 @@ cat .git/HEAD # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit -conda install -y conda-build +conda install -y conda-build git + +# increase the package timeout option +conda config --set remote_read_timeout_secs 120 + #cd CCPi-Regularisation-Toolkit # already there by jenkins if [[ -n ${CCPI_PRE_BUILD} ]]; then @@ -120,7 +132,13 @@ fi # need to call first build if [[ -d ${RECIPE_PATH} ]]; then - eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" + ##if >0 commit (some _ in version) then marking as dev build + if [[ ${ncommits} == "0" ]]; then + eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" + else + eval conda build --no-test ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" + eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" --python=${TEST_PY} --numpy=${TEST_NP} + fi # call with --output generates the files being created #export REG_FILES=$REG_FILES`eval conda build Wrappers/Python/conda-recipe "$CCPI_BUILD_ARGS" --output`$'\n' #--output bug work around @@ -128,7 +146,13 @@ if [[ -d ${RECIPE_PATH} ]]; then fi if [[ -d recipe ]]; then - eval conda build recipe "$CCPI_BUILD_ARGS" "$@" + ##if >0 commit (some _ in version) then marking as dev build + if [[ ${ncommits} == "0" ]]; then + eval conda build recipe "$CCPI_BUILD_ARGS" "$@" + else + eval conda build --no-test recipe "$CCPI_BUILD_ARGS" "$@" + eval conda build recipe "$CCPI_BUILD_ARGS" "$@" --python=${TEST_PY} --numpy=${TEST_NP} + fi # call with --output generates the files being created #--output bug work around #export REG_FILES=$REG_FILES`eval conda build recipe "$CCPI_BUILD_ARGS" --output`$'\n'