forked from webmachinelearning/webnn-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_test_node_openvino_linux.yml
More file actions
137 lines (113 loc) · 4.13 KB
/
Copy pathbuild_test_node_openvino_linux.yml
File metadata and controls
137 lines (113 loc) · 4.13 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
name: Node Binding (OpenVINO backend / Linux)
on: [push, pull_request]
jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Install depot_tools
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools
export PATH=$PWD/../depot_tools:$PATH
gclient
- name: Install OpenVINO Toolkit
run: |
export version="2021.4.582"
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/17988/l_openvino_toolkit_p_${version}.tgz
tar -xvzf l_openvino_toolkit_p_${version}.tgz
cd l_openvino_toolkit_p_${version}
sudo ./install.sh -s --install_dir /opt/intel --accept_eula
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: actions/checkout@v2
with:
ref: main
path: baseline
fetch-depth: 0
- name: Sync code for main branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd baseline
cp scripts/standalone.gclient .gclient
gclient sync
- name: Generate project for main branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd baseline
gn gen out/Release --args="webnn_enable_openvino=true is_debug=false"
- name: Build for main branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd baseline
ninja -C out/Release
- name: Run 'npm install' command under node folder of main branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd baseline/node
npm install --webnn_native_lib_path="../out/Release"
- name: Run 'npm run build' command under node folder of main branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd baseline/node
npm run build --webnn_native_lib_path="../out/Release"
- name: Run 'npm run report' command under node folder of main branch
run: |
export PATH=$PWD/../depot_tools:$PATH
source /opt/intel/openvino_2021/bin/setupvars.sh
cd baseline/node
npm run report || true
- name: Prepare baseline result file for regression checking
run: |
echo "Baseline node test result:"
cat baseline/node/result.xml
cp baseline/node/result.xml ${{ github.workspace }}/../baseline.xml
- uses: actions/checkout@v2
with:
path: update
fetch-depth: 0
- name: Sync latest code
run: |
export PATH=$PWD/../depot_tools:$PATH
cd update
cp scripts/standalone.gclient .gclient
gclient sync
- name: Generate project for update branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd update
gn gen out/Release --args="webnn_enable_openvino=true is_debug=false"
- name: Build for update branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd update
ninja -C out/Release
- name: Run 'npm install' command under node folder of update branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd update/node
npm install --webnn_native_lib_path="../out/Release"
- name: Run 'npm run build' command under node folder of update branch
run: |
export PATH=$PWD/../depot_tools:$PATH
cd update/node
npm run build --webnn_native_lib_path="../out/Release"
- name: Run 'npm run report' command under node folder of update branch
run: |
export PATH=$PWD/../depot_tools:$PATH
source /opt/intel/openvino_2021/bin/setupvars.sh
cd update/node
npm run report || true
- name: Prepare latest result file for regression checking
run: |
echo "Latest node test result:"
cat update/node/result.xml
cp update/node/result.xml ${{ github.workspace }}/../update.xml
- name: Regression check
run: |
echo "Regression checking..."
python update/workflow_scripts/regression_check.py ${{ github.workspace }}/../baseline.xml ${{ github.workspace }}/../update.xml