-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
129 lines (113 loc) · 2.39 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
variables:
PHLOWER_VERSION: 0.2.0
PHLOWER_IMAGE_REGISTRY: registry.ritc.jp/ricos/machine_learning/phlower
stages:
- test
- document_test
- deploy
default:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_VERSION}-py312-cpu
before_script:
- source /workspace/.venv/bin/activate
- poetry run python3 -m pip install -e .
lint:
stage: test
script:
- make lint
tags:
- no-gpu
dependencies: []
pytest_with_py312:
stage: test
script:
- make test
- poetry run python3 -m coverage html -d coverage
- poetry run python3 -m 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
dependencies: []
pytest_with_py311:
stage: test
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_VERSION}-py311-cpu
script:
- make test
dependencies: []
pytest_with_py310:
stage: test
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_VERSION}-py310-cpu
script:
- make test
dependencies: []
gpu_test:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_VERSION}-py311-cu124
stage: test
script:
- make gpu_test
tags:
- gpu
e2e_test:
image: ${PHLOWER_IMAGE_REGISTRY}:${PHLOWER_VERSION}-py311-cu124
stage: test
script:
- make e2e_test
tags:
- gpu
- GenuineIntel
pages_test:
stage: document_test
script:
- make document
tags:
- no-gpu
- GenuineIntel
artifacts:
paths:
- docs/build/html/
pages:
stage: deploy
script:
- mkdir public
- cp -r docs/build/html/* public/
artifacts:
paths:
- public
dependencies:
- pages_test
only:
- main
- develop
- fix_sphinx
.deploy:wheel:
stage: deploy
script:
- 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_PUBLISH_TOKEN --no-ansi -n -v
deploy:wheel:tags:
image: python:3.11-slim
extends: .deploy:wheel
before_script:
- pip install poetry
- export VERSION=$CI_COMMIT_REF_NAME
only:
- tags
# docker:
# stage: deploy
# services:
# - docker:dind
# script:
# - make push
# only:
# - main