forked from NVIDIA/Megatron-LM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jet-tests.yml
81 lines (75 loc) · 2.29 KB
/
jet-tests.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
.jet_common:
stage: jet
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /Run tests/'
- if: $JET_CUSTOM_FILTER != "" && $CI_PIPELINE_SOURCE != 'merge_request_event'
- when: never
include:
- project: dl/jet/gitlab-templates
ref: main
file: downstreams.yml
jet-setup:
extends: [ .jet_common ]
tags:
- os/linux
script:
- set -x
- JET_FILTER=${JET_CUSTOM_FILTER:-False}
- echo "_JET_FILTER=$JET_FILTER" | tee -a config.env
artifacts:
reports:
dotenv: config.env
jet-configure:
image: gitlab-master.nvidia.com:5005/adlr/megatron-lm/ci_yq:v1
extends: [.jet_common, .jet-configure]
tags:
- os/linux
script:
- cd tests/functional_tests/jet_recipes
- |
if [[ $CI_PIPELINE_SOURCE == "merge_request_event" ]]; then
yq e ".spec.source.ref = \"merge-requests/${CI_MERGE_REQUEST_IID}/head\"" -i build-pyt.yaml
else
yq e ".spec.source.ref = \"${CI_COMMIT_REF_NAME}\"" -i build-pyt.yaml
fi
artifacts:
paths:
- tests/functional_tests/jet_recipes
jet-trigger:
stage: jet
extends: [.jet_common, .jet-trigger]
needs: [ jet-configure, jet-setup ]
trigger:
project: dl/jet/ci
branch: $JET_CLUSTER_BRANCH
strategy: depend
inherit:
variables:
- JET_CUSTOM_FILTER
- JET_CLUSTER_BRANCH
variables:
JET_WORKLOADS_FILTER: "$_JET_FILTER"
jet-results-summary:
stage: jet
image: gitlab-master.nvidia.com:5005/dl/jet/api:latest
tags:
- os/linux
needs: [ jet-trigger ]
before_script:
- jet secrets jwt-login jwt/nvidia/gitlab-master adlr-megatron-lm-ci $CI_JOB_JWT
script:
- python -m pip install -U --no-cache-dir prettytable
- rc=0
- python tests/functional_tests/python_test_utils/jet_test_pipeline.py ${CI_PIPELINE_ID} --test exit --artifact_links $CI_JOB_ID || rc=$?
- python tests/functional_tests/python_test_utils/jet_test_pipeline.py ${CI_PIPELINE_ID} --download_scripts_dir ./scripts || rc=$?
- exit $rc
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /Run tests/'
when: always
- if: $JET_CUSTOM_FILTER != "" && $CI_PIPELINE_SOURCE != 'merge_request_event'
when: always
- when: never
artifacts:
when: always
paths:
- scripts