-
Notifications
You must be signed in to change notification settings - Fork 882
/
appveyor.yml
80 lines (65 loc) · 2.59 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
environment:
TWINE_USERNAME:
secure: qqioSb3Yu/QTOdDKx10sDQ==
TWINE_PASSWORD:
secure: y8XwCStmwBEwWyXQ108iC7I+WFje6C7rbc0ypp56Q2g=
TWINE_REPOSITORY_URL:
'https://upload.pypi.org/legacy/'
matrix:
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "32"
max_jobs: 4
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)*(-\S*)?$/
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." }
# Install Python (from the official .msi of http://python.org) and pip when not already installed.
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
- pip install --disable-pip-version-check --user --upgrade pip
- pip install -r requirements.txt
- pip install pytest
build_script:
# Build the compiled extension
- python setup.py build_ext --inplace
test_script:
- python -m pytest -s
after_test:
- IF "%APPVEYOR_REPO_TAG%" == "true" (pip install wheel twine cx_freeze!=5.1 six appdirs packaging)
- IF "%APPVEYOR_REPO_TAG%" == "true" (python -c "import tempfile, os; open(os.path.join(tempfile.gettempdir(), 'urh_releasing'), 'w').close()")
- IF "%APPVEYOR_REPO_TAG%" == "true" (python setup.py bdist_wheel)
- IF "%APPVEYOR_REPO_TAG%" == "true" (IF "%PYTHON_VERSION%" == "3.5.x" (python build_cx.py))
- IF "%APPVEYOR_REPO_TAG%" == "true" (dir dist)
artifacts:
# Archive the generated packages in the ci.appveyor.com build report.
- path: dist\*
on_success:
- IF "%APPVEYOR_REPO_TAG%" == "true" (twine upload --skip-existing dist/*.whl)
deploy:
release: $(APPVEYOR_REPO_TAG_NAME)
description: "This is a new URH release."
provider: GitHub
auth_token:
secure: 7TPX876BQbnkqNGJYoKi9hnbnsH6vQFkF0fzSe7keguq4g6FAf3W5uPc/s2Ya0vH
artifact: /.*\.msi/ # upload msi installers
draft: false
prerelease: false
on:
appveyor_repo_tag: true # deploy on tag push only