/
appveyor.yml
49 lines (39 loc) · 1.84 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
environment:
VENV: "%APPVEYOR_BUILD_FOLDER%\\venv"
matrix:
- TOXENV: py36
PYTHON: "C:\\Python36"
- TOXENV: py36
PYTHON: "C:\\Python36-x64"
- TOXENV: py37
PYTHON: "C:\\Python37"
- TOXENV: py37
PYTHON: "C:\\Python37-x64"
BUILD_WHEEL: 1
BUILD_EXE: 1
# https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
init:
- ps: if (Get-ChildItem Env:ENABLE_RDP -ErrorAction SilentlyContinue) {iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))} else {echo RDP not enabled}
- echo "TOXENV- %TOXENV%"
install:
- git submodule update --init
- virtualenv -p "%PYTHON%\\python.exe" "%VENV%"
- copy "%PYTHON%\\python3.dll" "%VENV%\\Scripts"
- "%VENV%\\Scripts\\activate"
- pip install -r requirements.test
- if defined BUILD_EXE pip install -r requirements.build
- pip install .
#- ps: Update-AppveyorBuild -Version "v$(python -c 'import sys; import basicpyqt5example; sys.stdout.write(basicpyqt5example.__version__)') b$Env:APPVEYOR_BUILD_NUMBER"
build_script:
- if defined BUILD_WHEEL python setup.py bdist_wheel
- if defined BUILD_EXE venv\\Scripts\\pyinstaller pyinstaller.spec
- if defined BUILD_EXE mkdir "BasicPyQt5Example %APPVEYOR_BUILD_VERSION%"
- if defined BUILD_EXE move dist\\basicpyqt5example "BasicPyQt5Example %APPVEYOR_BUILD_VERSION%\\BasicPyQt5Example %APPVEYOR_BUILD_VERSION%"
test_script:
- tox
artifacts:
- path: "dist\\*.whl"
- path: "BasicPyQt5Example %APPVEYOR_BUILD_VERSION%"
# https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
on_finish:
- ps: if (Get-ChildItem Env:ENABLE_RDP -ErrorAction SilentlyContinue) {$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))} else {echo RDP not enabled}