-
Notifications
You must be signed in to change notification settings - Fork 24
/
appveyor.yml
87 lines (79 loc) · 2.5 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
environment:
TWINE_USERNAME: cheind
TWINE_PASSWORD:
secure: hnxMBvmJAGM1rQVOUbkGvQ==
# http://www.appveyor.com/docs/installed-software#python
matrix:
- PYTHON: "C:\\Miniconda36-x64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Miniconda36"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Miniconda35-x64"
PYTHON_VERSION: "3.5"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Miniconda35"
PYTHON_VERSION: "3.5"
PYTHON_ARCH: "32"
install:
- set "CONDA_ROOT=%PYTHON%"
- set "PATH=%CONDA_ROOT%;%CONDA_ROOT%\Scripts;%CONDA_ROOT%\Library\bin;%PATH%"
- conda config --set always_yes yes
- conda update -q conda
- conda config --set auto_update_conda no
- conda install -q pip pytest numpy cmake
- python -m pip install --upgrade pip
- pip install wheel
- pip install --upgrade --ignore-installed setuptools
- git submodule update --init --recursive
- ps: >-
if ($env:APPVEYOR_REPO_BRANCH -eq 'develop') {
$env:LAPSOLVER_RELEASE_TYPE="dev";
$env:LAPSOLVER_DEV_NUM=$env:APPVEYOR_BUILD_NUMBER
} else {
$env:LAPSOLVER_RELEASE_TYPE="stable"
}
build_script:
- python setup.py sdist
- python setup.py bdist_wheel
test_script:
# Try building source wheel and install.
# Redirect stderr of pip within powershell to avoid error.
- ps: >-
$wheel = cmd /r dir .\dist\*.tar.gz /b/s;
cmd /c "pip install --verbose $wheel 2>&1"
- pytest --pyargs lapsolver
- pip uninstall -y lapsolver
# Try building binary wheel and install.
# Redirect stderr of pip within powershell to avoid error.
- ps: >-
$wheel = cmd /r dir .\dist\*.whl /b/s;
cmd /c "pip install --verbose $wheel 2>&1"
- pytest --pyargs lapsolver
- pip uninstall -y lapsolver
on_success:
ps: >-
if ($env:APPVEYOR_REPO_TAG -eq $true -Or $env:APPVEYOR_REPO_BRANCH -eq "master") {
Write-Output ("Deploying to PyPI")
pip install --upgrade twine
# If powershell ever sees anything on stderr it thinks it's a fail.
# So we use cmd to redirect stderr to stdout before PS can see it.
cmd /c 'twine upload --skip-existing dist\* 2>&1'
} else {
Write-Output "Not deploying as this is not a tagged commit or commit on master"
}
artifacts:
- path: "dist\\*.whl"
- path: "dist\\*.tar.gz"
name: Wheels
notifications:
- provider: Email
to:
- christoph.heindl@email.com
on_build_success: true
on_build_failure: true
branches:
only:
- master
- develop