This repository has been archived by the owner on Feb 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
141 lines (123 loc) · 5.3 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
build: false
# Notes
# Visual Studio versions and architectures: https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx#Anchor_1
environment:
# Global variables
CMAKE: "C:\\Program Files (x86)\\cmake\\bin\\cmake.exe"
matrix:
# Qt 5.6, Python 3.5 32-bit, MSVC2015 (v14)
- PYTHON: "C:\\Python35"
QT: "C:\\Qt\\5.6\\msvc2015"
PYSIDE_BRANCH: "5.6"
OPENSSL: "C:\\OpenSSL-Win32\\bin"
VS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
ARCH: x86
os: Visual Studio 2015
platform: x86
fast_finish: true
# Qt 5.6, Python 3.5 64-bit, MSVC2015 (v14)
- PYTHON: "C:\\Python35-x64"
QT: "C:\\Qt\\5.6\\msvc2015_64"
PYSIDE_BRANCH: "5.6"
OPENSSL: "C:\\OpenSSL-Win64\\bin"
VS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
ARCH: amd64
os: Visual Studio 2015
platform: x64
fast_finish: true
# Qt 5.6, Python 3.6 32-bit, MSVC2015 (v14)
- PYTHON: "C:\\Python36"
QT: "C:\\Qt\\5.6\\msvc2015"
PYSIDE_BRANCH: "5.6"
OPENSSL: "C:\\OpenSSL-Win32\\bin"
VS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
ARCH: x86
os: Visual Studio 2015
platform: x86
fast_finish: true
# Qt 5.6, Python 3.6 64-bit, MSVC2015 (v14)
- PYTHON: "C:\\Python36-x64"
QT: "C:\\Qt\\5.6\\msvc2015_64"
PYSIDE_BRANCH: "5.6"
OPENSSL: "C:\\OpenSSL-Win64\\bin"
VS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
ARCH: amd64
os: Visual Studio 2015
platform: x64
fast_finish: true
init:
- "ECHO %PYTHON%"
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- python -c "import sys; x = sys.version; print(x)"
- git clone --recursive --branch %PYSIDE_BRANCH% https://codereview.qt-project.org/pyside/pyside-setup C:\pyside-setup
- if defined VS call "%VS%" %ARCH%
- choco install --yes gnuwin32-sed.install
# Fix bug https://bugreports.qt.io/browse/PYSIDE-552
- sed -i -e "s/if(Qt5Designer_FOUND)/find_package(Qt5Designer)\nif(Qt5Designer_FOUND)/g" C:/pyside-setup/sources/pyside2/CMakeLists.txt
# Fix bug https://bugreports.qt.io/browse/PYSIDE-357
- sed -i -e "s~\b\(packages\b.*\)],~\1, 'pyside2uic.Compiler', 'pyside2uic.port_v' + str(sys.version_info[0])],~" C:/pyside-setup/setup.py
# Verify sed hacks
- type C:\pyside-setup\sources\pyside2\CMakeLists.txt
- type C:\pyside-setup\setup.py
install:
- if [%PYSIDE_BRANCH%]==[5.6] (echo "No need to install libclang")
- if [%PYSIDE_BRANCH%]==[5.9] (echo "To do; Install libclang")
before_build:
- pip install wheel
build_script:
- python C:\pyside-setup\setup.py bdist_wheel --ignore-git --qmake="%QT%\bin\qmake.exe" --openssl="%OPENSSL" --cmake="%CMAKE%"
test_script:
- dir C:\pyside-setup\dist\*.whl
after_build:
# Date
- ps: $DEPLOY_DATE = (Get-Date).ToString("yyyy-MM-dd")
- ps: (Get-Content bintray.json).replace('@DATE@', $DEPLOY_DATE) | Set-Content bintray.json
- ps: echo $DEPLOY_DATE
# Version
- ps: $env:PYSIDE_VERSION = (((Get-Content C:\pyside-setup\setup.py | %{ if ($_.Split('=')[0] -match "^__version__") { $_; } }) -replace "__version__ = ", "") -replace '"', "")
- ps: (Get-Content bintray.json).replace('@VERSION@', $env:PYSIDE_VERSION) | Set-Content bintray.json
- ps: echo $env:PYSIDE_VERSION
# Package name
- ps: if ($Env:APPVEYOR_REPO_BRANCH -eq "master") {$env:PYSIDE_PACKAGE_NAME = "pyside2"}
- ps: if ($Env:APPVEYOR_REPO_BRANCH -ne "master") {$env:PYSIDE_PACKAGE_NAME = "development"}
- ps: (Get-Content bintray.json).replace('@PACKAGE_NAME@', $env:PYSIDE_PACKAGE_NAME) | Set-Content bintray.json
- ps: echo $env:PYSIDE_PACKAGE_NAME
# Package description
- ps: if ($Env:APPVEYOR_REPO_BRANCH -eq "master") {$PACKAGE_DESC = "PySide2 wheels"}
- ps: if ($Env:APPVEYOR_REPO_BRANCH -ne "master") {$PACKAGE_DESC = "PySide2 wheels from development branches and pull requests"}
- ps: (Get-Content bintray.json).replace('@PACKAGE_DESC@', $PACKAGE_DESC) | Set-Content bintray.json
- ps: echo $PACKAGE_DESC
# Upload folder
- ps: $WINDOWS_VERSION = (Get-CimInstance Win32_OperatingSystem).Version
- ps: $APPVEYOR_BRANCH_REPLACED = ($Env:APPVEYOR_REPO_BRANCH).Replace(" ","_").Replace("/","_")
- ps: if ($Env:APPVEYOR_REPO_BRANCH -eq "master") {$UPLOAD_PATH = "windows" + $WINDOWS_VERSION + "/"}
- ps: if ($Env:APPVEYOR_REPO_BRANCH -ne "master") {$UPLOAD_PATH = $APPVEYOR_BRANCH_REPLACED + "/" + "windows" + $WINDOWS_VERSION + "/"}
- ps: (Get-Content bintray.json).replace('@UPLOAD_PATH@', $UPLOAD_PATH) | Set-Content bintray.json
- ps: echo $UPLOAD_PATH
# Prepare deployment
- ps: mkdir deploy
- ps: mkdir $UPLOAD_PATH
- ps: cp C:\pyside-setup\dist\*.whl $UPLOAD_PATH
- ps: pwd
- ps: 7z a archive.zip $UPLOAD_PATH
- ps: cp archive.zip deploy
- ps: 7z l deploy\archive.zip
- ps: dir deploy
artifacts:
- path: deploy\*.zip
name: mypackage
deploy:
- provider: BinTray
username: fredrikaverpil
subject: fredrikaverpil
api_key:
# api key from https://bintray.com/profile/edit
# encrypted in https://ci.appveyor.com/tools/encrypt
secure: Sz8G/LSGSF2lKWGErmmU+DXQrzwWhpYyKJqDRTXl/UikPUt0oiN6lAii6qJIMSLi
repo: pyside2-wheels
package: $(PYSIDE_PACKAGE_NAME)
version: $(PYSIDE_VERSION)
artifact: mypackage
publish: true
override: true
explode: true