# CI on Windows via appveyor
# This file was based on Olivier Grisel's python-appveyor-demo
branches:
  except:
    - docs

notifications:
  - provider: Email
    on_build_success: false
    on_build_failure: false
    on_build_status_changed: false

environment:
  matrix:
    - PYTHON: "C:\\Python3-conda64"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "64"

install:
  # Install miniconda Python
  - "powershell ./ci/install_python.ps1"

  # Create environment with desired python version and activate it
  - "SET PATH=%PYTHON%\\Scripts;%PYTHON%;%PATH%"
  - "SET GDAL_DATA=%PYTHON%\\Library\\share\\gdal"

  - "conda install --yes --quiet -c conda-forge python=%PYTHON_VERSION%"
  - "conda update --yes --quiet -c conda-forge --all"

  # Check that we have the expected version and architecture for Python
  - "python --version"
  - "python -c \"import struct; print(struct.calcsize('P') * 8)\""

  # install dependencies
  - "conda install --yes --quiet -c conda-forge -c oggm gdal libgdal geopandas matplotlib Pillow joblib motionless netCDF4 scikit-image configobj pytest pytest-mpl pyproj numpy rasterio krb5 xarray boto3"
  - "pip install git+https://github.com/fmaussion/salem.git"
  - "pip install -e ."

build: false

test_script:
  - "pytest --mpl-oggm --run-slow ."

# CI on Windows via appveyor
# This file was based on Olivier Grisel's python-appveyor-demo
branches:
  except:
    - docs

notifications:
  - provider: Email
    on_build_success: false
    on_build_failure: false
    on_build_status_changed: false

environment:
  matrix:
    - PYTHON: "C:\\Python3-conda64"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "64"

install:
  # Install miniconda Python
  - "powershell ./ci/install_python.ps1"

  # Create environment with desired python version and activate it
  - "SET PATH=%PYTHON%\\Scripts;%PYTHON%;%PATH%"
  - "SET GDAL_DATA=%PYTHON%\\Library\\share\\gdal"

  - "conda install --yes --quiet -c conda-forge python=%PYTHON_VERSION%"
  - "conda update --yes --quiet -c conda-forge --all"

  # Check that we have the expected version and architecture for Python
  - "python --version"
  - "python -c \"import struct; print(struct.calcsize('P') * 8)\""

  # install dependencies
  - "conda install --yes --quiet -c oggm -c conda-forge gdal libgdal geopandas matplotlib Pillow joblib motionless netCDF4 scikit-image configobj pytest pytest-mpl pyproj numpy rasterio krb5 xarray boto3"
  - "pip install git+https://github.com/fmaussion/salem.git"
  - "pip install -e ."

build: false

test_script:
  - "pytest --mpl-oggm --run-slow ."

Put oggm repository first on conda
Put oggm repository first on conda
