-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathappveyor.yml
124 lines (97 loc) · 3.03 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
version: 1.4.{build}
environment:
NIX_VERSION: 1.4.0
NIX_BUILD_DIR: C:\nix_build
DEPLOY_DIR: deploy
BOOST_ROOT: C:\Libraries\boost_1_62_0
NIX_APPVEYOR_ROOT: https://ci.appveyor.com/api/projects/stoewer/nix/artifacts/build
matrix:
# Python 2.7 32 bit
- PYTHON: "C:\\Python27"
pyver: 2
bits: 32
withnix: "--without-nix"
# - PYTHON: "C:\\Python27"
# bits: 32
# withnix: "--with-nix"
# Python 3.6 32 bit
- PYTHON: "C:\\Python36"
pyver: 3
bits: 32
withnix: "--without-nix"
# - PYTHON: "C:\\Python36"
# bits: 32
# withnix: "--with-nix"
# Python 2.7 64 bit
- PYTHON: "C:\\Python27-x64"
pyver: 2
bits: 64
withnix: "--without-nix"
# - PYTHON: "C:\\Python27-x64"
# bits: 64
# withnix: "--with-nix"
# Python 3.6 64 bit
- PYTHON: "C:\\Python36-x64"
pyver: 3
bits: 64
withnix: "--without-nix"
RDP: "no"
# - PYTHON: "C:\\Python36-x64"
# bits: 64
# withnix: "--with-nix"
matrix:
allow_failures:
- withnix: "--with-nix"
init:
- "ECHO %PYTHON% %vcvars% (%bits%)"
- ps: $env:PATH = "$env:PYTHON;$env:PATH;C:\Program Files\7-Zip;$env:NIX_BUILD_DIR\nix\bin"
- python -c "import sys;print('Python version is {}'.format(sys.version))"
install:
- 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"
}
- python -m pip install --upgrade pip
- ps: |
if ($env:pyver -eq "2") {
python -m pip install enum34
}
- ps: |
if ($env:withnix -eq "--with-nix") {
mkdir "$env:NIX_BUILD_DIR"
cd "$env:NIX_BUILD_DIR"
mkdir nix
cd nix
$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 ..
$env:BOOST_INC_DIR = "$env:BOOST_ROOT\include"
$env:BOOST_LIB_DIR = "$env:BOOST_ROOT\lib"
}
- python -m pip install numpy h5py wheel
- ps: cd "$env:APPVEYOR_BUILD_FOLDER"
- ps: $env:DISTUTILS_USE_SDK = "1"
- ps: $env:MSSdk = "1"
build_script:
- python setup.py build %withnix%
test_script:
- python setup.py test
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'))
}