diff --git a/ci/bootstrap.sh b/ci/bootstrap.sh deleted file mode 100755 index a58c412f784288453f9f1730f652eedcc04d3ec0..0000000000000000000000000000000000000000 --- a/ci/bootstrap.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash -# Mon 8 Aug 17:40:24 2016 CEST - -# Creates a build environment for the current package -# $1 == conda folder (e.g. "/opt/conda") -# $2 == python version (e.g. "2.7") -# $3 == local dir for environment (e.g. "env") - -if [ "${#}" -ne 3 ]; then - echo "usage: ${0} <conda-root> <python-version> <prefix>" - echo "example: ${0} /opt/conda 2.7 env" - exit 1 -fi - -CONDA_FOLDER=${1} -PYTHON_VERSION=${2} -PREFIX=`pwd`/${3} -WHEELS_SERVER="www.idiap.ch" -WHEELS_REPOSITORY="https://${WHEELS_SERVER}/software/bob/wheels/gitlab/" - -# Determines the architecture we're using -if [ "$(uname)" == "Darwin" ]; then - ARCH="macosx" -else - ARCH="linux" -fi - -# Functions for coloring echo commands -red_echo() { - echo -e "\033[1;31m${@}\033[0m" -} - -green_echo() { - echo -e "\033[1;32m${@}\033[0m" -} - -yellow_echo() { - echo -e "\033[1;33m${@}\033[0m" -} - -# Function for running command and echoing results -run_cmd() { - green_echo "[(`date +%c`)>>] Running \"${@}\"..." - ${@} - if [ "$?" != "0" ]; then - red_echo "[(`date +%c`)!!] Command Failed \"${@}\"" - exit 1 - else - green_echo "[(`date +%c`)<<] Finished comand \"${@}\"" - fi -} - -# Clones the conda dev environment to use -if [ ! -d ${PREFIX} ]; then - yellow_echo "[++] Downloading environment list into file \`env.txt'..." - pyver=$(echo ${PYTHON_VERSION} | tr -d '.') - curl --silent https://gitlab.idiap.ch/bob/bob.admin/raw/master/install/${ARCH}/devel-py${pyver}.txt > env.txt - yellow_echo "[++] Bootstrapping conda installation at ${PREFIX}..." - run_cmd ${CONDA_FOLDER}/bin/conda clean --lock - run_cmd ${CONDA_FOLDER}/bin/conda create --prefix ${PREFIX} --file env.txt --yes - run_cmd ${CONDA_FOLDER}/bin/conda clean --lock -else - yellow_echo "[!!] Prefix directory ${PREFIX} exists, not re-installing..." -fi - -# Source the newly created conda environment -green_echo "[>>] Running \"source ${CONDA_FOLDER}/bin/activate ${PREFIX}\"..." -source ${CONDA_FOLDER}/bin/activate ${PREFIX} -green_echo "[<<] Environment ${PREFIX} activated" - -# Verify where pip is installed -use_pip=`which pip` -if [ -z "${use_pip}" ]; then - red_echo "[!!] Cannot find pip, aborting..." - exit 1 -else - yellow_echo "[++] Using pip: ${use_pip}" -fi - -use_python=`which python` -if [ -z "${use_python}" ]; then - red_echo "[!!] Cannot find python, aborting..." - exit 1 -else - yellow_echo "[++] Using python: ${use_python}" -fi - -# Install this package's build dependencies -if [ -e requirements.txt ]; then - run_cmd ${use_pip} install --find-links ${WHEELS_REPOSITORY} --use-wheel --no-index --trusted-host ${WHEELS_SERVER} --pre --requirement requirements.txt -else - yellow_echo "[!!] No requirements.txt file found, skipping 'pip install <build-deps>'..." -fi - -# Install this package's test dependencies -if [ -e test-requirements.txt ]; then - run_cmd ${use_pip} install --find-links ${WHEELS_REPOSITORY} --use-wheel --no-index --trusted-host ${WHEELS_SERVER} --pre --requirement test-requirements.txt -else - yellow_echo "[!!] No test-requirements.txt file found, skipping 'pip install <test-deps>'..." -fi - -# Finally, bootstrap the installation from the new environment -if [ -e bootstrap-buildout.py ]; then - run_cmd ${use_python} bootstrap-buildout.py -else - red_echo "[!!] No bootstrap-buildout.py file found, stopping..." - exit 1 -fi diff --git a/ci/docs.sh b/ci/docs.sh deleted file mode 100755 index 79440bbf8ce7800f471a265c6f830c397e310fa1..0000000000000000000000000000000000000000 --- a/ci/docs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# Wed 21 Sep 2016 13:08:05 CEST - -# Functions for coloring echo commands -red_echo() { - echo -e "\033[1;31m${@}\033[0m" -} - -green_echo() { - echo -e "\033[1;32m${@}\033[0m" -} - -if [ -z "${DOCUSER}" ] || [ -z "${DOCPASS}" ] || [ -z "${DOCSERVER}" ]; then - red_echo "DOCSERVER, DOCUSER and/or DOCPASS undefined - aborting..."; - exit 1 -fi - -info=sphinx/.gitlab-ci.info - -echo "repo=${CI_PROJECT_PATH}" > ${info} -echo "branch=${CI_BUILD_REF_NAME}" >> ${info} -echo "tag=${CI_BUILD_TAG}" >> ${info} -echo "build=${CI_BUILD_ID}" >> ${info} -echo "commit=${CI_BUILD_REF}" >> ${info} -echo "runner=${CI_RUNNER_DESCRIPTION}" >> ${info} - -file=${CI_PROJECT_NAME}-${CI_BUILD_REF}.tar.bz2 -tar cfj ${file} sphinx - -green_echo "[>>] Uploading ${file}..." -curl --silent --user "${DOCUSER}:${DOCPASS}" --upload-file ${file} ${DOCSERVER}/software/bob/docs-upload/ -if [ $? != 0 ]; then - red_echo "[error] curl command finished with an error condition" - exit 1 -fi diff --git a/ci/wheels.sh b/ci/wheels.sh deleted file mode 100755 index 399a548469cc828a64d1f866c7a5cf2b82416357..0000000000000000000000000000000000000000 --- a/ci/wheels.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Wed 21 Sep 2016 13:06:56 CEST - -# Functions for coloring echo commands -red_echo() { - echo -e "\033[1;31m${@}\033[0m" -} - -green_echo() { - echo -e "\033[1;32m${@}\033[0m" -} - -if [ -z "${DOCUSER}" ] || [ -z "${DOCPASS}" ] || [ -z "${DOCSERVER}" ]; then - red_echo "DOCSERVER, DOCUSER and/or DOCPASS undefined - aborting..."; - exit 1 -fi - -for file in dist/*.whl; do - green_echo "[>>] Uploading ${file}..." - curl --silent --user "${DOCUSER}:${DOCPASS}" --upload-file ${file} ${DOCSERVER}/software/bob/wheels-upload/gitlab/ - if [ $? != 0 ]; then - red_echo "[error] curl command finished with an error condition" - exit 1 - fi -done