forked from ParallelSSH/ssh2-python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.appveyor.yml
83 lines (74 loc) · 3.26 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
max_jobs: 5
build:
parallel: true
verbosity: minimal
skip_branch_with_pr: true
environment:
global:
PYTHONUNBUFFERED: 1
EMBEDDED_LIB: 1
SYSTEM_LIBSSH2: 1
PYPI_USER:
secure: WKF8ok0UPIgkA+isDUuHww==
PYPI_PASS:
secure: uXkrTaPGSNQdXTJIt3aiyyGnH/ZtvWbDVIXdMrsgwROIJ0kprWp5crS6TAqqddyrFxd7Trrfjg/TjM1/Yx9JzfuKTfoJh1zyviWD/j2zibsycmJQy4Q+CrZ6uI3IRQwe/2ILKxGzLGFBWaqt6C8NaQnkKP+h7ptnPeVhy1+kaOaJowwrCKWje1Ag3CJCAJxPjSC8yl1nlM3DA1rAIk2C5SR4eQQLJeEpPSg3nDnxR4o4YjmA7ILD3OuM1Fbh5iue/rUvWzdt6QCxCbE4egtrCQ==
# Default python version to run single commands with
PYTHON_DEF: "C:\\Python36-x64"
PYTHON_VERSION: "3.6"
# Python versions to build wheels for
PYTHONVERS: C:\Python36-x64 C:\Python37-x64 C:\Python38-x64
PYTHON_ARCH: "64"
MSVC: "Visual Studio 14 Win64"
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%"
- set VCLIBDIR=%WINDIR%\System32
- cp %VCLIBDIR%/vcruntime*.dll ssh2/
- cp %VCLIBDIR%/msvcp*.dll ssh2/
- cp %VCLIBDIR%/msvcr*.dll ssh2/
- cp %OPENSSL_DIR%/bin/*.dll ssh2/
- for %%I in (%PYTHONVERS%) do %%I\python.exe -V
- for %%I in (%PYTHONVERS%) do %%I\Scripts\pip install -U wheel setuptools twine cython
# .c files need to be generated on Windows to handle platform
# specific code.
# Fix version used by versioneer to current git tag so the generated .c files
# do not cause a version change.
- "%PYTHON_DEF%\\python.exe ci/appveyor/fix_version.py ."
- mv -f .git .git.bak
- 7z x ci\appveyor\zlib1211.zip
build_script:
- ci\\appveyor\\build_zlib.bat
- for %%I in (%PYTHONVERS%) do cp C:/zlib/lib/zlibstatic.lib %%I/libs/
- for %%I in (%PYTHONVERS%) do ls %%I/libs/
- ci\\appveyor\\build_ssh2.bat
- for %%I in (%PYTHONVERS%) do cp src/src/libssh2.lib %%I/libs/ || cp src/src/Release/libssh2.lib %%I/libs/
- mv -f ssh2/find_eol.c .
- rm -f ssh2/*.c
- mv -f find_eol.c ssh2/
- ps: ls ssh2
- for %%I in (%PYTHONVERS%) do %%I\python.exe -V
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build_ext
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py install
- ps: ls ssh2
test_script:
- cd dist
- for %%I in (%PYTHONVERS%) do %%I\python.exe -c "from ssh2.session import Session; Session()"
- cd ..
after_test:
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py bdist_wheel
- mv dist/* .
artifacts:
- path: "*.whl"
deploy_script:
# Calling twine requires we set path
- "SET PATH=%PYTHON_DEF%;%PYTHON_DEF%\\Scripts;%PATH%"
- python ci/appveyor/pypi_upload.py *.whl