diff options
author | Michal Nowikowski <godfryd@gmail.com> | 2014-09-22 05:55:23 +0200 |
---|---|---|
committer | Michal Nowikowski <godfryd@gmail.com> | 2014-09-22 05:55:23 +0200 |
commit | 3d7f92cbfbdb9fb4c1dd5f479cd4ba04bdeb4f25 (patch) | |
tree | 87a72ddb291282370b5cbabc2a4c1e73b8f1e9dc | |
parent | f01bff14710891ad28f351c608aa6a316eeb2372 (diff) | |
download | pylint-win-ci-5.tar.gz |
Added support for AppVeroy for CI on Windowswin-ci-5
-rw-r--r-- | appveyor.yml | 44 | ||||
-rw-r--r-- | appveyor/install.ps1 | 27 |
2 files changed, 71 insertions, 0 deletions
diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..7613e62 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,44 @@ +environment: + matrix: + - PYTHON: "C:\\Python27" + TOXENV: "py27" + + - PYTHON: "C:\\Python33" + TOXENV: "py33" + + - PYTHON: "C:\\Python34" + TOXENV: "py34" + +install: + - ECHO "Filesystem root:" + - ps: "ls \"C:/\"" + + # Install pip when not already installed. + - "powershell ./appveyor/install.ps1" + + # Prepend newly installed Python to the PATH of this build (this cannot be + # done from inside the powershell script as it would require to restart + # the parent CMD process). + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + + # Check that we have the expected version and architecture for Python + - "python --version" + - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + + # Install the build dependencies of the project. + - "pip install tox==1.7.2" + - "pip install wheel" + +build: false + +test_script: + - "tox" + +after_test: + # If tests are successful, create a whl package for the project. + - "python setup.py bdist_wheel bdist_wininst" + - ps: "ls dist" + +artifacts: + # Archive the generated wheel package in the ci.appveyor.com build report. + - path: dist\* diff --git a/appveyor/install.ps1 b/appveyor/install.ps1 new file mode 100644 index 0000000..e13c388 --- /dev/null +++ b/appveyor/install.ps1 @@ -0,0 +1,27 @@ +# Sample script to install pip under Windows +# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner +# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ + +$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py" +$GET_PIP_PATH = "C:\get-pip.py" + + +function InstallPip ($python_home) { + $pip_path = $python_home + "\Scripts\pip.exe" + $python_path = $python_home + "\python.exe" + if (-not(Test-Path $pip_path)) { + Write-Host "Installing pip..." + $webclient = New-Object System.Net.WebClient + $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH) + Write-Host "Executing:" $python_path $GET_PIP_PATH + Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru + } else { + Write-Host "pip already installed." + } +} + +function main () { + InstallPip $env:PYTHON +} + +main |