Innovenergy_trunk/NodeRed/NodeRedFiles/pika-0.13.1/appveyor.yml

108 lines
3.5 KiB
YAML
Raw Normal View History

2024-06-05 10:33:44 +00:00
# Windows build and test of Pika
environment:
erlang_download_url: "http://erlang.org/download/otp_win64_19.3.exe"
erlang_exe_path: "C:\\Users\\appveyor\\erlang_19.3.exe"
erlang_home_dir: "C:\\Users\\appveyor\\erlang"
erlang_erts_version: "erts-8.3"
rabbitmq_version: 3.7.4
rabbitmq_installer_download_url: "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.4/rabbitmq-server-3.7.4.exe"
rabbitmq_installer_path: "C:\\Users\\appveyor\\rabbitmq-server-3.7.4.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 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 Waiting for epmd to report that RabbitMQ has started...
- ps: 'C:\projects\pika\testdata\wait-epmd.ps1'
- 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