-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
90 lines (80 loc) · 2.53 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
84
85
86
87
88
89
90
language: python
jobs:
include:
# perform a linux build
# - python: 3.6
# env: PYTAG="py36"
- python: 3.7.9
env: PYTAG="py37"
- python: 3.8
env: PYTAG="py38"
- python: 3.9
env: PYTAG="py39"
env:
global:
- TWINE_USERNAME="__token__"
- TWINE_PASSWORD=$PYPITOKEN
# command to install dependencies
install:
- pip install --upgrade pip
- pip install --upgrade packaging
- pip install --upgrade setuptools
- pip install .
- pip install -r requirements-test.txt
- pip install codecov
# command to run tests
script:
- pylint deeplite_torch_zoo/api/ --ignore-docstrings yes --ignore-comments yes --disable=W0614,W0401,W0613,C0301,E0401,C0415
- pylint deeplite_torch_zoo/utils/ --ignore-docstrings yes --ignore-comments yes --disable=W0614,W0401,W0613,C0301,E0401,C0415
- pytest
- codecov
- python training_scripts/object_detection/train.py --model_name yolo8n --dataset coco8 --dryrun
- python training_scripts/classification/ultralytics/train.py --model resnet12 --dataset imagewoof_160 --dryrun
- python training_scripts/classification/cifar/train_cifar.py --model resnet18 --dataset cifar100 --dryrun
- python training_scripts/classification/imagenet/train.py --data-dir ./ --dataset imagewoof_160 --model resnet12 --dryrun --dataset-download
before_deploy:
- pip install markupsafe==2.0.1
- python setup.py install
- pip install twine
- python setup.py bdist_wheel --python-tag $PYTAG
- pip install s3pypi==0.11.1
# - 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$"