forked from DC-analysis/DCKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
74 lines (65 loc) · 2.16 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
# Use large clone depth so that a tag is included for versioning
clone_depth: 256
notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false
environment:
matrix:
- PYTHON: "C:\\Python38-x64"
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
install:
# Install InnoSetup and add to path
- appveyor-retry choco install -y InnoSetup
# 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
# Install dckit and its dependencies
- appveyor-retry python -m pip install --upgrade pip wheel
# install build requirements (pinned versions of some packages)
- python -m pip install -r build-recipes\\win_build_requirements.txt
# Install DCKit with its dependencies
- appveyor-retry pip install -e .
# Show the installed packages
- pip freeze
build: off
test_script:
- appveyor-retry pip install pytest pytest-qt
- appveyor-retry pip install coverage codecov flake8
- flake8 dckit
- flake8 tests
- python -m coverage run --source=dckit -m pytest tests
- python -m coverage report -m
# Allow codecov to fail
- codecov || exit 0
after_test:
- appveyor-retry pip install twine wheel
# If tests are successful, create a whl package for the project.
- python setup.py bdist_wheel
- python setup.py sdist
- ps: "ls dist"
# Run pyinstaller
- cd build-recipes
- pyinstaller -y --log-level=WARN win_DCKit.spec
# Run the binary (the most simple test)
- dist\\DCKit\\DCKit.exe --version
# Create InnoSetup installers
# Generate iss file
- python win_make_iss.py
- C:\\"Program Files (x86)"\\"Inno Setup 6"\\ISCC.exe /Q /Q win_dckit.iss
artifacts:
# InnoSetup files
- path: build-recipes\Output\*
deploy:
provider: GitHub
auth_token:
secure: u94ePbzUmuyh5jZU+1xvST73Ueuxepu86/XQsGx/15AnSd4NhQHKE1UXIe1vBIwf
artifact: /.*\.exe/
draft: true
on:
appveyor_repo_tag: true # deploy on tag push only