2018-05-15 02:40:40 +00:00
|
|
|
environment:
|
|
|
|
PYTHON_VERSION: "2.7.x"
|
|
|
|
PYTHON_ARCH: "32"
|
|
|
|
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
|
|
|
|
|
|
|
matrix:
|
2018-10-10 13:49:39 +00:00
|
|
|
- TOXENV: py27
|
2018-05-15 02:40:40 +00:00
|
|
|
- TOXENV: pygtkui
|
|
|
|
- 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.
|
2018-10-03 10:22:22 +00:00
|
|
|
- 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." }
|
2018-05-15 02:40:40 +00:00
|
|
|
|
|
|
|
- "python -m pip install --upgrade pip"
|
2018-06-05 08:59:21 +00:00
|
|
|
- if defined TOXENV (
|
2018-10-03 15:12:29 +00:00
|
|
|
pip install tox tox_venv
|
2018-05-15 02:40:40 +00:00
|
|
|
)
|
2018-06-05 08:59:21 +00:00
|
|
|
- if not defined TOXENV (
|
2018-10-03 10:22:22 +00:00
|
|
|
pip install
|
2018-10-03 15:12:29 +00:00
|
|
|
-rrequirements.txt
|
2018-10-03 10:22:22 +00:00
|
|
|
pygame
|
|
|
|
bbfreeze
|
|
|
|
pefile
|
2018-05-15 02:40:40 +00:00
|
|
|
)
|
|
|
|
|
2018-06-05 08:59:21 +00:00
|
|
|
- echo "Installing pygtk...."
|
2018-05-15 02:40:40 +00:00
|
|
|
- if not exist pygtk-all-in-one-2.24.2.win32-py2.7.msi (
|
2018-10-03 10:22:22 +00:00
|
|
|
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"
|
2018-05-15 02:40:40 +00:00
|
|
|
)
|
|
|
|
- cmd: msiexec /i pygtk-all-in-one-2.24.2.win32-py2.7.msi /quiet /qn /norestart TARGETDIR=C:\Python27 INSTALLLEVEL=3
|
2018-06-05 08:59:21 +00:00
|
|
|
|
|
|
|
- echo "Installing openssl...."
|
2018-05-15 02:40:40 +00:00
|
|
|
- if not exist openssl-1.1.0f-vs2008.7z (
|
2018-10-03 10:22:22 +00:00
|
|
|
echo "Downloading openssl...."
|
|
|
|
& appveyor-retry appveyor DownloadFile "https://www.npcglib.org/~stathis/downloads/openssl-1.1.0f-vs2008.7z"
|
2018-05-15 02:40:40 +00:00
|
|
|
)
|
|
|
|
- "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"
|
|
|
|
|
2018-06-05 08:59:21 +00:00
|
|
|
- echo "Installing libtorrent...."
|
2018-05-15 02:40:40 +00:00
|
|
|
- if not exist libtorrent.pyd (
|
2018-10-03 10:22:22 +00:00
|
|
|
echo "Downloading libtorrent...."
|
|
|
|
& appveyor-retry appveyor DownloadFile "https://github.com/doadin/libtorrent/releases/download/1.1.7.test/libtorrent.pyd"
|
2018-05-15 02:40:40 +00:00
|
|
|
)
|
|
|
|
- "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"
|
2018-10-03 10:22:22 +00:00
|
|
|
- 'python -c "import struct; print(struct.calcsize(\"P\") * 8)"'
|
|
|
|
- 'python -c "import libtorrent; print(libtorrent.__version__)"'
|
2018-05-15 02:40:40 +00:00
|
|
|
- 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:
|
2018-06-05 08:59:21 +00:00
|
|
|
- if not defined TOXENV python setup.py build && python setup.py install
|
2018-05-15 02:40:40 +00:00
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%\\packaging\\win32
|
|
|
|
- if not defined TOXENV deluge-bbfreeze.py debug
|
2018-06-05 08:59:21 +00:00
|
|
|
- if not defined TOXENV makensis deluge-win32-installer.nsi
|
|
|
|
- if not defined TOXENV 7z a deluge-win32.zip build-win32 "-x!*.exe"
|
2018-05-15 02:40:40 +00:00
|
|
|
|
|
|
|
artifacts:
|
2018-06-05 08:59:21 +00:00
|
|
|
- path: packaging\win32\deluge-win32.zip
|
2018-05-15 02:40:40 +00:00
|
|
|
- path: packaging\win32\build-win32\*.exe
|
|
|
|
|
|
|
|
#on_success:
|
|
|
|
#
|