-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (59 loc) · 2.02 KB
/
runs_on_nv.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
name: runs on nv
on:
workflow_dispatch:
inputs:
run_test_use_pytorch:
description: 'Run Test_use_pytorch job'
required: false
default: 'false'
push:
branches:
- main
tags:
- 'v*'
pull_request:
env:
DEEPLINK_PATH: '/mnt/cache/share/deeplinkci/github/${{ github.repository }}'
concurrency:
group: nv-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
checkout_code:
name: checkout code
runs-on: tps-sco-ci
steps:
- name: Checkout Code
uses: DeepLink-org/ditorch/.github/actions/checkout-code@main
Build:
name: build on nv
runs-on: tps-sco-ci
needs: [checkout_code]
steps:
- name: build
run: |
set -ex
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${GITHUB_JOB} && cp -R source ${GITHUB_JOB} && cd ${GITHUB_JOB}
echo "start to build"
Test:
name: test on nv
runs-on: tps-sco-ci
needs: [Build]
steps:
- name: test
run: |
set -ex
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${GITHUB_JOB} && cp -R Build ${GITHUB_JOB} && cd ${GITHUB_JOB}
echo "start to test"
srun --job-name=${GITHUB_JOB} bash -c "source /mnt/cache/share/platform/env/ditorch_env && cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${GITHUB_JOB} && export PYTHONPATH=${PYTHONPATH}:$PWD && bash ci/run_op_tools_test_cases.sh"
Test_use_pytorch_test_case:
name: run pytorch test case on nv
runs-on: tps-sco-ci
if: ${{ github.event.inputs.run_test_use_pytorch == 'true' }}
needs: [Build]
steps:
- name: test
run: |
set -ex
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${GITHUB_JOB} && cp -R Build ${GITHUB_JOB} && cd ${GITHUB_JOB}
echo "start to test"
srun --job-name=${GITHUB_JOB} bash -c "source /mnt/cache/share/platform/env/ditorch_env && cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${GITHUB_JOB} && export PYTHONPATH=${PYTHONPATH}:$PWD && bash ci/run_pytorch_test_cases.sh"