version: '0.9.1.{build}'

image: Visual Studio 2019

platform:
  - x64

configuration:
  - Release

install:
  - git submodule update --init --recursive
  - call C:\\Miniconda38-x64\Scripts\activate.bat
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda
  - conda install conda-build anaconda-client
  - conda env create -n ale
  - conda env update -f environment.yml -n ale
  - conda activate ale

before_build:
  - mkdir build
  - cd build

build_script:
  - python ..\setup.py install
# pip3 install --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org -e ..
  - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -G "Visual Studio 16 2019" -A x64 -DALE_BUILD_TESTS=OFF ..
  - cmake --build . --target ALL_BUILD --config Release

artifacts:
  - path: build\Release\ale.dll
    name: ale.dll
  - path: build\Release\ale.lib
    name: ale.lib

on_success:
  - call C:\\Miniconda36-x64\Scripts\activate.bat
  - cd ../
  - conda build -c conda-forge recipe/
