-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
95 lines (82 loc) · 2.39 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
91
92
93
94
95
dist: bionic
language: python
jobs:
include:
# perform a linux build
- services: docker
python: 3.6
env: CIBW_BUILD="cp36-manylinux_x86_64"
- services: docker
python: 3.7.9
env: CIBW_BUILD="cp37-manylinux_x86_64"
- services: docker
python: 3.8
env: CIBW_BUILD="cp38-manylinux_x86_64"
- services: docker
python: 3.9
env: CIBW_BUILD="cp39-manylinux_x86_64"
# command to install dependencies
before_install:
- python3 -m pip install --upgrade pip
# command to install dependencies
install:
- python3 -m pip install -r requirements-test.txt
- pip install .[all]
- python3 -m pip install codecov
# command to run tests
script:
- pytest
- codecov
before_deploy:
- python3 -m pip install markupsafe==2.0.1
- python3 -m pip install s3pypi==0.11.1
- python3 -m pip install twine
- python3 -m pip install cibuildwheel==1.10.0
- python3 -m cibuildwheel --archs x86_64 --output-dir wheelhouse
- 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: wheelhouse/*
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -release$"
# Prod deployment
- provider: script # PyPi
script: python3 -m twine upload --skip-existing wheelhouse/*.whl
skip_cleanup: true
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 wheelhouse --secret deeplite-stage
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -stage$"
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: docs/_build/html
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ -release$"
env:
global:
- CIBW_BUILD_VERBOSITY=-3
- CIBW_BEFORE_BUILD="pip install --upgrade pip && pip uninstall -y deeplite-profiler && rm -rf build/ && pip install cryptography==3.4.6 && pip install -U Cython==3.0.0b2 && python setup.py build_ext --inplace && python sign_package.py"
- CIBW_ENVIRONMENT=$SECRET_CIBW_ENV
- TWINE_USERNAME="__token__"
- TWINE_PASSWORD=$PYPITOKEN