forked from tommyod/KDEpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
61 lines (48 loc) · 1.85 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
clone_depth: 50
# Needed to build Cython
os: Visual Studio 2015
# Expand to a single build - testing for several versions is done on Travs,
# and cibuildwheel builds every windows wheel
environment:
matrix:
- PY_MAJOR_VER: 3
PYTHON_ARCH: "x86_64"
CIBW_SKIP: cp27-* cp33-* cp34-*
CIBW_TEST_REQUIRES: pytest matplotlib
CIBW_TEST_COMMAND: python -m pytest {project}/KDEpy --doctest-modules
platform:
- x64
# Download Python via conda, update it, then install KDEpy, wheel & cibuildwheel
build_script:
- ps: Start-FileDownload "https://repo.continuum.io/miniconda/Miniconda$env:PY_MAJOR_VER-latest-Windows-$env:PYTHON_ARCH.exe" C:\Miniconda.exe; echo "Finished downloading miniconda"
- cmd: C:\Miniconda.exe /S /D=C:\Py
- SET MKL_NUM_THREADS=1
- SET NUMEXPR_NUM_THREADS=1
- SET OMP_NUM_THREADS=1
- SET PATH=C:\Py;C:\Py\Scripts;C:\Py\Library\bin;%PATH%
- conda config --set always_yes yes
- conda update conda --quiet
- pip install -r requirements.txt
- python setup.py develop
- pip install wheel
- pip install --upgrade cibuildwheel
# Run the tests (but linting is done on Travis)
test_script:
- pytest KDEpy --doctest-modules --doctest-glob="*.rst" --capture=sys
# Store user and password for twine - in preparation for upload
after_test:
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
- "echo username: tommyod >> %USERPROFILE%\\.pypirc"
- "echo password: %TWINE_PASSWORD% >> %USERPROFILE%\\.pypirc"
# If a tag was associated with the commit, push to pypi
on_success:
- cmd: "echo $env:APPVEYOR_REPO_TAG"
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq 'true' -or $env:APPVEYOR_REPO_TAG -eq 'True') {
pip install twine
python -m cibuildwheel --output-dir wheelhouse
twine upload wheelhouse\\*.whl --skip-existing
}
artifacts:
# this directory is not deleted
- path: wheelhouse\*