-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
65 lines (65 loc) · 4.12 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
version: '{build}.{branch}'
skip_branch_with_pr: true
install:
- 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." }
- ps: If(($env:PYTHON).Contains("pypy2")) { (New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-win32.zip', "$env:appveyor_build_folder\pypy2.zip"); 7z x pypy2.zip | Out-Null; move pypy2-v6.0.0-win32 C:\pypy2; copy C:\pypy2\pypy.exe C:\pypy2\python.exe }
- ps: If(($env:PYTHON).Contains("pypy3")) { (New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-win32.zip', "$env:appveyor_build_folder\pypy3.zip"); 7z x pypy3.zip | Out-Null; move pypy3-v6.0.0-win32 C:\pypy3; copy C:\pypy3\pypy3.exe C:\pypy3\python.exe }
- ps: If(-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
- cmd: "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- cmd: "python --version"
- ps: If(($env:PYTHON).Contains("pypy")) { (New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', "$env:appveyor_build_folder\get-pip.py"); python get-pip.py; $error.Clear(); }
# - ps: If(($env:PYTHON).Contains("pypy3")) { (New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/3.3/get-pip.py', "$env:appveyor_build_folder\get-pip.py"); python get-pip.py; $error.Clear(); }
# - ps: If(($env:PYTHON).Contains("pypy3")) { python -m pip install --disable-pip-version-check --upgrade "pip<8.0.0" } Else { python -m pip install --disable-pip-version-check --upgrade pip } # downgrade pip, https://github.com/pypa/pip/issues/2669
# - ps: If(($env:PYTHON).Contains("pypy3")) { python -m pip install -U --force-reinstall pip }
- ps: If(($env:PYTHON).Contains("pypy")) { python -m pip --version } else { pip --version } # points to CPython, even when running Pypy (because pypy has no \Scripts folder)
- ps: If(($env:PYTHON).Contains("Miniconda")) { python -m pip install "coverage == 4.0.3" python-coveralls; $error.Clear() } Else { python -m pip install --no-warn-script-location "coverage == 4.0.3" python-coveralls } # the latter to suppress warning of scripts not on path
- ps: If(($env:PYTHON).Contains("pypy")) { & ($env:PYTHON + '\bin\coverage') 'help' } Else { coverage help }
clone_script:
- cmd: git clone https://github.com/ArneBachmann/configr .\
environment:
PYTHONDONTWRITEBYTECODE: True # avoid writing __pycache__ dirs for Python 3
matrix:
- PYTHON: "C:\\pypy2"
platform: x86
- PYTHON: "C:\\pypy3"
platform: x86
- PYTHON: "C:\\Python27"
platform: x86
- PYTHON: "C:\\Python27-x64"
platform: x64
- PYTHON: "C:\\Python35"
platform: x86
- PYTHON: "C:\\Python35-x64"
platform: x64
- PYTHON: "C:\\Python36"
platform: x86
- PYTHON: "C:\\Python36-x64"
platform: x64
- PYTHON: "C:\\Miniconda"
platform: x86
- PYTHON: "C:\\Miniconda-x64"
platform: x64
- PYTHON: "C:\\Miniconda35"
platform: x86
- PYTHON: "C:\\Miniconda35-x64"
platform: x64
matrix:
allow_failures:
- PYTHON: "C:\\pypy2"
platform: x86
- PYTHON: "C:\\pypy3"
platform: x86
build_script:
- cmd: python setup.py clean build install && python -c "import os, sys; os.system('pip uninstall -y appdirs'); sys.exit(0)"
# Examples learned from https://social.technet.microsoft.com/wiki/contents/articles/7703.powershell-running-executables.aspx
test_script:
- ps: If( ($env:PYTHON).Contains("pypy")) { & ($env:PYTHON + '\bin\coverage') 'run --source=configr configr/test.py' } Else { coverage run --source=configr configr/test.py }; $error.Clear()
- ps: If(-not(($env:PYTHON).Contains("pypy"))) { coverage html; coverage annotate configr/test.py }; $error.Clear()
artifacts:
- path: htmlcov.zip
name: Coverage Report
type: Zip
deploy: off