forked from InterDigitalInc/CompressAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
89 lines (80 loc) · 2.03 KB
/
.gitlab-ci.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
image:
name: pytorch/pytorch:1.4-cuda10.1-cudnn7-runtime
stages:
- build
- static-analysis
- test
- doc
build:compressai:
stage: build
before_script:
- python --version
script:
- python setup.py bdist_wheel --dist-dir $CI_PROJECT_DIR/dist
artifacts:
paths:
- dist/
expire_in: 1 week
tags:
- docker
pylint:compressai:
stage: static-analysis
before_script:
- python --version
- pip install compressai --find-links=dist/
- pip install pylint
script:
- pylint compressai examples
tags:
- docker
black:compressai:
stage: static-analysis
before_script:
- python --version
- pip install black
script:
- black --check --diff compressai examples tests
tags:
- docker
isort:compressai:
stage: static-analysis
before_script:
- python --version
- pip install isort
script:
- isort --check-only -v compressai examples tests
tags:
- docker
test:compressai:pytorch-1.4:
stage: test
before_script:
- python --version
- pip install compressai --find-links=dist/
- pip install click pytest codecov pytest-cov
script:
- >
if [ "$CI_COMMIT_BRANCH" == "master" ]; then
pytest --cov=compressai -s tests
else
pytest --cov=compressai -m "not pretrained" -s tests
fi
tags:
- docker
test:compressai:pytorch-1.5.1:
extends: test:compressai:pytorch-1.4
image: pytorch/pytorch:1.5.1-cuda10.1-cudnn7-runtime
test:compressai:pytorch-1.6.0:
extends: test:compressai:pytorch-1.4
image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime
doc:compressai:
stage: doc
before_script:
- python --version
- pip install compressai --find-links=dist/
- cd docs
script:
- pip install -r requirements.txt
- make html
tags:
- docker
# TODO: copy the generated doc to a public webserver