-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separated before_install and install sh files
- Loading branch information
1 parent
f1f5ce3
commit f09c46a
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Set conda path info | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
export MINICONDA_PATH=$HOME/miniconda; | ||
export MINICONDA_SUB_PATH=$MINICONDA_PATH/bin; | ||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | ||
export MINICONDA_PATH=/c/tools/miniconda3; | ||
export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH`; | ||
export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts; | ||
fi; | ||
export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin; | ||
# Obtain miniconda installer | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
if [[ -f $HOME/download/miniconda.sh ]]; then | ||
echo "miniconda.sh for posix already available"; | ||
else | ||
mkdir -p $HOME/download; | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | ||
echo "downloading miniconda.sh for linux"; | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/download/miniconda.sh; | ||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then | ||
echo "downloading miniconda.sh for osx"; | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O $HOME/download/miniconda.sh; | ||
fi; | ||
fi; | ||
fi; | ||
# Install openssl for Windows | ||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | ||
choco install openssl.light; | ||
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Install miniconda | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
if [[ -d $MINICONDA_SUB_PATH ]]; then | ||
echo "miniconda for posix already available"; | ||
else | ||
echo "installing miniconda for posix"; | ||
bash $HOME/download/miniconda.sh -b -u -p $MINICONDA_PATH; | ||
fi; | ||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | ||
if [[ -d $MINICONDA_SUB_PATH ]]; then | ||
echo "miniconda for Windows already installed"; | ||
else | ||
echo "installing miniconda for windows"; | ||
choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'"; | ||
fi; | ||
fi; | ||
export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH"; | ||
source $MINICONDA_PATH/etc/profile.d/conda.sh; | ||
hash -r; | ||
echo $TRAVIS_OS_NAME | ||
python --version | ||
conda config --set always_yes yes --set changeps1 no; | ||
conda update -q conda; | ||
# Useful for debugging any issues with conda | ||
conda info -a | ||
# See if test-environment already available | ||
# As necessary, apply python module recipies | ||
if [[ ! -d $MINICONDA_PATH/envs/test-environment ]]; then | ||
echo "create test-environment"; | ||
conda env create -n test-environment python=$CONDA_PYTHON -f ./tests/environment.${CONDA_PYTHON}.yml; | ||
else | ||
echo "update test-environment"; | ||
conda env update -n test-environment python=$CONDA_PYTHON -f ./tests/environment.${CONDA_PYTHON}.yml; | ||
fi; | ||
conda activate test-environment | ||
conda list |