forked from scikit-image/scikit-image-wheels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
106 lines (93 loc) · 3.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
# AppVeyor.com is a Continuous Integration service to build and run tests under
# Windows
environment:
BUILD_COMMIT: master
REPO_DIR: scikit-image
PKG_NAME: scikit_image
WHEELHOUSE_UPLOADER_USERNAME: travis-worker
NP_BUILD_DEP: "numpy==1.14.5"
NP_TEST_DEP: "numpy==1.14.5"
DAILY_COMMIT: master
# Unless there is a problem in releasing wheels, this should be set to an
# empty string. If there is a problem releasing wheels and a new build
# must be uploaded, then "--build-number <some number>" can be set
# https://github.com/MacPython/wiki/wiki/Build-Tags
BDIST_WHEEL_ARGS: ""
matrix:
- PYTHON: C:\Python36
- PYTHON: C:\Python36-x64
- PYTHON: C:\Python37
- PYTHON: C:\Python37-x64
- PYTHON: C:\Python38
NP_BUILD_DEP: "numpy==1.17.3"
NP_TEST_DEP: "numpy==1.17.3"
- PYTHON: C:\Python38-x64
NP_BUILD_DEP: "numpy==1.17.3"
NP_TEST_DEP: "numpy==1.17.3"
init:
- "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\""
- ps: >-
if ($env:APPVEYOR_REPO_BRANCH -eq "master") {
$env:ANACONDA_ORG = "scipy-wheels-nightly"
$env:UPLOAD_TOKEN = $env:SKIMAGE_NIGHTLY_UPLOAD_TOKEN
if ($env:DAILY_COMMIT) { $env:BUILD_COMMIT = $env:DAILY_COMMIT }
} else {
$env:ANACONDA_ORG = "multibuild-wheels-staging"
$env:UPLOAD_TOKEN = $env:SKIMAGE_STAGING_UPLOAD_TOKEN
}
install:
# for some reason, we were running on the devel branch. It may be necessary for python 3.8
# https://github.com/MacPython/cython-wheels/pull/1
- git clone --depth 1 --branch devel https://github.com/matthew-brett/multibuild.git
- git clone --depth 1 --branch %BUILD_COMMIT% https://github.com/scikit-image/scikit-image.git
# 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%
- python -m pip install -U pip
# 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"
- git submodule update --init
- cd %REPO_DIR%
- git checkout %BUILD_COMMIT%
# Install the build dependencies of the project.
- pip install %NP_BUILD_DEP%
- pip install -r requirements\build.txt
- python setup.py bdist_wheel %BDIST_WHEEL_ARGS%
- ps: |
# Upload artifact to Appveyor immediately after build
ls dist -r | Foreach-Object {
appveyor PushArtifact $_.FullName
pip install $_.FullName
}
- cd ..
# Not a .NET project, we build scikit-image in the install step instead
build: false
test_script:
# Install the test / runtime dependencies
- pip install %NP_TEST_DEP%
- pip install -r %REPO_DIR%\requirements.txt
# Install the generated wheel package to test it
- pip install --pre --no-index --find-links .\%REPO_DIR%\dist %PKG_NAME%
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
# Use the Agg backend in Matplotlib
- echo backend:Agg > matplotlibrc
# Check Python version just in case
- python --version
# Run unit tests with pytest
- pytest --pyargs skimage
- cd ..
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 scikit-image
- pip install git+https://github.com/Anaconda-Server/anaconda-client
- IF NOT "%UPLOAD_TOKEN%" == "" anaconda -t %UPLOAD_TOKEN% upload --force -u %ANACONDA_ORG% "dist\*.whl"
cache:
# Avoid re-downloading large packages
- '%APPDATA%\pip\Cache'