Multiple build matrix on Appveyor (#63)

This commit is contained in:
messense 2017-07-29 13:45:03 +08:00 committed by GitHub
parent 0e2afb7b8b
commit d78692017e
1 changed files with 16 additions and 8 deletions

View File

@ -1,20 +1,28 @@
version: 0.2.{build}
environment:
TARGET: x86_64-pc-windows-msvc
matrix:
- PYTHON: "C:/Python27-x64"
FEATURES: python2
- PYTHON: "C:/Python35-x64"
FEATURES: python3
- PYTHON: "C:/Python36-x64"
FEATURES: python3
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python --version"
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.msi"
- start /wait msiexec /i rust-nightly-%TARGET%.msi INSTALLDIR="%CD%\rust-nightly-%TARGET%" /quiet /qn /norestart
- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
- set PATH=%PATH%;%CD%/rust-nightly-%TARGET%/bin
- SET PATH=%PYTHONPATH%;%PATH%
- rustc -V
- cargo -V
- python --version
build_script:
- set PATH=C:\Python27-x64;%PATH%&& cargo build --verbose --features python2
- set PATH=C:\Python35-x64;%PATH%&& cargo build --verbose --features python3
- set PATH=C:\Python36-x64;%PATH%&& cargo build --verbose --features python3
- cargo build --verbose --features %FEATURES%
test_script:
- set PATH=C:\Python27-x64;%PATH%&& cargo test --verbose --features python2
- set PATH=C:\Python35-x64;%PATH%&& cargo test --verbose --features python3
- set PATH=C:\Python36-x64;%PATH%&& cargo test --verbose --features python3
- cargo test --verbose --features %FEATURES%
- pip install setuptools-rust pytest pytest-benchmark
- cd examples/word-count && python setup.py install && pytest -v tests