Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions scripts/jenkins-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -120,15 +132,27 @@ 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
export REG_FILES=`ls /home/jenkins/conda-bld/linux-64/*${CIL_VERSION}*${ncommits}.tar.bz2`
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'
Expand Down