This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
appveyor.yml
95 lines (80 loc) · 3.25 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
# vim ft=yaml
# CI on Windows via appveyor
environment:
global:
REPO_DIR: astropy
PACKAGE_NAME: astropy
BUILD_COMMIT: v4.1rc2
NP_BUILD_DEP: "numpy==1.16.5"
NP_TEST_DEP: "numpy==1.16.5"
OTHER_BUILD_DEP: "cython jinja2 extension-helpers setuptools_scm"
OTHER_TEST_DEP: "pytest-doctestplus==0.4.0 pytest-astropy"
matrix:
- PYTHON: C:\Python36
- PYTHON: C:\Python36-x64
- PYTHON: C:\Python37
NP_BUILD_DEP: numpy==1.16.5
NP_TEST_DEP: "numpy==1.16.5"
- PYTHON: C:\Python37-x64
NP_BUILD_DEP: numpy==1.16.5
NP_TEST_DEP: "numpy==1.16.5"
- 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"
matrix:
fast_finish: true
install:
# Fetch submodules
- git submodule update --init --recursive
# 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%
- python -m pip install -U pip setuptools
# 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)"
build_script:
# Install the dependencies of the project.
- python -m pip install %NP_BUILD_DEP% %OTHER_BUILD_DEP%
# Build wheel
- python -m pip install wheel
- cd %REPO_DIR%
- git checkout %BUILD_COMMIT%
# IMPORTANT: do not apply any patches here, since this will affect the version
# determined by setuptools_scm! Instead, find a way to apply the patch to the
# installed version, or better, just patch astropy :)
- python setup.py bdist_wheel
- cd ..
test_script:
# create test env
- virtualenv --python %PYTHON%\Python.exe test_env
- test_env\Scripts\activate.bat
- where python
- python -m pip install %NP_TEST_DEP% %OTHER_TEST_DEP%
# install from wheel
- python -m pip install --pre --no-index --find-links %REPO_DIR%\dist\ %PACKAGE_NAME%
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- python --version
- python -c "import sys; import astropy; sys.exit(astropy.test(remote_data='none'))"
- cd ..
artifacts:
- path: "%REPO_DIR%\\dist\\*"
on_success:
# Upload the generated wheel package to anaconda.org
# ASTROPY_STAGING_UPLOAD_TOKEN is an encrypted variable
# used in Appveyor CI config, originally created at
# multibuild-wheels-staging site
- cmd: set ANACONDA_ORG="multibuild-wheels-staging"
- pip install git+https://github.com/Anaconda-Server/anaconda-client
- IF NOT "%ASTROPY_STAGING_UPLOAD_TOKEN%" == "" anaconda -t %ASTROPY_STAGING_UPLOAD_TOKEN% upload --force -u %ANACONDA_ORG% "astropy\dist\*.whl"