-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
115 lines (81 loc) · 3.85 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Windows build and test of Pika
environment:
erlang_download_url: "http://erlang.org/download/otp_win64_22.1.exe"
erlang_exe_path: "C:\\Users\\appveyor\\erlang_22.1.exe"
erlang_home_dir: "C:\\Users\\appveyor\\erlang"
erlang_erts_version: "erts-10.5"
rabbitmq_version: 3.8.0
rabbitmq_installer_download_url: "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.0/rabbitmq-server-3.8.0.exe"
rabbitmq_installer_path: "C:\\Users\\appveyor\\rabbitmq-server-3.8.0.exe"
matrix:
- PYTHON_ARCH: "32"
PYTHONHOME: "C:\\Python27"
PIKA_TEST_TLS: false
- PYTHON_ARCH: "32"
PYTHONHOME: "C:\\Python27"
PIKA_TEST_TLS: true
cache:
# RabbitMQ is a pretty big package, so caching it in hopes of expediting the
# runtime
- "%erlang_exe_path%"
- "%rabbitmq_installer_path%"
install:
- set PYTHONPATH=%PYTHONHOME%
- set PATH=%PYTHONHOME%\Scripts;%PYTHONHOME%;%PATH%
# For diagnostics
- echo %PYTHONPATH%
- echo %PATH%
- python --version
- echo Upgrading pip...
- python -m pip install --upgrade pip setuptools
- pip --version
- echo Installing wheel...
- pip install wheel
build_script:
- echo Building distributions...
- python setup.py sdist bdist bdist_wheel
- DIR /s *.whl
artifacts:
- path: 'dist\*.whl'
name: pika wheel
before_test:
# Install test requirements
- echo Installing pika...
- python setup.py install
- echo Installing pika test requirements...
- pip install -r test-requirements.txt
# List conents of C:\ to help debug caching of rabbitmq artifacts
# - DIR C:\
- ps: $webclient=New-Object System.Net.WebClient
- echo Downloading Erlang...
- ps: if (-Not (Test-Path "$env:erlang_exe_path")) { $webclient.DownloadFile("$env:erlang_download_url", "$env:erlang_exe_path") } else { Write-Host "Found" $env:erlang_exe_path "in cache." }
- echo Removing all existing versions of Erlang...
- ps: Get-ChildItem -Path 'C:\Program Files\erl*\Uninstall.exe' | %{ Start-Process -Wait -NoNewWindow -FilePath $_ -ArgumentList '/S' }
- echo Installing Erlang...
- start /B /WAIT %erlang_exe_path% /S /D=%erlang_home_dir%
- set ERLANG_HOME=%erlang_home_dir%
- echo Downloading RabbitMQ...
- ps: if (-Not (Test-Path "$env:rabbitmq_installer_path")) { $webclient.DownloadFile("$env:rabbitmq_installer_download_url", "$env:rabbitmq_installer_path") } else { Write-Host "Found" $env:rabbitmq_installer_path "in cache." }
- echo Creating directory %AppData%\RabbitMQ...
- ps: New-Item -ItemType Directory -ErrorAction Continue -Path "$env:AppData/RabbitMQ"
- echo Creating RabbitMQ configuration file in %AppData%\RabbitMQ...
- ps: Get-Content C:/Projects/pika/testdata/rabbitmq.conf.in | %{ $_ -replace 'PIKA_DIR', 'C:/projects/pika' } | Set-Content -Path "$env:AppData/RabbitMQ/rabbitmq.conf"
- ps: Get-Content "$env:AppData/RabbitMQ/rabbitmq.conf"
- echo Creating Erlang cookie files...
- ps: '[System.IO.File]::WriteAllText("C:\Users\appveyor\.erlang.cookie", "PIKAISTHEBEST", [System.Text.Encoding]::ASCII)'
- ps: '[System.IO.File]::WriteAllText("C:\Windows\System32\config\systemprofile\.erlang.cookie", "PIKAISTHEBEST", [System.Text.Encoding]::ASCII)'
- echo Installing and starting RabbitMQ with default config...
- start /B /WAIT %rabbitmq_installer_path% /S
- ps: (Get-Service -Name RabbitMQ).Status
- echo RabbitMQ Service Registry Entry
- reg query HKLM\SOFTWARE\Ericsson\Erlang\ErlSrv\1.1\RabbitMQ
- echo Waiting for epmd to report that RabbitMQ has started...
- ps: C:\projects\pika\testdata\wait-epmd.ps1
- echo Waiting for RabbitMQ to start...
- ps: C:\projects\pika\testdata\wait-rabbitmq.ps1
- echo Getting RabbitMQ status...
- cmd /c "C:\Program Files\RabbitMQ Server\rabbitmq_server-%rabbitmq_version%\sbin\rabbitmqctl.bat" status
test_script:
- nosetests
# Since Pika is source-only there's no need to deploy from Windows
deploy: false