-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.appveyor.yml
61 lines (50 loc) · 1.67 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: 0.4.5-{build}-{branch}
image: Visual Studio 2017
init:
- choco install wget
environment:
global:
PYTHON: C:\Miniconda36-x64
PYTHON_ARCH: "64"
PACKAGE_NAME: "smcp"
BUILD_DEPENDS: ""
TEST_DEPENDS: ""
matrix:
- PYTHON_VERSION: 3.6
- PYTHON_VERSION: 2.7
COMPILER: mingwpy
platform:
- x64
install:
- if [%PYTHON_ARCH%]==[64] (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
) else (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
)
# Set up miniconda build environment
- SET "PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%ProgramFiles%\7-Zip;%PATH%"
- conda info
- conda create --yes -n build_env python=%PYTHON_VERSION% %BUILD_DEPENDS%
- activate build_env
- if [%COMPILER%]==[mingwpy] ( pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy )
# Check that we have the expected version and architecture for Python
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
build_script:
# Build wheel
- if [%COMPILER%]==[mingwpy] ( python setup.py build --compiler=mingw32 )
else ( python setup.py build --compiler=msvc )
- python setup.py bdist_wheel
- ls dist/*
test_script:
# Create test env
- conda create --yes -n test_env python=%PYTHON_VERSION% %TEST_DEPENDS%
- activate test_env
# Install from wheel
- pip install chompack
- pip install --no-index --find-links dist/ %PACKAGE_NAME%
# Run tests
- python --version
- python example.py
artifacts:
- path: dist/*.whl