-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
185 lines (163 loc) · 3.98 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
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
variables:
IMAGE_VERSION: 0.2.10
SIML_IMAGE: registry.ritc.jp/ricos/machine_learning/siml:$IMAGE_VERSION
CPU_IMAGE: registry.ritc.jp/ricos/machine_learning/siml/cpu:$IMAGE_VERSION
image: $SIML_IMAGE
default:
before_script:
- poetry config virtualenvs.create false
- poetry build
- python3.9 -m pip uninstall -y femio pysiml
- python3.9 -m pip install femio --pre
- python3.9 -m pip install dist/pysiml-*.whl # Only install root project, not dependencies
# - poetry install
stages:
- docker
- preprocess
- test
- deploy
# docker:
# image: docker:latest
# stage: docker
# inherit:
# default: false
# services:
# - docker:dind
# script:
# - apk add make
# - cd docker && make push key=${RICOS_PYPI_KEY}
# tags:
# - docker
# - gpu
# only:
# - master
preprocess:
stage: preprocess
script:
- python3.9 tests/preprocess.py
artifacts:
paths:
- tests/data
expire_in: 180min
generate_heat_steady:
stage: preprocess
script:
- python3.9 tests/data/heat_steady/generate_data.py tests/data/heat_steady
artifacts:
paths:
- tests/data/heat_steady
expire_in: 180min
autopep8:
stage: preprocess
script:
- python3.9 -m autopep8 --diff --exit-code $(find siml tests -name "*.py")
allow_failure: true
.test:
stage: test
tags:
- avx
test_gpu:
extends: .test
script:
- python3.9 -m pytest tests/test_gpu --capture=no
tags:
- multi-gpu
- avx
test_gpu_parallel:
extends: .test
script:
- python3.9 -m pytest tests/test_gpu_parallel --capture=no
allow_failure: true
tags:
- multi-gpu
- avx
test_networks:
extends: .test
script: python3.9 -m pytest tests/test_networks --capture=no
tags:
- avx
- 16-core-cpu
test_operation:
extends: .test
script: python3.9 -m pytest tests/test_operations --capture=no
tags:
- GenuineIntel
- avx
test_trainer_wo_pyg:
extends: .test
script:
- python3.9 -m pip uninstall torch-geometric -y
- python3.9 -m pytest tests/test_operations/test_trainer.py --capture=no -k test_whole_process
test_trainer_long:
extends: .test
script: python3.9 -m pytest tests/test_trainer_long.py --capture=no
test_services:
extends: .test
script:
- python3.9 -m pytest tests/test_services --capture=no
tags:
- gpu
test_reproducibility:
extends: .test
script:
- python3.9 tests/test_reproducibility/training_functions.py 11 0
- python3.9 tests/test_reproducibility/training_functions.py 11 1
- python3.9 tests/test_reproducibility/training_functions.py 23 0
- python3.9 -m pytest tests/test_reproducibility/test_reproducibility.py --capture=no
tags:
- no-gpu
test_group:
extends: .test
script:
- python3.9 -m pytest tests/test_groups.py --capture=no
tags:
- GenuineIntel
- avx
- gpu
- sm_61
pages:
stage: deploy
image: $CPU_IMAGE
script:
- poetry build
- python3.9 -m pip install dist/pysiml-*.whl
- python3.9 -m pip install -r sphinx/requirements.txt
- sphinx-apidoc -f -o ./sphinx siml
- sphinx-build ./sphinx ./docs
- cp -r docs public
- mv dist/*.whl public/
artifacts:
paths:
- public
- docs
tags:
- avx
only:
refs:
- master
- develop
- fix_sphinx
- /^*_pages$/
.deploy:wheel:
stage: deploy
script:
- python3.9 -m pip install --upgrade pip
- poetry version $VERSION
- poetry config repositories.ricos https://pypi.ritc.jp
- poetry build -f wheel
- poetry publish --username ricos --password ${RICOS_PYPI_KEY} -r ricos --no-ansi -n -v
- poetry publish --username __token__ --password ${PYPI_ORG_TOKEN} --no-ansi -n -v
retry: 2
deploy:wheel:master:
extends: .deploy:wheel
before_script:
- export VERSION=$(grep "^version" pyproject.toml | grep -o "[0-9]\.[0-9]\.[0-9]").dev$(date +"%Y%m%d%H%M")
only:
- master
- develop
deploy:wheel:tag:
extends: .deploy:wheel
before_script:
- export VERSION=$CI_COMMIT_REF_NAME
only:
- tags