Skip to content

Commit

Permalink
Use conda on appveyor.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-neal committed Jun 24, 2018
1 parent 18f516d commit 748ac9c
Showing 1 changed file with 41 additions and 29 deletions.
70 changes: 41 additions & 29 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,66 @@ environment:
matrix:
# For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python36-x64"

- PYTHON_VERSION: 3.5
MINICONDA: C:\Miniconda3
PYTHON_ARCH: "32"
- PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda3
PYTHON_ARCH: "32"
- PYTHON_VERSION: 3.5
MINICONDA: C:\Miniconda3-x64
PYTHON_ARCH: "64"
- PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda3-x64
PYTHON_ARCH: "64"

init:
- "ECHO %PYTHON_VERSION% %MINICONDA% %PYTHON_ARCH%"

install:
# We need wheel installed to build wheels
- "%PYTHON%\\python.exe -m pip install wheel"
# Use conda on windows
- cmd: "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- cmd: conda config --set always_yes yes --set changeps1 no
- cmd: conda update -q conda
- cmd: conda config --add channels conda-forge
- cmd: conda info -a
- cmd: "conda create -q -n test-environment python=%PYTHON_VERSION% numpy scipy"
- cmd: activate test-environment
- cmd: pip install coverage

# We need wheel installed to build wheels
- cmd: "pip install wheel"

# Installing Starfish
- "cd c:\\projects"
- "git clone https://github.com/jason-neal/Starfish.git"
- "cd c:\\projects\\Starfish"
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
- "git checkout windows" # Especially configured to build on windows
- "%PYTHON%\\python.exe setup.py develop"
- cmd: "cd c:\\projects"
- cmd: "git clone https://github.com/jason-neal/Starfish.git"
- cmd: "cd c:\\projects\\Starfish"
- cmd: "pip install -r requirements.txt"
- cmd: "git checkout windows" # Especially configured to build on windows
- cmd: "python setup.py develop"

# Installing eniric now
- cmd: "cd c:\\projects\\eniric"
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
- "%PYTHON%\\python.exe -m pip install -r requirements_dev.txt"
- "%PYTHON%\\python.exe setup.py install"
- cmd: "pip install -r requirements.txt"
- cmd: "pip install -r requirements_dev.txt"
- cmd: "python setup.py install"

# Setup config and make data
# This is not the best place to put this but before_test didn't work.
- cmd: "move tests\\config.yaml config.yaml"
# Generate data
- cmd: "%PYTHON%\\python.exe eniric_scripts\\make_test_data.py"
# Generate test data
- cmd: "%PYTHON%\\python.exe make_test_data.py"

build: off

test_script:
# Put your test command here.
# If you don't need to build C extensions on 64-bit Python 3.3 or 3.4,
# you can remove "build.cmd" from the front of the command, as it's
# only needed to support those cases.
# Note that you must use the environment variable %PYTHON% to refer to
# the interpreter you're using - Appveyor does not do anything special
# to put the Python version you want to use on PATH.
- cmd: "%PYTHON%\\python.exe -m pytest --cov=. --cov-report term-missing --durations 10"
- cmd: "pytest --cov=. --cov-report term-missing --durations 5"
- cmd: "coverage xml -i"

after_test:
# This step builds your wheels.
# Again, you only need build.cmd if you're building C extensions for
# 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct
# interpreter
- "%PYTHON%\\python.exe setup.py bdist_wheel"
- cmd: "python setup.py bdist_wheel"

artifacts:
# bdist_wheel puts your built wheel in the dist directory
Expand Down

0 comments on commit 748ac9c

Please sign in to comment.