forked from RavirajSitaram/webnn-native
-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (133 loc) · 4.8 KB
/
build_test_node_openvino_windows.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
name: Node Binding (OpenVINO backend / Windows)
on: [push, pull_request]
jobs:
job:
runs-on: windows-latest
env:
OPENVINO_VERSION: 2021.4.582
steps:
- name: Git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Install depot_tools
shell: cmd
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ..\depot_tools
set "PATH=%CD%\..\depot_tools;%PATH%"
gclient
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Download OpenVINO Toolkit
shell: pwsh
run: |
Import-Module BitsTransfer
Start-BitsTransfer -Source https://registrationcenter-download.intel.com/akdlm/irc_nas/17987/w_openvino_toolkit_p_${{ env.OPENVINO_VERSION }}.exe -Destination w_openvino_toolkit_p_${{ env.OPENVINO_VERSION }}.exe
- name: Install OpenVINO Toolkit
shell: cmd
run: |
.\w_openvino_toolkit_p_${{ env.OPENVINO_VERSION }}.exe --s --f temp --r yes --a install --eula=accept --output=install_status.txt
"C:\Program Files (x86)\Intel\openvino_2021\bin\setupvars.bat"
- uses: actions/checkout@v2
with:
ref: main
path: baseline
fetch-depth: 0
- name: Sync code for main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd baseline
copy scripts\standalone.gclient .gclient
gclient sync
- name: Generate project for main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd baseline
gn gen out\Release --args="webnn_enable_openvino=true is_debug=false"
- name: Build for main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd baseline
ninja -C out\Release
- name: Run 'npm install' command under node folder of main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%CD%\baseline\out\Release;%PATH%"
cd baseline\node
npm install --webnn_native_lib_path="../out/Release"
- name: Run 'npm run build' command under node folder of main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%CD%\baseline\out\Release;%PATH%"
cd baseline\node
npm run build --webnn_native_lib_path="../out/Release"
- name: Run node test for main branch
shell: cmd
run: |
baseline\workflow_scripts\test_by_openvino_windows.bat baseline node || true
- name: Prepare baseline result file for regression checking
shell: cmd
run: |
echo "Baseline node test result:"
type baseline\node\result.xml
copy baseline\node\result.xml ${{ github.workspace }}\..\baseline.xml
- uses: actions/checkout@v2
with:
path: update
fetch-depth: 0
- name: Sync latest code
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd update
copy scripts\standalone.gclient .gclient
gclient sync
- name: Generate project for update branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd update
gn gen out\Release --args="webnn_enable_openvino=true is_debug=false"
- name: Build for update branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd update
ninja -C out\Release
- name: Run 'npm install' command under node folder of update branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%CD%\update\out\Release;%PATH%"
cd update\node
npm install --webnn_native_lib_path="../out/Release"
- name: Run 'npm run build' command under node folder of update branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%CD%\update\out\Release;%PATH%"
cd update\node
npm run build --webnn_native_lib_path="../out/Release"
- name: Run node test for update branch
shell: cmd
run: |
update\workflow_scripts\test_by_openvino_windows.bat update node || true
- name: Prepare latest result file for regression checking
shell: cmd
run: |
echo "Latest node test result:"
type update\node\result.xml
copy 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