forked from inkcut/inkcut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
101 lines (79 loc) · 2.97 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
# This file is used to configure the AppVeyor CI system, for testing on Windows machines.
#
# Code based on https://github.com/nucleic/enaml/
#
# To test with AppVeyor:
# Register on appveyor.com with your GitHub account.
# Create a new appveyor project, using the GitHub details.
# Ideally, configure notifications to post back to GitHub. (Untested)
branches:
only:
- master
environment:
matrix:
- NAME: "Py 3.7"
PYTHON: "C:\\Python3.7-x64"
PYTHON_VERSION: "3.7"
PYTHON_ARCH: "64"
#- NAME: "Py 2.7"
# PYTHON: "C:\\Python2.7-x64"
# PYTHON_VERSION: "2.7"
# PYTHON_ARCH: "64"
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- 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." }
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit),
# as well as pip, conda-build, and the binstar CLI
- ECHO "Installing minconda:"
- ps: .\\ci\\installconda.ps1
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Dump some debugging information about the machine.
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""
- ECHO "Build Folder:"
- ps: ls $env:APPVEYOR_BUILD_FOLDER
- ECHO "Environment Variables"
- set
# Prepare Miniconda
# - Avoid warning from conda info.
# - Dump the setup for debugging.
# - Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda install -q -n root _license
- conda info -a
- conda upgrade -q pip setuptools wheel
# We need a library for Qt.
- conda install -q pyqt
# We should be able to install the test dependencies via setup.py, but in the meantime, do it manually:
- pip install pytest pytest-cov pytest-qt
# Use the script
build: off
build_script:
- cd %APPVEYOR_BUILD_DIR%
- pip install -r requirements.txt
# Run setup script
- python setup.py develop
# Build the conda package
- conda build recipe
test_script:
# Run the project tests
- cd %APPVEYOR_BUILD_DIR%
- pytest tests --cov inkcut --cov-report xml
after_test:
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh
# Build installer
- constructor recipe
artifacts:
- path: Inkcut-*.exe