forked from NVIDIA/earth2studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
224 lines (206 loc) · 4.45 KB
/
.gitlab-ci.yml
File metadata and controls
224 lines (206 loc) · 4.45 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
stages:
- pre
- build
- lint
- test
- report
- docs
workflow:
name: $PIPELINE_WORKFLOW_NAME
gitlab-clone:
stage: pre
rules:
- if: $PIPELINE_REPO_SOURCE == "github"
when: always
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $PIPELINE_REPO_SOURCE != "github" && $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
- if: $PIPELINE_REPO_SOURCE != "github" && $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"
when: always
- when: manual
tags:
- docker
extends:
- .gitlab:pull
image: bitnami/git
build-ci-env:
stage: build
needs:
- job: github-clone
artifacts: false
optional: true
- job: gitlab-clone
artifacts: false
optional: true
tags:
- docker
extends:
- .earth2studio:build-env:base
- .build-env:cache
script:
- make setup-ci
- make install-docker
format:
stage: lint
needs:
- job: build-ci-env
artifacts: false
tags:
- docker
extends:
- .earth2studio:test:base
- .lint:cache
script:
- ls
- make format
lint:
stage: lint
needs:
- job: build-ci-env
artifacts: false
tags:
- docker
extends:
- .earth2studio:test:base
- .lint:cache
script:
- make interrogate
- make lint
- make license
pytest:
stage: test
needs:
- job: format
artifacts: false
- job: lint
artifacts: false
tags:
- docker
extends:
- .earth2studio:test:base
variables:
XLA_PYTHON_CLIENT_ALLOCATOR: platform
XLA_PYTHON_CLIENT_PREALLOCATE: false
# https://docs.jax.dev/en/latest/gpu_memory_allocation.html
rules:
- if: $PIPELINE_TEST_ALL == "true"
when: on_success
- when: never
script:
- make install-docker
- make pytest-docker 2>&1 | tee ../pytest.log.full
- grep -A 9999 "=.*short test summary info.*=" ../pytest.log.full > ../blossom.log
- rm ../pytest.log.full
pytest-data:
extends:
- pytest
variables:
COVERAGE_SOURCE: earth2studio/data
PYTEST_SOURCE: test/data
rules:
- if: $PIPELINE_TEST_ALL != "true"
changes:
paths:
- $COVERAGE_SOURCE/**/*
- $PYTEST_SOURCE/**/*
compare_to: 'refs/heads/main'
when: on_success
- when: never
script:
- make install-docker
- make pytest-submodule-docker 2>&1 | tee ../pytest.log.full
# - grep -A 9999 "=.*short test summary info.*=" ../pytest.log.full > ../blossom.log
# - rm ../pytest.log.full || true
pytest-io:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio/io
PYTEST_SOURCE: test/io
pytest-lexicon:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio/lexicon
PYTEST_SOURCE: test/lexicon
pytest-models:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio/models
PYTEST_SOURCE: test/models
pytest-perturbation:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio/perturbation
PYTEST_SOURCE: test/perturbation
pytest-run:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio.run
PYTEST_SOURCE: test/run
rules:
- if: $PIPELINE_TEST_ALL != "true"
when: on_success
- when: never
pytest-statistics:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio/statistics
PYTEST_SOURCE: test/statistics
pytest-utils:
extends:
- pytest-data
variables:
COVERAGE_SOURCE: earth2studio/utils
PYTEST_SOURCE: test/utils
coverage:
stage: report
needs:
- job: pytest
artifacts: true
optional: true
- job: pytest-data
artifacts: true
optional: true
- job: pytest-lexicon
artifacts: true
optional: true
- job: pytest-io
artifacts: true
optional: true
- job: pytest-models
artifacts: true
optional: true
- job: pytest-perturbation
artifacts: true
optional: true
- job: pytest-run
artifacts: true
optional: true
- job: pytest-statistics
artifacts: true
optional: true
- job: pytest-utils
artifacts: true
optional: true
tags:
- docker
extends:
- .earth2studio:test:base
- .coverage:cache
script:
- ls -a
- make setup-ci
- make coverage 2>&1 | tee ../blossom.log
include:
- project: 'modulus/modulus-ci'
ref: main
file: '.gitlab-ci/earth2studio/common.gitlab-ci.yml'
- project: 'modulus/modulus-ci'
ref: main
file: '.gitlab-ci/pull.gitlab-ci.yml'