forked from Deeplite/deeplite-torch-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
83 lines (72 loc) · 1.94 KB
/
.travis.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
language: python
jobs:
include:
# perform a linux build
- python: 3.6
env: PYTAG="py36"
- python: 3.7
env: PYTAG="py37"
- python: 3.8
env: PYTAG="py38"
env:
global:
- TWINE_USERNAME="__token__"
- TWINE_PASSWORD=$PYPITOKEN
# command to install dependencies
install:
- python -m pip install --upgrade pip
- pip install .
- pip install -r requirements-test.txt
- pip install codecov
# before_script:
# export PYTHONPATH=deeplite_torch_zoo/src/objectdetection/mb_ssd/repo/:deeplite_torch_zoo/src/segmentation/deeplab/repo:$PYTHONPATH
# command to run tests
script:
- pylint deeplite_torch_zoo/wrappers/ --ignore-docstrings yes --ignore-comments yes --disable=W0614,W0401,W0613,C0301,E0401,C0415
- pytest
- codecov
before_deploy:
- python setup.py install
- pip install twine
- python setup.py bdist_wheel --python-tag $PYTAG
- pip install -U s3pypi
- pip install sphinx
- pip install sphinx_rtd_theme
- make -C docs html
deploy:
# Prod deployment
- provider: releases
token: $GITHUB_TOKEN
skip_cleanup: true
name: v$TRAVIS_TAG
overwrite: true
file_glob: true
file: dist/*
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -release$"
# Prod deployment
- provider: script # PyPi
script: python3 -m twine upload --skip-existing dist/*.whl
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -release$"
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: docs/_build/html
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -release$"
#Stage deployment
- provider: script
script: s3pypi --bucket $AWS_BUCKET --region $AWS_REGION --force --private --no-sdist --dist-path dist --secret deeplite-stage
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -stage$"