From 430895d5adf6cebc4d81a90837483a9b57062a34 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 8 Jun 2021 12:49:55 +0100 Subject: [PATCH 1/6] does not run unit tests in all combinations --- scripts/jenkins-build.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index 239cabd..178fe20 100644 --- a/scripts/jenkins-build.sh +++ b/scripts/jenkins-build.sh @@ -120,7 +120,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=3.7 --numpy=1.18 + 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 +134,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_PATH} "$CCPI_BUILD_ARGS" "$@" + else + eval conda build --no-test ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" + eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" --python=3.7 --numpy=1.18 + 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' From c3c97a4825456459fe63fc0faa85b7b6ec3c483f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 8 Jun 2021 12:56:53 +0100 Subject: [PATCH 2/6] add variables to set the version of Python and NumPy with default --- scripts/jenkins-build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index 178fe20..bf87900 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 @@ -125,7 +133,7 @@ if [[ -d ${RECIPE_PATH} ]]; 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=3.7 --numpy=1.18 + 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' @@ -139,7 +147,7 @@ if [[ -d recipe ]]; 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=3.7 --numpy=1.18 + eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" --python=${TEST_PY} --numpy=${TEST_NP} fi # call with --output generates the files being created #--output bug work around From da3e2735fe58b3257f66b81fb263b0f6cd712669 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 8 Jun 2021 15:03:33 +0100 Subject: [PATCH 3/6] fix pointer to recipe dir --- scripts/jenkins-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index bf87900..9561906 100644 --- a/scripts/jenkins-build.sh +++ b/scripts/jenkins-build.sh @@ -144,10 +144,10 @@ fi if [[ -d recipe ]]; then ##if >0 commit (some _ in version) then marking as dev build if [[ ! ${ncommits} == "0" ]]; then - eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" + eval conda build recipe "$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} + 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 From 3224423c55a02664f4ed4055c185eea802ca9623 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 8 Jun 2021 15:22:16 +0100 Subject: [PATCH 4/6] fix logic on when to test --- scripts/jenkins-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index 9561906..0cc9618 100644 --- a/scripts/jenkins-build.sh +++ b/scripts/jenkins-build.sh @@ -129,7 +129,7 @@ fi if [[ -d ${RECIPE_PATH} ]]; then ##if >0 commit (some _ in version) then marking as dev build - if [[ ! ${ncommits} == "0" ]]; then + if [[ ${ncommits} == "0" ]]; then eval conda build ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" else eval conda build --no-test ${RECIPE_PATH} "$CCPI_BUILD_ARGS" "$@" @@ -143,7 +143,7 @@ fi if [[ -d recipe ]]; then ##if >0 commit (some _ in version) then marking as dev build - if [[ ! ${ncommits} == "0" ]]; then + if [[ ${ncommits} == "0" ]]; then eval conda build recipe "$CCPI_BUILD_ARGS" "$@" else eval conda build --no-test recipe "$CCPI_BUILD_ARGS" "$@" From b99b3d50e5ec34b3793a9eed2a97adce07c5a84b Mon Sep 17 00:00:00 2001 From: Gemma Fardell <47746591+gfardell@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:31:02 +0100 Subject: [PATCH 5/6] Update jenkins-build.sh Increase the conda package timeout option --- scripts/jenkins-build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index 0cc9618..ffe4e8e 100644 --- a/scripts/jenkins-build.sh +++ b/scripts/jenkins-build.sh @@ -117,6 +117,10 @@ 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 + +# 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 From 2b945ccb103d5f57c02c84e70f6f7401c4243fd5 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca <14138589+paskino@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:27:28 +0100 Subject: [PATCH 6/6] install git from conda --- scripts/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/jenkins-build.sh b/scripts/jenkins-build.sh index ffe4e8e..cb18082 100644 --- a/scripts/jenkins-build.sh +++ b/scripts/jenkins-build.sh @@ -116,7 +116,7 @@ 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