forked from PreferredAI/cornac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
66 lines (53 loc) · 2.46 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
build: off
environment:
PYPI_PASSWORD:
secure: cTOEFT9KZZBMDVJgZzi9IpUKnJVxzESacNbQbFraRIA=
matrix:
- PYTHON_VERSION: "3.5"
MINICONDA: "C:\\Miniconda3-x64"
PYTHON_ARCH: "64"
- PYTHON_VERSION: "3.6"
MINICONDA: "C:\\Miniconda3-x64"
PYTHON_ARCH: "64"
platform:
- x64
matrix:
fast_finish: true
init:
- "ECHO %PYTHON_VERSION% %MINICONDA%"
install:
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- "conda create -q -n test-environment python=%PYTHON_VERSION% numpy scipy pandas"
- activate test-environment
- python -m pip install --upgrade pip
- pip install wheel twine pytest
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
# Install TensorFlow CPU version.
- ps: if ($env:PYTHON_VERSION -eq "3.5") { pip install https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.12.0-cp35-cp35m-win_amd64.whl } elseif ($env:PYTHON_VERSION -eq "3.6") { pip install https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.12.0-cp36-cp36m-win_amd64.whl }
# Install PyTorch CPU version.
- ps: if ($env:PYTHON_VERSION -eq "3.5") { pip install https://download.pytorch.org/whl/cpu/torch-1.0.0-cp35-cp35m-win_amd64.whl } elseif ($env:PYTHON_VERSION -eq "3.6") { pip install https://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-win_amd64.whl }
- pip install -e .[tests]
test_script:
- python -m pytest --cov=cornac
after_test:
- python setup.py bdist_wheel
- ps: rm dist/*.egg
artifacts:
- path: dist\*
deploy_script:
- echo "Starting Artifact Deployment"
# Make .pypirc file for twine
- echo [distutils] > %USERPROFILE%\\.pypirc
- echo index-servers = >> %USERPROFILE%\\.pypirc
- echo pypi >> %USERPROFILE%\\.pypirc
- echo [pypi] >> %USERPROFILE%\\.pypirc
- echo username=qttruong >> %USERPROFILE%\\.pypirc
- echo password=%PYPI_PASSWORD% >> %USERPROFILE%\\.pypirc
# Upload to PyPI
- set HOME=%USERPROFILE%
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "master") { Invoke-Expression "twine upload --skip-existing dist/*.whl" 2>$null } Else { write-output "Not on a tag on master, won't deploy to pypi"}
- echo "Finished Artifact Deployment"