Skip to content

Commit

Permalink
Travis test with both Iris latest-release and latest-master.
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo committed Oct 5, 2020
1 parent ad6c676 commit 54437ac
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ dist: xenial

env:
matrix:
- PYTHON_VERSION=36
- PYTHON_VERSION=37
- PYTHON_VERSION=36 LIMIT_TO_RELEASED_IRIS=false
- PYTHON_VERSION=36 LIMIT_TO_RELEASED_IRIS=true
- PYTHON_VERSION=37 LIMIT_TO_RELEASED_IRIS=false
- PYTHON_VERSION=37 LIMIT_TO_RELEASED_IRIS=true

install:
# Download iris-test-data
Expand Down Expand Up @@ -40,6 +42,22 @@ install:
export ENV_NAME="iris-grib-dev";
export ENV_FILE="${TRAVIS_BUILD_DIR}/requirements/ci/py${PYTHON_VERSION}.yml";
# Optionally download latest Iris from repo,
# and replace the Iris dependency with Iris' underlying dependencies.
- >
if [[ "${LIMIT_TO_RELEASED_IRIS}" == false ]]; then
IRIS_REF="https://github.com/SciTools/iris/archive/master.zip";
export IRIS_LOCATION="${HOME}/iris";
mkdir ${IRIS_LOCATION};
wget -O ${IRIS_LOCATION}/iris.zip ${IRIS_REF};
unzip -q ${IRIS_LOCATION}/iris.zip -d ${IRIS_LOCATION};
IRIS_ENV_FILE="${IRIS_LOCATION}/iris-master/requirements/ci/py${PYTHON_VERSION}.yml";
sed -i "/- iris/d" ${ENV_FILE};
echo "# IRIS DEPENDENCIES." >> ${ENV_FILE};
sed -ne "/dependencies:/,$ p" ${IRIS_ENV_FILE} | sed "1d" >> ${ENV_FILE};
fi;
# Create environment.
- >
conda env create --quiet --file=${ENV_FILE};
Expand All @@ -61,6 +79,13 @@ install:
# --------------
- echo "Configuring Iris";

# Optionally install latest Iris from downloaded source.
- >
if [[ "${LIMIT_TO_RELEASED_IRIS}" == false ]]; then
cd ${IRIS_LOCATION}/iris-master;
python setup.py --quiet install;
fi;
# Locate Iris installation.
- export IRIS_DIR=$(python -c "import iris; import os.path; print(os.path.dirname(iris.__file__))")

Expand Down

0 comments on commit 54437ac

Please sign in to comment.