-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
593 lines (533 loc) · 18.6 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
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
include:
# external
- project: 'omniverse/devplat/gitlab/templates/common/kit-extension'
file: 'modules/complete-pipeline.yml'
ref: v1_latest
# ==============================================================================================================
# More variables can be found in common.yml - here we put the ones controlling the jobs workflow
variables:
OSEC_NSPECT_ID: "NSPECT-VNHT-O4C6"
OSEC_CHECKMARX_ENABLED: 'false'
OSEC_GITLAB_SAST_ENABLED: 'false'
OSEC_PULSE_TRUFFLEHOG_ENABLED: 'false'
OSEC_OMNI_PULSE_ENABLED: 'false'
OSEC_README_ENABLED: 'false' # WARNING: Also have the init() function get_nspectid_from_repo_toml() in there...
ALLOW_PUBLISH_DOCS:
value: "true"
description: "Set to true to publish docs"
ALLOW_PUBLISH_TO_LAUNCHER:
value: "false"
description: "Set to true to for Kit apps that are published to the Launcher. That adds jobs for that."
ALLOW_PUBLISH_EXTENSIONS:
value: "true"
description: "Set to true to publish extension updates."
ALLOW_PUBLISH_CONTAINERS:
value: "false"
description: "Set to true to publish containers to NGC."
ALLOW_SECURITY_SCAN:
value: "false"
description: "Set to true to trigger a security scan as a child pipeline (non blocking)"
ALLOW_SCHEDULE_PIPELINE:
value: "true"
description: "Set to 'false' to disable schedule pipeline on a all jobs, useful to set it back on only some jobs."
ALLOW_TAG_PIPELINE:
value: "true"
description: "Set to 'false' to disable tag pipeline on a all push jobs."
RUN_EXTENSION_BENCHMARKS:
value: "false"
description: "Set to true to run benchmarks for kit extensions."
OMNI_CI_ENABLE_CXX_COVERAGE:
value: "false"
description: "Set to 'true' to enable C++ code coverage testing."
OMNI_CI_ENABLE_SANITIZERS:
value: "false"
description: "Set to 'true' to enable C++ sanitizer builds."
RUN_BUMP_VERSION:
value: "false"
description: "Set to true to run bump version. Only happens on schedule."
RUN_NIGHTLY_TESTS:
value: "false"
description: "Set to true to run nightly tests. Only happens on schedule."
RUN_DOCS_BUILD:
value: "true"
description: "Set to true to build omni docs. Only happens on schedule."
# ==============================================================================================================
.check-common:
stage: check
timeout: 20 minutes
interruptible: true
rules:
- if: $RUN_BUMP_VERSION == "true"
when: never
- !reference [.rules-workflow, rules]
.repo-artifacts:
artifacts:
when: always
expire_in: 2 weeks
paths:
- _repo/repo.log
- _repo/repolog*.txt
# ==============================================================================================================
# # Rule for running nightly tests on scheduled pipeline on develop and release branches
# .rules-bump-version:
# rules:
# - if: $CI_COMMIT_TITLE =~ /^Bumped version/
# when: never
# - if: $CI_PIPELINE_SOURCE == "schedule" && $RUN_BUMP_VERSION == "true" && ($CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH =~ /^release\/.*/)
# .rules-build-docs:
# rules:
# # allow schedule pipeline if RUN_DOCS_BUILD is set to "true" and its scheduled
# - if: $CI_PIPELINE_SOURCE == "schedule" && $RUN_DOCS_BUILD == "true"
# when: always
# - when: never
# # ==============================================================================================================
# # Rule for running publisher on push on develop and release branches
# .rules-version-changed:
# rules:
# - if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH =~ /^release\/.*/)
# changes:
# - VERSION.md
# - VERSION
# # ==============================================================================================================
# # Job that ensures that the MR has a JIRA ticket reference in the title
# check-jira-ticket:
# extends:
# - .check-common
# - .check-jira-ticket
# - .omni_nvks_runner
# allow_failure: true
# rules:
# - !reference [.rules-mr, rules]
# # ==============================================================================================================
# # Job to dump out the current configuration environment variables
# dump-env-vars:
# extends:
# - .check-common
# - .dump-env-vars
# - .omni_nvks_runner
# allow_failure: true
# when: manual
# rules:
# - !reference [.rules-workflow, rules]
# # ==============================================================================================================
# check-code-format:
# extends:
# - .check-common
# - .repo-artifacts
# - .runner-utility-linux-x86_64
# variables:
# GIT_DEPTH: 0 # needed to update copyrights
# script:
# - ./repo.sh format --verify
# # ==============================================================================================================
# .build-artifacts:
# artifacts:
# when: always
# expire_in: 2 weeks
# paths:
# - _build/**/*.gcno # produced by the coverage build
# - _build/**/*.log
# - _build/packages/
# - _repo/repo.log
# - _repo/repolog*.txt
# # ==============================================================================================================
# .build-common:
# stage: build
# timeout: 1.5 hours
# interruptible: true
# extends:
# - .build-artifacts
# retry:
# max: 2
# when:
# - always
# rules:
# - if: $RUN_BUMP_VERSION == "true"
# when: never
# - !reference [.rules-workflow, rules]
# # ==============================================================================================================
# build-linux-x86_64-release:
# extends:
# - .build-common
# - .runner-build-linux-x86_64
# before_script:
# - set -eu
# - yum install -y bsdtar
# - !reference [.omni_s3_write_get_secrets, omni_s3_write_get_secrets]
# script:
# - ./repo.sh ci build -c release
# # ==============================================================================================================
# build-linux-x86_64-debug:
# extends:
# - .build-common
# - .runner-build-linux-x86_64
# before_script:
# - set -eu
# - yum install -y bsdtar
# - !reference [.omni_s3_write_get_secrets, omni_s3_write_get_secrets]
# script:
# - ./repo.sh ci build -c debug
# # ==============================================================================================================
# build-windows-x86_64-release:
# extends:
# - .build-common
# - .runner-build-windows-x86_64
# before_script:
# - !reference [.windows_packman_s3_creds_get_powershell, windows_packman_s3_creds_get_powershell]
# script:
# - ./repo.bat ci build -c release
# # ==============================================================================================================
# build-windows-x86_64-debug:
# extends:
# - .build-common
# - .runner-build-windows-x86_64
# before_script:
# - !reference [.windows_packman_s3_creds_get_powershell, windows_packman_s3_creds_get_powershell]
# script:
# - ./repo.bat ci build -c debug
# # ==============================================================================================================
# .test-artifacts:
# artifacts:
# when: always
# expire_in: 2 weeks
# paths:
# - _build/**/*.log
# - _build/*/debug/*.xml
# - _build/*/release/*.xml
# - _build/coverage.info
# - _build/coverage/**
# - _repo/repo.log
# - _repo/repolog*.txt
# - _testoutput/
# reports:
# junit:
# - _build/*/debug/*.xml
# - _build/*/release/*.xml
# - _testoutput/results.xml
# # ==============================================================================================================
# .test-common:
# stage: test
# timeout: 2 hour
# interruptible: true
# extends:
# - .test-artifacts
# allow_failure: true
# rules:
# - if: $RUN_BUMP_VERSION == "true" || $RUN_DOCS_BUILD == "true"
# when: never
# - !reference [.rules-workflow, rules]
# # ==============================================================================================================
# test-linux-x86_64-pythontests:
# extends:
# - .test-common
# - .runner-test-linux-x86_64-gpu
# script:
# - ./repo.sh test
# after_script:
# - !reference [.datadog-test-visibility-linux-x86_64, script]
# needs:
# - job: build-linux-x86_64-release
# artifacts: true
# test-windows-x86_64-pythontests:
# extends:
# - .test-common
# - .runner-test-windows-x86_64-gpu
# script:
# - ./repo.bat test
# after_script:
# - !reference [.datadog-test-visibility-windows-x86_64, script]
# needs:
# - job: build-windows-x86_64-release
# artifacts: true
# ==============================================================================================================
# .deploy-artifacts:
# artifacts:
# when: always
# expire_in: 2 weeks
# paths:
# - _build/**/*.log
# - _repo/repo.log
# - _repo/repolog*.txt
# - _logs/**/*.log
# # ==============================================================================================================
# .deploy-common:
# stage: deploy
# extends:
# - .deploy-artifacts
# timeout: 1 hour
# interruptible: false
# before_script:
# - set -eu
# - !reference [.omni_codesign_get_secrets, omni_codesign_get_secrets]
# - !reference [.omni_s3_write_get_secrets, omni_s3_write_get_secrets]
# rules:
# - if: $RUN_DOCS_BUILD == "true" || RUN_NIGHTLY_TESTS=="true"
# when: never
# build-docs:
# extends:
# - .build-common
# - .runner-build-linux-x86_64
# timeout: 2 hours
# before_script:
# - set -eu
# - yum install -y bsdtar
# - !reference [.omni_s3_write_get_secrets, omni_s3_write_get_secrets]
# script:
# - git clone --depth=1 -b isaac_sim --single-branch https://gitlab-master.nvidia.com/omniverse/omni-docs.git
# - pushd omni-docs
# - ./repo docs --warn-as-error=0
# - ./repo docs --stage sphinx
# - ./repo docs --stage post
# - popd
# rules:
# - !reference [.rules-build-docs, rules]
# artifacts:
# when: always
# expire_in: 2 weeks
# paths:
# - omni-docs/_build/docs
# autoupdate-kit:
# rules:
# - when: never
# include:
# - project: 'omniverse/sectools/omni-pulse'
# file: '/templates/nspect-pulse-scan.yml'
# # ref: main
# nspect:
# extends: .nspect-scan
# stage: test
# tags: ['os/linux', 'type/docker']
# # allow_failure: true
# variables:
# PULSE_NSPECT_ID: "NSPECT-8CX1-LP1G"
# PULSE_SCAN_PROJECT: "Omniverse Isaac Sim"
# PULSE_SCAN_PROJECT_VERSION: "${CI_COMMIT_REF_SLUG}"
# OMNI_PULSE_TOOL_ARGS: "
# --target-deps-platforms linux-x86_64 windows-x86_64 \
# --target-deps-paths \
# deps/kit-sdk.packman.xml \
# deps/rtx-plugins.packman.xml \
# deps/target-deps.packman.xml \
# deps/isaac-sim.packman.xml \
# --additional-sources-path \
# source \
# --override-branches master develop 'release/*'' \
# "
# script:
# - set e
# # WAR for omni.pulse not knowing how to magically create <import path="../_build/${platform}/${config}/kit/dev/deps/rtx-target-deps.packman.xml.user">
# - tools/packman/packman pull deps/kit-sdk.packman.xml --platform linux-x86_64 -t config=release
# - tools/packman/packman pull deps/rtx-plugins.packman.xml --platform linux-x86_64 -t config=release
# - tools/packman/packman pull deps/omni-physics.packman.xml --platform linux-x86_64 -t config=release
# # - tools/packman/packman pull deps/target-deps.packman.xml --platform linux-x86_64 -t config=release
# # - tools/packman/packman pull deps/isaac-sim.packman.xml --platform linux-x86_64 -t config=release
# - tools/packman/packman pull deps/kit-sdk.packman.xml --platform windows-x86_64 -t config=release
# - tools/packman/packman pull deps/rtx-plugins.packman.xml --platform windows-x86_64 -t config=release
# - tools/packman/packman pull deps/omni-physics.packman.xml --platform windows-x86_64 -t config=release
# # - tools/packman/packman pull deps/target-deps.packman.xml --platform windows-x86_64 -t config=release
# # - tools/packman/packman pull deps/isaac-sim.packman.xml --platform windows-x86_64 -t config=release
# - !reference ['.nspect-scan', 'script']
# rules:
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# when: manual
# - if: '$CI_PIPELINE_SOURCE == "schedule"'
# when: always
# # the default branch has a scheduled scanner, disable per-commit automatic scan
# - if: '$CI_COMMIT_BRANCH == "develop"'
# when: manual
# - if: '$CI_COMMIT_BRANCH == "master"'
# when: manual
# # we probably don't have a scheduled scan setup for each release branch (though we should),
# # scan per-commit to catch some updates
# - if: $CI_COMMIT_REF_NAME =~ /^release\/.*$/
# when: always
# - when: never
# ==============================================================================================================
# By default, all platforms (windows-x86_64, linux-x86_64) are published,
# but this can be changed in repo.toml config if necessary:
# [repo_publish_exts]
# platforms = ["linux-x86_64"]
verify-publish-extensions:
extends:
- .deploy-common
- .omni_nvks_runner_with_docker
script:
- ./repo.sh build --fetch-only -rd
- ./repo.sh publish_exts -a --from-package -c release --verify
- ./repo.sh publish_exts -a --from-package -c debug --verify
# - ./repo.sh ci publish_extensions
needs:
# We set all dependencies as optional just in case a platform is not needed,
# then the yml file can override both build/test on one platform and deploy will still work.
- job: build-windows-x86_64
artifacts: true
optional: false
- job: build-linux-x86_64
artifacts: true
optional: false
# - job: build-windows-x86_64
# artifacts: true
# optional: false
# - job: build-linux-x86_64
# artifacts: true
# optional: false
# - job: test-windows-x86_64-startuptests
# artifacts: false
# optional: true
# - job: test-linux-x86_64-startuptests
# artifacts: false
# optional: true
rules:
- if: $ALLOW_PUBLISH_EXTENSIONS != "true"
when: never
- if: $RUN_BUMP_VERSION == "true"
when: never
- !reference [.rules-push, rules]
# - !reference [.rules-version-changed, rules]
# ==============================================================================================================
# By default, all platforms (windows-x86_64, linux-x86_64) are published,
# but this can be changed in repo.toml config if necessary:
# [repo_publish_exts]
# platforms = ["linux-x86_64"]
publish-extensions:
extends:
- .deploy-common
- .omni_nvks_runner_with_docker
script:
- ./repo.sh build --fetch-only -rd
- ./repo.sh publish_exts -a --from-package -c release
- ./repo.sh publish_exts -a --from-package -c debug
# - ./repo.sh ci publish_extensions
needs:
# We set all dependencies as optional just in case a platform is not needed,
# then the yml file can override both build/test on one platform and deploy will still work.
- job: build-windows-x86_64
artifacts: true
optional: false
- job: build-linux-x86_64
artifacts: true
optional: false
# - job: build-windows-x86_64-debug
# artifacts: true
# optional: false
# - job: build-linux-x86_64-debug
# artifacts: true
# optional: false
# - job: test-windows-x86_64-startuptests
# artifacts: false
# optional: true
# - job: test-linux-x86_64-startuptests
# artifacts: false
# optional: true
rules:
- if: $ALLOW_PUBLISH_EXTENSIONS != "true"
when: never
- if: $RUN_BUMP_VERSION == "true"
when: never
- !reference [.rules-version-changed, rules]
- !reference [.rules-push-manual, rules]
# ==============================================================================================================
publish-docs:
rules:
- when: never
needs:
# extends:
# - .deploy-common
# - .omni_nvks_runner_with_docker
# variables:
# # Required access tokens for publishing to S3
# AWS_ACCESS_KEY_ID: $AWS_OMNIVERSEDOCS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY: $AWS_OMNIVERSEDOCS_SECRET_ACCESS_KEY
# needs:
# - job: build-windows-x86_64-release
# artifacts: true
# script:
# - ./repo.sh ci publish_docs
# rules:
# - if: $ALLOW_PUBLISH_DOCS != "true"
# when: never
# - if: $RUN_BUMP_VERSION == "true"
# when: never
# - !reference [.rules-version-changed, rules]
# - !reference [.rules-push-manual, rules]
# ==============================================================================================================
publish-to-launcher:
rules:
- when: never
needs:
# extends:
# - .deploy-common
# - .omni_nvks_runner_with_docker
# script:
# - ls _build/packages/
# - ./repo.sh publish_launcher
# needs:
# - job: sign-windows-x86_64-release
# artifacts: true
# - job: build-linux-x86_64-release
# artifacts: true
# # - job: test-windows-x86_64-startuptests
# # artifacts: false
# # optional: true
# # - job: test-linux-x86_64-startuptests
# # artifacts: false
# # optional: true
# retry:
# max: 2
# when:
# - always
# rules:
# - if: $ALLOW_PUBLISH_TO_LAUNCHER != "true"
# when: never
# - if: $RUN_BUMP_VERSION == "true"
# when: never
# - !reference [.rules-version-changed, rules]
# - !reference [.rules-push-manual, rules]
# allow_failure: true
# extends:
# - .deploy-common
# - .omni_nvks_runner_with_docker
# script:
# - ./repo.sh ci publish_to_launcher
# needs:
# - job: build-windows-x86_64-release
# artifacts: true
# - job: build-linux-x86_64-release
# artifacts: true
# rules:
# - if: $ALLOW_PUBLISH_TO_LAUNCHER != "true"
# when: never
# - !reference [.rules-push-manual, rules]
# allow_failure: true
# ==============================================================================================================
release-new-version:
rules:
- when: never
# extends:
# - .deploy-common
# - .omni_nvks_runner_with_docker
# needs: []
# script:
# - ./repo.sh ci release_new_version
# rules:
# - if: $ALLOW_PUBLISH_TO_LAUNCHER != "true"
# when: never
# - !reference [.rules-push-manual, rules]
# allow_failure: true
# ==============================================================================================================
# update Kit SDK and extensions, merge master, typically done in daily branch
# set AUTOUPDATE_KIT=true for scheduled pipeline to run
autoupdate-kit:
rules:
- when: never
# extends:
# - .deploy-common
# - .omni_nvks_runner_with_docker
# needs: []
# script:
# - ./repo.sh ci autoupdate_kit
# rules:
# - if: $ALLOW_PUBLISH_TO_LAUNCHER != "true"
# when: never
# - if: $AUTOUPDATE_KIT == "true" && ($CI_PIPELINE_SOURCE == "web" || $CI_PIPELINE_SOURCE == "schedule")
# when: always