diff --git a/gitlab/before_deploy.sh b/gitlab/before_deploy.sh index 9c68a4f2b0157fbd6e01c34ac61b45c3b75794fc..1789719730df3a80f4fdb6dbc524b60e1b4c7f91 100755 --- a/gitlab/before_deploy.sh +++ b/gitlab/before_deploy.sh @@ -17,7 +17,7 @@ if [[ ${CI_PROJECT_NAME} == bob.db.* ]]; then else log_info "Using buildout: ${use_buildout}" fi - run_cmd ${use_buildout} + run_cmd ${PREFIX}/bin/python ${use_buildout} if [ -x ./bin/bob_dbmanage.py ]; then run_cmd ./bin/bob_dbmanage.py all download --force; fi diff --git a/gitlab/build.sh b/gitlab/build.sh index 3af02af73d064d7edaae42422ad6374f3c2d2bee..c9bc86d47219c92d0d6bc62c56e69188632351fd 100755 --- a/gitlab/build.sh +++ b/gitlab/build.sh @@ -13,7 +13,7 @@ else log_info "Using buildout: ${use_buildout}" fi -run_cmd ${use_buildout} +run_cmd ${PREFIX}/bin/python ${use_buildout} if [ -x ./bin/bob_dbmanage.py ]; then run_cmd ./bin/bob_dbmanage.py all download --missing; diff --git a/gitlab/functions.sh b/gitlab/functions.sh index 2ea420ec3dbcbf06fdb612e424e98b5a3e70c9e2..ce44e50a453bdf761a03a41f10b19fb88b06ebcc 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -314,23 +314,26 @@ dav_upload_folder() { } -# Creates (clones), Activates environment and sets up compilation +# Creates a virtualenv, Activates environment and sets up compilation # $1: root of the conda installation # $2: your current build prefix -# $3: the name of the conda environment to clone prepare_build_env() { - # Readies a conda environment to use for installation + # activate the base conda environment to get the environment variables + log_info "$ source ${CONDA_FOLDER}/bin/activate ${CONDA_ENV}" + source ${CONDA_FOLDER}/bin/activate ${CONDA_ENV} + + # Readies a virtualenv environment to use for installation if [ ! -d $2 ]; then - log_info "Creating conda installation at $2..." - run_cmd $1/bin/conda create --clone $3 --prefix $2 --yes + log_info "Creating virtualenv installation at $2..." + run_cmd ${BOB_PREFIX_PATH}/bin/virtualenv --system-site-packages $2 else log_info "Prefix directory $2 exists, not re-installing..." fi - # Activates conda environment for the build - log_info "$ source $1/bin/activate $2" - source $1/bin/activate $2 + # Activates virtualenv environment for the build + log_info "$ source $2/bin/activate" + source $2/bin/activate # Configures CCACHE # use_ccache=`which ccache` diff --git a/gitlab/test.sh b/gitlab/test.sh index 4a76151d483f3d59f19945ac802d55b65ed2a990..1522a348d17b0a014918415f2cf5324d92434026 100755 --- a/gitlab/test.sh +++ b/gitlab/test.sh @@ -5,26 +5,19 @@ source $(dirname ${0})/functions.sh prepare_build_env ${CONDA_FOLDER} ${PREFIX} -run_cmd cd ${PREFIX} +use_buildout=`which buildout` +if [ -z "${use_buildout}" ]; then + log_error "Cannot find buildout, aborting..." + exit 1 +else + log_info "Using buildout: ${use_buildout}" +fi -# Checks some programs - -use_python=`which python` -check_env use_python - -use_coverage=`which coverage` -check_env use_coverage - -use_nosetests=`which nosetests` -check_env use_nosetests - -use_sphinx=`which sphinx-build` -check_env use_sphinx +run_cmd ${PREFIX}/bin/python ${use_buildout} # The tests: - -run_cmd ${use_coverage} run --source=${CI_PROJECT_NAME} ${use_nosetests} -sv ${CI_PROJECT_NAME} -run_cmd ${use_coverage} report -run_cmd ${use_sphinx} -b doctest ${CI_PROJECT_DIR}/doc ${CI_PROJECT_NAME}/sphinx +run_cmd ./bin/coverage run --source=${CI_PROJECT_NAME} ./bin/nosetests -sv ${CI_PROJECT_NAME} +run_cmd ./bin/coverage report +run_cmd ./bin/sphinx-build -b doctest ${CI_PROJECT_DIR}/doc ${CI_PROJECT_NAME}/sphinx run_cmd cd ${CI_PROJECT_DIR} diff --git a/gitlab/update_feedstock.py b/gitlab/update_feedstock.py index 42680c57fc94da3daf1313c7d5b67c46b8109518..85406cb56d3ab4b92a29bdffd87640197769b5f3 100755 --- a/gitlab/update_feedstock.py +++ b/gitlab/update_feedstock.py @@ -251,8 +251,8 @@ def main(package, subfolder='recipes', direct_push=False): title = 'Update-to-{}'.format(branch_name) mr = gitlab.create_merge_request(project_id, branch_name, 'master', title, remove_source_branch='true') - # gitlab.accept_merge_request( - # project_id, mr['id'], merge_when_pipeline_succeeds='true') + gitlab.accept_merge_request( + project_id, mr['id'], merge_when_pipeline_succeeds='true') finally: shutil.rmtree(temp_dir)