forked from jopohl/urh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
93 lines (77 loc) · 3.34 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
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:\\Python37-x64"
PYTHON_VERSION: "3.7.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"
- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "32"
max_jobs: 4
clone_depth: 5
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)"
- IF "%PYTHON_ARCH%" == "64" (appveyor DownloadFile "https://dl.dropboxusercontent.com/s/3pdvo56amjjm7b7/win-64.zip" -FileName "C:\windlls.zip") ELSE (appveyor DownloadFile "https://dl.dropboxusercontent.com/s/ky6prqc0zh4wspm/win-32.zip" -FileName "C:\windlls.zip")
- 7z x -y "C:\windlls.zip" -o%APPVEYOR_BUILD_FOLDER%\src\urh\dev\native\lib\shared
- pip install -r data\requirements.txt
- pip install pytest pytest-faulthandler
build_script:
# Build the compiled extension
- python setup.py build_ext --inplace
test_script:
- python src\urh\main.py --version
- IF "%APPVEYOR_REPO_TAG%" == "false" (python -m pytest -v -s)
after_test:
- IF "%APPVEYOR_REPO_TAG%" == "true" (pip install wheel twine six appdirs packaging)
# PyAudio not yet ready for Python 3.7 on Windows
- IF "%APPVEYOR_REPO_TAG%" == "true" (IF NOT "%PYTHON_VERSION%" == "3.7.x" (pip install pyaudio))
- 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.6.x" (pip install cx_freeze & python data\build_cx.py))
- IF "%APPVEYOR_REPO_TAG%" == "true" (dir dist)
artifacts:
# Archive the generated packages in the ci.appveyor.com build report.
- path: dist\*
- path: build_log.txt
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