-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
77 lines (68 loc) · 1.44 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
stages:
- lint
- docs
- deploy
#variables:
# PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
#cache:
# paths:
# - .cache/pip
# - venv/
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"
#before_script:
# - pip install virtualenv
# - virtualenv venv
# - source venv/bin/activate
# - pip install -e . --find-links https://download.pytorch.org/whl/torch_stable.html
pre-commit_py3.10:
stage: lint
image: python:3.10.13
script:
- pip install pre-commit
- pre-commit run --all-files
allow_failure: true
pre-commit_py3.11:
stage: lint
image: python:3.11.7
script:
- pip install pre-commit
- pre-commit run --all-files
allow_failure: true
sphinx_py3.10:
stage: docs
needs: []
image: python:3.10.13
script:
- pip install -e . --find-links https://download.pytorch.org/whl/torch_stable.html
- cd docs
- make html
artifacts:
paths:
- docs/_build/html
allow_failure: true
sphinx_py3.11:
stage: docs
needs: []
image: python:3.11.7
script:
- pip install -e . --find-links https://download.pytorch.org/whl/torch_stable.html
- cd docs
- make html
artifacts:
paths:
- docs/_build/html
allow_failure: true
pages:
stage: deploy
needs: [sphinx_py3.11]
script:
- mv docs/_build/html public
artifacts:
paths:
- public
allow_failure: true
only:
- main