Commit e370f695 authored by Duncan Macleod's avatar Duncan Macleod

ci: resolved conda activate warnings

parent c4f1e0c7
Pipeline #59439 failed with stages
in 2 minutes and 49 seconds
......@@ -20,9 +20,11 @@ variables:
.install-miniconda-osx: &install-miniconda-osx |
curl -o ./miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
/bin/bash miniconda.sh -b -u -p ${MINICONDA_PATH}
source ${MINICONDA_PATH}/etc/profile.d/conda.sh
.update-conda: &update-conda |
.init-conda: &init-conda |
source "$(conda info --base)/etc/profile.d/conda.sh"
conda config --set always_yes yes
conda config --add channels conda-forge
conda update --name base --channel defaults --yes conda
.docker-login: &docker-login |
......@@ -48,14 +50,14 @@ variables:
.render: &render
stage: render
before_script:
- *init-conda
script:
- export OS_NAME="${CI_JOB_NAME#render:}"
- conda activate base || source activate base
- conda config --add channels conda-forge
- conda activate base
- conda install --yes --file requirements.txt
- python3 ./scripts/build-environments.py
-m ./lscsoft_conda_config.yaml
-o environments/${OS_NAME}
-o environments/${CI_JOB_NAME#render:}
packages
artifacts:
paths:
......@@ -78,20 +80,20 @@ render:osx:
- macos_highsierra
before_script:
- *install-miniconda-osx
- *update-conda
- *init-conda
# -- build-and-test ---------
.build-and-test: &build-and-test
stage: build-and-test
before_script:
- *update-conda
- *init-conda
script:
- export ENV_PATH="$(pwd)/environments/${CI_JOB_NAME#build-and-test:}"
# build
- |
for ymlf in ${ENV_PATH}/*.yaml; do
conda env create -f ${ymlf};
conda env create --file ${ymlf};
done
# copy test files into place
- mkdir -pv test
......@@ -107,7 +109,7 @@ render:osx:
- |
for ymlf in ${ENV_PATH}/*.yaml; do
NAME=$(basename ${ymlf} .yaml);
conda activate ${NAME} || source activate ${NAME};
conda activate ${NAME};
python ${ENV_PATH}/${NAME}-test-imports.py;
bash ${ENV_PATH}/${NAME}-test-commands.sh;
done
......@@ -127,7 +129,7 @@ build-and-test:osx:
- render:osx
before_script:
- *install-miniconda-osx
- *update-conda
- *init-conda
build-and-test:cvmfs-container:
<<: *docker-job
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment