-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
45 lines (41 loc) · 1.78 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
environment:
matrix:
- PYARCH: ""
RUST_TARGET: "i686-pc-windows-msvc"
- PYARCH: "-x64"
RUST_TARGET: "x86_64-pc-windows-msvc"
install:
- SET PYTHON=C:\Python27%PYARCH%
- "%PYTHON%\\python -m pip install -U pip setuptools wheel"
# Install development version of milksnake that fixes Windows dylib discovery
- "%PYTHON%\\python -m pip install -U git+https://github.com/getsentry/milksnake"
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:RUST_TARGET}.exe"
- rust-nightly-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
- SET PATH=%PATH%;C:\MinGW\bin
build_script:
- "%PYTHON%\\python -m pip -v wheel . -w .\\wheelhouse"
# Rename the wheel so it is valid for all Python versions
# This is possible since our shared library does not link against any
# Python ABI
# TODO: This leaves the old Python ABI/ABI tags in the 'WHEEL' file inside
# of the wheel. However, `pip` does not seem to validate against that
# currently, so we're safe until they change it...
- ps: |
get-childItem wheelhouse\*-cp*-win*.whl | rename-item -newname {
$_.name -replace '-cp.*?-cp.*?-','-py2.py3-none-'
}
- dir wheelhouse
test_script:
- SET PROJPATH=C:\Projects\python-rust-fst
- cd c:\projects
- ps: |
$PyVersions = @("27", "33", "34", "35")
foreach ($pyver in $PyVersions) {
$python = "C:\\Python$pyver${env:PYARCH}\\python"
&$python -m pip install -U pip setuptools wheel cffi pytest decorator psutil
&$python -m pip -v install rust_fst --no-index -f "${env:PROJPATH}\wheelhouse"
&$python -m pytest "${env:PROJPATH}\tests"
}
artifacts:
- path: wheelhouse\rust_fst*.whl