Commit ded6d028 authored by Duncan Macleod's avatar Duncan Macleod

ci: resolved conda activate warnings

parent c4f1e0c7
Pipeline #59438 failed
......@@ -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 |
......@@ -49,13 +51,11 @@ variables:
.render: &render
stage: render
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:
......@@ -68,6 +68,8 @@ variables:
render:linux:
<<: *render
image: continuumio/miniconda3
before_script:
- *init-conda
cache:
paths:
- /opt/conda/pkgs
......@@ -78,7 +80,7 @@ render:osx:
- macos_highsierra
before_script:
- *install-miniconda-osx
- *update-conda
- *init-conda
# -- build-and-test ---------
......@@ -91,7 +93,7 @@ render:osx:
# 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
......
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