From 8d9a479a03208b16897a76b6e68f865bc0d84743 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Fri, 22 Sep 2017 12:29:08 +0200 Subject: [PATCH] don't export conda paths --- gitlab/functions.sh | 6 ------ templates/gitlab-ci.yml | 33 ++++++++++++++++----------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/gitlab/functions.sh b/gitlab/functions.sh index 55afc3a..8c353b7 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -428,9 +428,3 @@ LANG="en_US.UTF-8" LC_ALL="${LANG}" export_env LANG export_env LC_ALL - -# ask conda to cache and build in the project directory -CONDA_ENVS_PATH="conda-env" -CONDA_BLD_PATH="conda-env" -export_env CONDA_ENVS_PATH -export_env CONDA_BLD_PATH diff --git a/templates/gitlab-ci.yml b/templates/gitlab-ci.yml index 5e885e3..85415d5 100644 --- a/templates/gitlab-ci.yml +++ b/templates/gitlab-ci.yml @@ -16,14 +16,8 @@ stages: # Build targets .build_template: &build_job stage: build - script: - - ./_ci/build.sh - -.build_linux_template: &linux_build_job - <<: *build_job before_script: - - export CONDA_FOLDER=/opt/miniconda - - export PATH=/opt/miniconda/bin:$PATH + - export PATH=${CONDA_FOLDER}:$PATH - mkdir _ci - curl https://curl.haxx.se/ca/cacert.pem > _ci/cacert.pem - export CURL_CA_BUNDLE=`pwd`/_ci/cacert.pem @@ -31,6 +25,11 @@ stages: - curl "https://gitlab.idiap.ch/bob/bob.admin/raw/condapackage/gitlab/install.sh" > _ci/install.sh - chmod 755 _ci/install.sh - ./_ci/install.sh _ci condapackage + script: + - ./_ci/build.sh + +.build_linux_template: &linux_build_job + <<: *build_job artifacts: expire_in: 1 week paths: @@ -44,19 +43,11 @@ stages: paths: - ${CONDA_ENVS_PATH}/.pkgs/*.tar.bz2 - ${CONDA_ENVS_PATH}/.pkgs/urls.txt + variables: &linux_variables + CONDA_FOLDER: "/opt/miniconda" .build_macosx_template: &macosx_build_job <<: *build_job - before_script: - - export CONDA_FOLDER=$CI_PROJECT_DIR/${CONDA_ENVS_PATH} - - export PATH=$CI_PROJECT_DIR/${CONDA_ENVS_PATH}/bin:$PATH - - mkdir _ci - - curl https://curl.haxx.se/ca/cacert.pem > _ci/cacert.pem - - export CURL_CA_BUNDLE=`pwd`/_ci/cacert.pem - - export SSL_CERT_FILE=`pwd`/_ci/cacert.pem - - curl "https://gitlab.idiap.ch/bob/bob.admin/raw/condapackage/gitlab/install.sh" > _ci/install.sh - - chmod 755 _ci/install.sh - - ./_ci/install.sh _ci condapackage artifacts: expire_in: 1 week paths: @@ -69,21 +60,26 @@ stages: paths: - miniconda.sh - ${CONDA_ENVS_PATH}/pkgs/ + variables: &macosx_variables + CONDA_FOLDER: "${CI_PROJECT_DIR}/${CONDA_ENVS_PATH}" build_linux_27: <<: *linux_build_job variables: + <<: * linux_variables PYTHON_VERSION: "2.7" build_linux_35: <<: *linux_build_job variables: + <<: * linux_variables PYTHON_VERSION: "3.5" build_linux_36: <<: *linux_build_job variables: + <<: * linux_variables PYTHON_VERSION: "3.6" BUILD_EGG: "true" artifacts: @@ -96,16 +92,19 @@ build_linux_36: build_macosx_27: <<: *macosx_build_job variables: + <<: * macosx_variables PYTHON_VERSION: "2.7" build_macosx_35: <<: *macosx_build_job variables: + <<: * macosx_variables PYTHON_VERSION: "3.5" build_macosx_36: <<: *macosx_build_job variables: + <<: * macosx_variables PYTHON_VERSION: "3.6" -- GitLab