-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
78 lines (64 loc) · 2.63 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
# https://github.com/pyinstaller/pyinstaller/blob/develop/appveyor.yml
clone_depth: 10
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- PYTHON: C:\Python36-x64
PYTHON_VERSION: 3.6
PYTHON_ARCH: 64
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
- "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\""
cache:
# Cache downloaded pip packages and built wheels.
- '%LOCALAPPDATA%\pip\Cache\http'
- '%LOCALAPPDATA%\pip\Cache\wheels'
install:
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
# Check that we have the expected version and architecture for Python
- python --version
- >-
%CMD_IN_ENV%
python -c "import sys,platform,struct;
print(sys.platform, platform.machine(), struct.calcsize('P') * 8, )"
### Install the PyInstaller dependencies.
# If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages, pip
# will build them from source using the MSVC compiler matching the target
# Python version and architecture. To achieve this, all commands are run
# under control of '%CMD_IN_ENV%' (see above).
# Upgrade to the latest pip.
- 'python -m pip install -U pip setuptools wheel'
# Install PyInstaller
- 'pip install PyInstaller'
build_script:
- 'pyinstaller --onefile --add-data default.jpg;default.jpg maker.py'
deploy:
release: appveyor-(appveyor_build_version)
description: 'Automatic Windows build'
provider: GitHub
auth_token:
secure: +mlxGMdAPau96ntD+REJn6PIoV9dzPbYXwloirLZ8++FoJ1WEkPLABhELdrS3u1A
artifact: dist/maker.exe # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: false # deploy on tag push only
on_finish:
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
#
# If the cache limit is reached, the cache will not be updated (of not even
# created in the first run). So this is a trade of between keeping the cache
# current and having a cache at all.
# NB: This is done only `on_success` since the cache in uploaded only on
# success anyway.
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
# Show size of cache
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"