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