forked from AndrewAnnex/SpiceyPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
92 lines (75 loc) · 2.92 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
# AppVeyor.com is a Continuous Integration service to build and run tests under Windows
# This yml file was made in part by looking at the yml files for conda and astropy.
# This is not a .NET project, so we build SpiceyPy in the install step.
build: off
environment:
global:
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\windows_sdk.cmd"
PYPI_PASSWORD:
secure: ojP0ftEgmrZcijN49vQEPz39rkcPyOxtjwNp5hUYkdKxQq47DwkiaWOnVA11nog637VUmRnHb07uXwvrhK4bbg==
matrix:
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
ARCH: "64"
WINDOWS_SDK_VERSION: "v7.1"
PLAT_NAME: "win-amd64"
PY_TAG: "cp36"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
ARCH: "64"
WINDOWS_SDK_VERSION: "v7.1"
PLAT_NAME: "win-amd64"
PY_TAG: "cp37"
- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
ARCH: "64"
WINDOWS_SDK_VERSION: "v7.1"
PLAT_NAME: "win-amd64"
PY_TAG: "cp38"
platform:
- x64
cache:
- C:\Users\appveyor\Downloads -> setup.py
install:
# Log out the python version just so we know it
- ECHO "%PYTHON_VERSION%"
# update path to use installed pip
- set PATH=%PYTHON%\\scripts;%PATH%
# Download things we absolutely need
- pip install wheel twine
- pip install -r requirements.txt
# Now install spiceypy
- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
- "%PYTHON%/python setup.py install"
- ECHO "Installed SpiceyPy!"
- "%PYTHON%/Scripts/py.test --version"
test_script:
- "%PYTHON%/Scripts/coverage run --source spiceypy -m pytest --pyargs spiceypy"
after_test:
- ECHO "DONE!"
- ECHO "Reporting Coverage..."
- "%PYTHON%/Scripts/codecov"
- ECHO "BUILDING WHEELS..."
- "%PYTHON%/python setup.py sdist bdist_wheel --plat-name=%PLAT_NAME% --python-tag=%PY_TAG%"
- ps: rm dist/*.egg
artifacts:
- path: dist\*
name: pypiartifacts
deploy_script:
- echo "Starting Artifact Deployment"
# populate pypirc file for twine
- echo [distutils] > %USERPROFILE%\\.pypirc
- echo index-servers = >> %USERPROFILE%\\.pypirc
- echo pypi >> %USERPROFILE%\\.pypirc
- echo [pypi] >> %USERPROFILE%\\.pypirc
- echo username=andrewannex >> %USERPROFILE%\\.pypirc
- echo password=%PYPI_PASSWORD% >> %USERPROFILE%\\.pypirc
# upload to pypi for windows
- set PATH=%BK_PATH%
- set HOME=%USERPROFILE%
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "main") { Invoke-Expression "twine upload --skip-existing dist/*.whl" 2>$null } Else { write-output "Not on a tag on main, won't deploy to pypi"}
- echo "Finished Artifact Deployment"
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/3a0242522a806d39ba2b
method: POST