forked from virgesmith/humanleague
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
148 lines (122 loc) · 4.02 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Build environments
environment:
matrix:
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# TEST_LANGUAGE: "Python"
# PYTHON: "C:\\Python38-x64"
# PYTHON_ARCH: 64
# MSVC_VERSION: "Visual Studio 19 Win64"
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# TEST_LANGUAGE: "Python"
# PYTHON: "C:\\Python39-x64"
# PYTHON_ARCH: 64
# MSVC_VERSION: "Visual Studio 19 Win64"
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# TEST_LANGUAGE: "Python"
# PYTHON: "C:\\Python37-x64"
# PYTHON_ARCH: 64
# MSVC_VERSION: "Visual Studio 19 Win64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TEST_LANGUAGE: "R"
PYTHON: ""
PYTHON_ARCH: ""
MSVC_VERSION: ""
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# PYTHON: "3.7"
# APPVEYOR_YML_DISABLE_PS_LINUX: true
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
# PYTHON: "3.8"
# APPVEYOR_YML_DISABLE_PS_LINUX: true
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
# PYTHON: "3.9"
# APPVEYOR_YML_DISABLE_PS_LINUX: true
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
MINICONDA: true
PYTHON: "3.8"
APPVEYOR_YML_DISABLE_PS_LINUX: true
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
CODECOV_BUILD: true
PYTHON: "3.8"
APPVEYOR_YML_DISABLE_PS_LINUX: true
# - APPVEYOR_BUILD_WORKER_IMAGE: macOS
# PYTHON: "3.7"
# APPVEYOR_YML_DISABLE_PS_LINUX: true
# - APPVEYOR_BUILD_WORKER_IMAGE: macOS
# PYTHON: "3.8"
# APPVEYOR_YML_DISABLE_PS_LINUX: true
# - APPVEYOR_BUILD_WORKER_IMAGE: macOS
# PYTHON: "3.9"
# APPVEYOR_YML_DISABLE_PS_LINUX: true
stack: python %PYTHON%
# fail fast
# matrix:
# fast_finish: true
init:
- ps: |
if ($env:TEST_LANGUAGE -eq "R") {
$ErrorActionPreference = "Stop"
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
}
if ($env:TEST_LANGUAGE -eq "Python") {
Write-Host "$env:PYTHON $env:PYTHON_ARCH $env:MSVC_VERSION"
$python = $env:PYTHON + "\python.exe"
& $python --version
}
install:
- ps: |
if ($env:TEST_LANGUAGE -eq "R") {
Bootstrap
}
if ($env:TEST_LANGUAGE -eq "Python") {
$python = $env:PYTHON + "\python.exe"
& $python -m pip install --upgrade pip wheel setuptools pybind11 pytest --no-warn-script-location
& $python -m pip install numpy --no-warn-script-location
}
- sh: if [ "$MINICONDA" == "true" ]; then scripts/create-conda-env.sh; fi
cache:
- C:\RLibrary
build_script:
# install deps
- ps: if ($env:TEST_LANGUAGE -eq "R") { TravisTool install_deps }
- sh: |
if [ "$CODECOV_BUILD" == "true" ]; then
export CFLAGS=--coverage
gcc --version # things go badly wrong is gcc and gcov versions arent in sync
gcov --version
elif [ "$MINICONDA" == "true" ]; then
source "${HOME}/.miniconda/etc/profile.d/conda.sh"
conda activate conda-env
fi
python -m pip install -e .
test_script:
- ps: if ($env:TEST_LANGUAGE -eq "R") { TravisTool run_tests }
#- cmd: if "%TEST_LANGUAGE%" == "Python" ( "%PYTHON%\python.exe" setup.py test ) else ( echo %TEST_LANGUAGE% )
- cmd: if "%TEST_LANGUAGE%" == "Python" ( "%PYTHON%\python.exe" -m pip install -e . )
- sh: |
if [ "$MINICONDA" == "true" ]; then
source "${HOME}/.miniconda/etc/profile.d/conda.sh"
conda activate conda-env
fi
python -m pytest
if [ "$CODECOV_BUILD" == "true" ]; then
bash <(curl -s https://codecov.io/bash) -Z
fi
on_failure:
- 7z a failure.zip *.Rcheck\*
- appveyor PushArtifact failure.zip
artifacts:
- path: dist\*
name: Dist
- path: '*.Rcheck\**\*.log'
name: Logs
- path: '*.Rcheck\**\*.out'
name: Logs
- path: '*.Rcheck\**\*.fail'
name: Logs
- path: '*.Rcheck\**\*.Rout'
name: Logs
- path: '\*_*.tar.gz'
name: Bits
- path: '\*_*.zip'
name: Bits