forked from golemfactory/clay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
99 lines (77 loc) · 2.83 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
os: Visual Studio 2017
version: '{branch}-{build}'
branches:
only:
- master
- develop
platform:
- x64
environment:
matrix:
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "64"
VER_GETH: geth-windows-amd64-1.7.2-1db4ecdc
VER_HYPERG: 0.2.4
DIR_OPENSSL: C:\OpenSSL
DIR_GETH: C:\%VER_GETH%
DIR_HYPERG: C:\hyperg
DIR_WHEELS: C:\wheels
PYWIN32: pywin32-221.win-amd64-py3.6.exe
WHEELS_URL: https://raw.githubusercontent.com/wiki/golemfactory/golem/wheels
cache:
- '%DIR_OPENSSL% -> appveyor.yml'
- '%DIR_GETH% -> appveyor.yml'
- '%DIR_HYPERG% -> appveyor.yml'
- '%DIR_WHEELS% -> requirements.txt'
- '%LOCALAPPDATA%\pip\Cache -> requirements.txt'
install:
- set PATH=%PYTHON%;%PYTHON%\Scripts;C:\OpenSSL-Win64;%DIR_GETH%;%DIR_HYPERG%;%SystemRoot%\system32;%PATH%
# geth
- if not exist %DIR_GETH% (
appveyor DownloadFile https://gethstore.blob.core.windows.net/builds/%VER_GETH%.zip &&
7z x %VER_GETH%.zip -y -aoa -oC:\ > NUL
)
# golem-hyperdrive
- if not exist %DIR_HYPERG% (
curl -LfSs -o hyperg.zip https://github.com/mfranciszkiewicz/golem-hyperdrive/releases/download/v%VER_HYPERG%/hyperg_%VER_HYPERG%_windows-x64.zip &&
7z x hyperg.zip -y -aoa -oC:\ > NUL
)
- ps: $HyperdriveProcess = Start-Process hyperg -PassThru
# pip
- pip install --disable-pip-version-check --user --upgrade pip<10
# virtualenv
- pip install virtualenv
- virtualenv --version
- virtualenv --clear venv
- venv\Scripts\activate.bat
# pywin32
- if not exist %DIR_WHEELS% (
mkdir %DIR_WHEELS%
)
- if not exist %DIR_WHEELS%\%PYWIN32% (
appveyor DownloadFile %WHEELS_URL%/%PYWIN32% &&
move %PYWIN32% %DIR_WHEELS%\%PYWIN32%
)
- easy_install.exe %DIR_WHEELS%\%PYWIN32%
# requirements
- pip install -r requirements.txt
- pip install -r requirements-win.txt
- pip install -r requirements-test.txt
- python setup.py develop
# Slow tests only on branches and PRs with enough approvals
- set TMP_FILE="approvals.txt"
- python scripts\get-slow-argument.py "%APPVEYOR_PULL_REQUEST_NUMBER%" > %TMP_FILE%
- set /P ARG_RUNSLOW=< %TMP_FILE% || echo "No contents, empty args" && exit 0
- del %TMP_FILE%
build_script:
- msbuild apps\rendering\resources\taskcollector\taskcollector.sln /p:Configuration=Release /p:Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
test_script:
- venv\Scripts\activate.bat
- if NOT defined ARG_RUNSLOW pytest --cov=golem --durations=5 --maxfail=3 -rxs && echo "Not enough approvals." && exit 1
- if defined ARG_RUNSLOW pytest --cov=golem --durations=5 --maxfail=3 -rxs --runslow
after_test:
- venv\Scripts\activate.bat
- codecov
on_finish:
- ps: Stop-Process -Id $HyperdriveProcess.Id