-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
81 lines (74 loc) · 1.7 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
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- "$CI_PROJECT_DIR/.cache/pip"
stages:
- static-analysis
- test
- doc
# flake8:
# stage: static-analysis
# image: registry.gitlab.com/mafda/python-linting
# before_script:
# - python --version
# script:
# - flake8 --max-line-length 88 compressai_trainer conf tests
# tags:
# - docker
black:
stage: static-analysis
image: python:3.8-buster
before_script:
- python --version
- pip install black
script:
- black --check compressai_trainer conf tests
tags:
- docker
isort:
stage: static-analysis
image: python:3.8-buster
before_script:
- python --version
- pip install isort
script:
- isort compressai_trainer tests --check-only
tags:
- docker
test:
cache: []
stage: test
# image: pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
image: python:3.8-buster
before_script:
- python --version
- pip install poetry
- poetry config installer.modern-installation false
- poetry install --with=dev,tests
- cd ..
- rm -rf compressai
- git clone "https://github.com/InterDigitalInc/CompressAI.git" compressai
- cd -
- poetry run pip install -e ../compressai
script:
- poetry run make tests
tags:
- docker
doc:
stage: doc
image: python:3.8-buster
before_script:
- python --version
- pip install poetry
- poetry config installer.modern-installation false
- poetry install --with=docs
- cd ..
- rm -rf compressai
- git clone "https://github.com/InterDigitalInc/CompressAI.git" compressai
- cd -
- poetry run pip install -e ../compressai
script:
- poetry run make docs
tags:
- docker