This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
105 lines (90 loc) · 3.21 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
# vim ft=yaml
# CI on Windows via appveyor
# Largely from:
# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
#
# Builds version specified in BUILD_COMMIT variable
# To chose version to build, edit value of BUILD_COMMIT
environment:
global:
# Remember to edit .travis.yml too
BUILD_COMMIT: v1.1.1
NP_BUILD_DEP: "1.14.5"
NP_TEST_DEP: "1.15.4"
matrix:
- PYTHON: C:\Python39
NP_BUILD_DEP: "1.19.4"
NP_TEST_DEP: "1.19.4"
- PYTHON: C:\Python39-x64
NP_BUILD_DEP: "1.19.4"
NP_TEST_DEP: "1.19.4"
- PYTHON: C:\Python38
NP_BUILD_DEP: "1.17.3"
NP_TEST_DEP: "1.17.3"
- PYTHON: C:\Python38-x64
NP_BUILD_DEP: "1.17.3"
NP_TEST_DEP: "1.17.3"
- PYTHON: C:\Python37
NP_BUILD_DEP: "1.14.5"
- PYTHON: C:\Python37-x64
NP_BUILD_DEP: "1.14.5"
install:
- cmd: echo "Filesystem root:"
- dir C:\
- echo "Installed SDKs:"
- dir "C:/Program Files/Microsoft SDKs/Windows"
# Get needed submodules
- git submodule update --init
# Install new Python if necessary
- ps: .\multibuild\install_python.ps1
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
# Fix MSVC builds for 64-bit Python
# See
# http://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10
- echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64/vcvars64.bat"
# Check that we have the expected version and architecture for Python
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
# Upgrade to the latest pip, setuptools, and wheel
- python -m pip install --upgrade pip setuptools wheel
- git submodule update --init
# Dependencies for package
- pip install numpy==%NP_BUILD_DEP% Cython
build_script:
# Build and install the wheel
- cd pywt
- git fetch origin
- git checkout %BUILD_COMMIT%
- python setup.py bdist_wheel
- ps: |
# Upload artifact to Appveyor immediately after build
ls dist -r | Foreach-Object {
appveyor PushArtifact $_.FullName
pip install $_.FullName
}
- cd dist
- pip install --pre --no-index -f . PyWavelets
- cd ..
test_script:
# Run some tests
- mkdir tmp
- cd tmp
- python -m pip install numpy==%NP_TEST_DEP% pytest pytest-env
- python -m pytest --pyargs pywt
- cd ..
after_test:
# If tests are successful, create binary packages for the project.
- dir dist
on_success:
# Upload the generated wheel package to anaconda.org
# PYWAVELETS_STAGING_UPLOAD_TOKEN is an encrypted variable
# used in Appveyor CI config, originally created at
# multibuild-wheels-staging site
- cd ..\pywt
- cmd: set ANACONDA_ORG="multibuild-wheels-staging"
- pip install git+https://github.com/Anaconda-Server/anaconda-client
- IF NOT "%PYWAVELETS_STAGING_UPLOAD_TOKEN%" == "" echo "anaconda token detected"
- IF NOT "%PYWAVELETS_STAGING_UPLOAD_TOKEN%" == "" anaconda -t %PYWAVELETS_STAGING_UPLOAD_TOKEN% upload --force -u %ANACONDA_ORG% "dist\*.whl"