109 lines
3.5 KiB
YAML
109 lines
3.5 KiB
YAML
environment:
|
|
PYTHON_VERSION: "2.7.x"
|
|
PYTHON_ARCH: "32"
|
|
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
|
|
|
matrix:
|
|
# See: http://www.appveyor.com/docs/installed-software#python
|
|
- TOXENV: flake8
|
|
- TOXENV: trial
|
|
- TOXENV: pydef
|
|
- TOXENV: pygtkui
|
|
- TOXENV: plugins
|
|
- TOXENV: docs
|
|
- PYTHON_VERSION: "2.7.x"
|
|
|
|
pull_requests:
|
|
do_not_increment_build_number: true
|
|
|
|
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." }
|
|
|
|
- "python -m pip install --upgrade pip"
|
|
- if defined TOXENV (
|
|
pip install
|
|
tox
|
|
pywin32
|
|
certifi
|
|
)
|
|
- if not defined TOXENV (
|
|
pip install
|
|
slimit
|
|
twisted[tls]
|
|
chardet
|
|
mako
|
|
pyxdg
|
|
pillow
|
|
slimit
|
|
setproctitle
|
|
pywin32
|
|
certifi
|
|
pygame
|
|
bbfreeze
|
|
pefile
|
|
)
|
|
|
|
- echo "Installing pygtk...."
|
|
- if not exist pygtk-all-in-one-2.24.2.win32-py2.7.msi (
|
|
echo "Downloading pygtk...."
|
|
& appveyor-retry appveyor DownloadFile "https://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.7.msi"
|
|
)
|
|
- cmd: msiexec /i pygtk-all-in-one-2.24.2.win32-py2.7.msi /quiet /qn /norestart TARGETDIR=C:\Python27 INSTALLLEVEL=3
|
|
|
|
- echo "Installing openssl...."
|
|
- if not exist openssl-1.1.0f-vs2008.7z (
|
|
echo "Downloading openssl...."
|
|
& appveyor-retry appveyor DownloadFile "https://www.npcglib.org/~stathis/downloads/openssl-1.1.0f-vs2008.7z"
|
|
)
|
|
- "7z x -oc:\\ -aoa openssl-1.1.0f-vs2008.7z"
|
|
- "rename c:\\openssl-1.1.0f-vs2008 openssl-1.1"
|
|
- "copy c:\\openssl-1.1\\bin\\libsslMD.dll c:\\openssl-1.1\\bin\\libssl-1_1.dll"
|
|
- "copy c:\\openssl-1.1\\bin\\libcryptoMD.dll c:\\openssl-1.1\\bin\\libcrypto-1_1.dll"
|
|
|
|
- echo "Installing libtorrent...."
|
|
- if not exist libtorrent.pyd (
|
|
echo "Downloading libtorrent...."
|
|
& appveyor-retry appveyor DownloadFile "https://github.com/doadin/libtorrent/releases/download/1.1.7.test/libtorrent.pyd"
|
|
)
|
|
- "copy /Y libtorrent.pyd c:\\Python27\\Lib\\site-packages\\libtorrent.pyd"
|
|
- "SET PATH=%TOXENV%;%PYTHON%;%PYTHON%\\Scripts;c:\\openssl-1.1\\bin;C:\\Program Files (x86)\\NSIS;%PATH%"
|
|
|
|
- "python --version"
|
|
- 'python -c "import struct; print(struct.calcsize(\"P\") * 8)"'
|
|
- 'python -c "import libtorrent; print(libtorrent.__version__)"'
|
|
- openssl version -v
|
|
|
|
cache:
|
|
- pygtk-all-in-one-2.24.2.win32-py2.7.msi
|
|
- openssl-1.1.0f-vs2008.7z
|
|
- '%LOCALAPPDATA%\pip\cache'
|
|
- libtorrent.pyd
|
|
|
|
build: false
|
|
|
|
test_script:
|
|
- if defined TOXENV tox
|
|
|
|
after_test:
|
|
- if not defined TOXENV python setup.py build && python setup.py install
|
|
- cd %APPVEYOR_BUILD_FOLDER%\\packaging\\win32
|
|
- if not defined TOXENV deluge-bbfreeze.py debug
|
|
- if not defined TOXENV makensis deluge-win32-installer.nsi
|
|
- if not defined TOXENV 7z a deluge-win32.zip build-win32 "-x!*.exe"
|
|
|
|
artifacts:
|
|
- path: packaging\win32\deluge-win32.zip
|
|
- path: packaging\win32\build-win32\*.exe
|
|
|
|
#on_success:
|
|
#
|