-
Notifications
You must be signed in to change notification settings - Fork 21
125 lines (105 loc) · 3.8 KB
/
build_test_null.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
name: null backend
on: [push, pull_request]
jobs:
job:
runs-on: windows-2019
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.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: actions/checkout@v2
with:
ref: main
path: baseline
fetch-depth: 0
- name: Update DEPS for main branch
shell: pwsh
run: |
cd baseline
(Get-Content -path .\DEPS -Raw) -replace "'checkout_onnxruntime': True", "'checkout_onnxruntime': False" | Set-Content -path .\DEPS
(Get-Content -path .\DEPS -Raw) -replace "'checkout_polyfill': True", "'checkout_polyfill': False" | Set-Content -path .\DEPS
(Get-Content -path .\DEPS -Raw) -replace "'checkout_samples': True", "'checkout_samples': False" | Set-Content -path .\DEPS
- 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_null=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: Test for main branch
shell: cmd
run: |
cd baseline
echo "Run Unit Tests..."
out\Release\webnn_unittests.exe --gtest_output=json:${{ github.workspace }}\..\baseline_unittests.json
cd ..
rmdir /s /q baseline
- uses: actions/checkout@v2
with:
path: update
fetch-depth: 0
- name: Update DEPS for update branch
shell: pwsh
run: |
cd update
(Get-Content -path .\DEPS -Raw) -replace "'checkout_onnxruntime': True", "'checkout_onnxruntime': False" | Set-Content -path .\DEPS
(Get-Content -path .\DEPS -Raw) -replace "'checkout_polyfill': True", "'checkout_polyfill': False" | Set-Content -path .\DEPS
(Get-Content -path .\DEPS -Raw) -replace "'checkout_samples': True", "'checkout_samples': False" | Set-Content -path .\DEPS
- 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_null=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: Test for update branch
shell: cmd
run: |
cd update
echo "Run Unit Tests..."
out\Release\webnn_unittests.exe --gtest_output=json:${{ github.workspace }}\..\update_unittests.json || true
- name: Regression check
run: |
echo "Regression checking..."
python update\workflow_scripts\regression_check.py ${{ github.workspace }}\..\baseline_unittests.json ${{ github.workspace }}\..\update_unittests.json