forked from G-Node/nixpy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
106 lines (87 loc) · 2.79 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
version: 1.4.{build}
image: Visual Studio 2017
environment:
NIX_VERSION: 1.4.1
DEPLOY_DIR: deploy
NIX_DIR: C:\nix
NIX_INCDIR: C:\nix\include
NIX_LIBDIR: C:\nix\lib
BOOST_INCDIR: C:\Libraries\boost_1_67_0\lib64-msvc-14.1
BOOST_LIBDIR: C:\Libraries\boost_1_67_0\lib64-msvc-14.1
NIX_APPVEYOR_ROOT: https://ci.appveyor.com/api/projects/G-Node/nix/artifacts/build
matrix:
# Python 2.7 32 bit
- PYTHON: "C:\\Python27"
pyver: 2
bits: 32
# Python 3.6 32 bit
- PYTHON: "C:\\Python36"
pyver: 3
bits: 32
# Python 3.7 32 bit
- PYTHON: "C:\\Python37"
pyver: 3
bits: 32
# Python 2.7 64 bit
- PYTHON: "C:\\Python27-x64"
pyver: 2
bits: 64
# Python 3.6 64 bit
- PYTHON: "C:\\Python36-x64"
pyver: 3
bits: 64
# Python 3.7 64 bit
- PYTHON: "C:\\Python37-x64"
pyver: 3
bits: 64
RDP: "no"
init:
- "ECHO %PYTHON% %vcvars% (%bits%)"
- ps: $env:PATH = "$env:PYTHON;$env:PATH;C:\Program Files\7-Zip;$env:NIX_DIR\bin"
- python -c "import sys;print('Python version is {}'.format(sys.version))"
install:
# TODO: Uncomment when cross-compatibility tests are fixed
# - ps: |
# if ($env:bits -eq "64") {
# $env:vcvars = "x86_amd64"
# $env:avjob = "job=Environment%3A%20PLATFORM%3Dx64%2C%20CONFIGURATION%3DRelease"
# $env:avfname = "nix-$env:NIX_VERSION-win64.exe"
# } else {
# $env:vcvars = "x86"
# $env:avjob = "job=Environment%3A%20PLATFORM%3Dx86%2C%20CONFIGURATION%3DRelease"
# $env:avfname = "nix-$env:NIX_VERSION-win32.exe"
# }
# - ps: |
# if ($env:pyver -eq "2") {
# python -m pip install enum34
# }
# - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
# - ps: mkdir "$env:NIX_DIR"
# - ps: cd "$env:NIX_DIR"
# - ps: |
# $env:nix_exe_url = "$env:NIX_APPVEYOR_ROOT/$env:avfname`?$env:avjob"
# Write-Host "Downloading $env:nix_exe_url"
# Invoke-WebRequest -URI $env:nix_exe_url -OutFile "nix.exe"
# - 7z x nix.exe
# - cd ..
- python -m pip install numpy h5py wheel pytest-xdist
- ps: cd "$env:APPVEYOR_BUILD_FOLDER"
- set DISTUTILS_USE_SDK="1"
- set MSSdk="1"
build_script:
- python setup.py build
test_script:
# TODO: Force cross-compatibility tests
# - python setup.py test --addopts "--force-compat"
- python setup.py test --addopts "-nauto"
after_test:
- ps: mkdir "$env:DEPLOY_DIR"
- python setup.py bdist_wheel -d %DEPLOY_DIR% %withnix%
artifacts:
- path: $(DEPLOY_DIR)\*
name: wheels
on_finish:
- ps: |
if ($env:RDP -eq "yes") {
$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
}