-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
209 lines (186 loc) · 3.84 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
209 lines (186 loc) · 3.84 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
variables:
PHLOWER_IMAGE_VERSION: 1.0.0
PHLOWER_IMAGE_REGISTRY: registry.ritc.jp/ricos/machine_learning/phlower
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
GIT_DEPTH: 0
stages:
- setup
- test
- document_test
- deploy
default:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py312-cpu
before_script:
- tar -xzf venv.tar.gz || true
setup_cpu_env_py311:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py311-cpu
stage: setup
before_script: []
script:
- make install CUDA_TAG="cpu" GRAPHLOW_TAG="" PYTHON_VERSION="3.11"
- tar -czf venv.tar.gz .venv
tags:
- no-gpu
artifacts:
paths:
- venv.tar.gz
dependencies: []
setup_cpu_env_py312:
stage: setup
before_script: []
script:
- make install CUDA_TAG="cpu"
- tar -czf venv.tar.gz .venv
tags:
- no-gpu
artifacts:
paths:
- venv.tar.gz
dependencies: []
setup_gpu_env_py312:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py312-cu124
stage: setup
before_script: []
script:
- make install CUDA_TAG="cu124"
- tar -czf venv.tar.gz .venv
tags:
- no-gpu
artifacts:
paths:
- venv.tar.gz
dependencies: []
lint:
stage: test
script:
- make lint
tags:
- no-gpu
needs:
- job: setup_cpu_env_py312
artifacts: true
pytest_with_py312:
stage: test
script:
- make test
- uv run coverage html -d coverage
- uv run coverage xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
expose_as: coverage
paths:
- coverage/
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
tags:
- no-gpu
- GenuineIntel
needs:
- job: setup_cpu_env_py312
artifacts: true
pytest_with_py311:
stage: test
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py311-cpu
script:
- make test
needs:
- job: setup_cpu_env_py311
artifacts: true
e2e_test:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py312-cu124
stage: test
variables:
NCCL_DEBUG: "INFO"
script:
- uv run python3 -c "import torch; print(torch.cuda.get_arch_list())"
- make e2e_test
tags:
- multi-gpu
- GenuineIntel
- sm_75
needs:
- job: setup_gpu_env_py312
artifacts: true
gpu_test:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py312-cu124
stage: test
variables:
NCCL_DEBUG: "INFO"
script:
- make gpu_test
tags:
- multi-gpu
- GenuineIntel
- sm_75
needs:
- job: setup_gpu_env_py312
artifacts: true
examples:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_IMAGE_VERSION}-py312-cu124
stage: test
script:
- uv run python3 -c "import torch; print(torch.cuda.get_arch_list())"
- make examples
tags:
- gpu
- GenuineIntel
- sm_75
needs:
- job: setup_gpu_env_py312
artifacts: true
pages_test:
stage: document_test
script:
- uv sync --extra cpu --group docs
- make document
tags:
- no-gpu
- GenuineIntel
artifacts:
paths:
- docs/build/html/
needs:
- job: setup_cpu_env_py312
artifacts: true
pages:
stage: deploy
script:
- mkdir public
- cp -r docs/build/html/* public/
artifacts:
paths:
- public
needs:
- job: pages_test
artifacts: true
- job: setup_cpu_env_py312
artifacts: true
only:
- main
- develop
- fix_sphinx
.deploy:wheel:
stage: deploy
script:
- uv version $VERSION
- uv build
- uv publish --username __token__ --password $PYPI_PUBLISH_TOKEN -n -v
deploy:wheel:tags:
image: python:3.11-slim
extends: .deploy:wheel
before_script:
- pip install uv
- export VERSION=$CI_COMMIT_REF_NAME
only:
- tags
# docker:
# stage: deploy
# services:
# - docker:dind
# script:
# - make push
# only:
# - main