-
Notifications
You must be signed in to change notification settings - Fork 969
290 lines (261 loc) · 8.68 KB
/
build-and-test.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
name: Build and test
on:
push:
branches: [tengine-lite]
paths:
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_EN.md'
pull_request:
branches: [tengine-lite]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_EN.md'
jobs:
android-armv7-cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a" -DANDROID_PLATFORM=android-19 ..
- name: build
run: cmake --build build -j 2
android-armv8-cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 ..
- name: build
run: cmake --build build -j 2
linux-armv7-cpu-gcc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: cache-qemu
id: cache-qemu
uses: actions/cache@v3
with:
path: qemu-install
key: qemu-arm-install-1
- name: checkout-qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: qemu/qemu
path: qemu
ref: 8746309137ba470d1b2e8f5ce86ac228625db940
- name: qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
run: |
cd qemu
./configure --prefix=install --target-list=arm-linux-user --disable-system
make -j2
make install
cp -r arm-linux-user/install $GITHUB_WORKSPACE/qemu-install
- name: arm-gnu-toolchain
run: |
sudo apt-get update
sudo apt-get install g++-arm-linux-gnueabi
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabi.toolchain.cmake -DTENGINE_BUILD_TESTS=ON ..
- name: build
run: cmake --build build -j 2
linux-armv8-cpu-gcc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: cache-qemu
id: cache-qemu
uses: actions/cache@v3
with:
path: qemu-install
key: qemu-aarch64-install-1
- name: checkout-qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: qemu/qemu
path: qemu
ref: 8746309137ba470d1b2e8f5ce86ac228625db940
- name: qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
run: |
cd qemu
./configure --prefix=install --target-list=aarch64-linux-user --disable-system
make -j2
make install
cp -r aarch64-linux-user/install $GITHUB_WORKSPACE/qemu-install
- name: aarch64-gnu-toolchain
run: |
sudo apt-get update
sudo apt-get install g++-aarch64-linux-gnu
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake -DTENGINE_BUILD_TESTS=ON ..
- name: build
run: cmake --build build -j 2
linux-gcc-mipsisa64r6el:
runs-on: ubuntu-20.04
steps:
- name: cancel-previous-runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: cache-qemu
id: cache-qemu
uses: actions/cache@v3
with:
path: qemu-install
key: qemu-mips64el-install-1
- name: checkout-qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: qemu/qemu
path: qemu
ref: 8746309137ba470d1b2e8f5ce86ac228625db940
- name: qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
run: |
cd qemu
./configure --prefix=install --target-list=mips64el-linux-user --disable-system
make -j2
make install
cp -r mips64el-linux-user/install $GITHUB_WORKSPACE/qemu-install
- name: mipsisa64r6el-gnuabi64-toolchain
run: |
sudo apt-get update
sudo apt-get install g++-mipsisa64r6el-linux-gnuabi64
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/mipsisa64r6el-linux-gnuabi64.toolchain.cmake -DTENGINE_BUILD_EXAMPLES=OFF ..
- name: build
run: cmake --build build -j 2
windows-x64-cpu-vs2017:
runs-on: windows-2016
steps:
- uses: actions/checkout@v3
- name: build
run: |
mkdir build; cd build
cmake -T v141,host=x64 -A x64 -DTENGINE_OPENMP=OFF -DTENGINE_BUILD_EXAMPLES=OFF ..
cmake --build . --config Release -j 2
windows-x64-cpu-vs2019:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: build
run: |
mkdir build; cd build
cmake -A x64 -DTENGINE_BUILD_EXAMPLES=OFF ..
cmake --build . --config Release -j 2
windows-x86-cpu-vs2017:
runs-on: windows-2016
steps:
- uses: actions/checkout@v3
- name: build
run: |
mkdir build; cd build
cmake -T v141,host=x64 -A Win32 -DTENGINE_OPENMP=OFF -DTENGINE_BUILD_EXAMPLES=OFF ..
cmake --build . --config Release -j 2
windows-x86-cpu-vs2019:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: build
run: |
mkdir build; cd build
cmake -T v142,host=x64 -A Win32 -DTENGINE_BUILD_EXAMPLES=OFF ..
cmake --build . --config Release -j 2
linux-x64-timvx-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: update
run: sudo apt-get update
- name: libopencv
run: sudo apt-get install libopencv-dev
- name: tim-vx
run: |
git clone https://github.com/VeriSilicon/TIM-VX.git
export LD_LIBRARY_PATH=${PWD}/3rdparty/tim-vx/lib/x86_64
mkdir -p ./3rdparty/tim-vx/include
mkdir -p ./3rdparty/tim-vx/lib/x86_64
cp -rvf ./TIM-VX/prebuilt-sdk/x86_64_linux/include/* ./3rdparty/tim-vx/include/
cp -rvf ./TIM-VX/prebuilt-sdk/x86_64_linux/lib/* ./3rdparty/tim-vx/lib/x86_64/
cp -rvf ./TIM-VX/include ./source/device/tim-vx/
cp -rvf ./TIM-VX/src ./source/device/tim-vx/
rm ./source/device/tim-vx/src/tim/vx/*_test.cc
rm ./source/device/tim-vx/src/tim/vx/ops/*_test.cc
- name: configure
run: mkdir build && cd build && cmake -DTENGINE_ENABLE_TIM_VX=ON ..
- name: build
run: cmake --build build -j 2
linux-aarch64-timvx-gcc:
runs-on: vim3
steps:
- uses: actions/checkout@v3
- name: tim-vx
run: |
git clone https://github.com/VeriSilicon/TIM-VX.git
cp -rvf ./TIM-VX/include ./source/device/tim-vx/
cp -rvf ./TIM-VX/src ./source/device/tim-vx/
rm ./source/device/tim-vx/src/tim/vx/*_test.cc
rm ./source/device/tim-vx/src/tim/vx/ops/*_test.cc
- name: configure
run: mkdir build && cd build && cmake -DTENGINE_BUILD_TESTS=ON -DTENGINE_ENABLE_TIM_VX=ON ..
- name: build
run: cmake --build build -j 4
linux-x64-cpu-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: update
run: sudo apt-get update
- name: depends
run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev
- name: configure
run: mkdir build && cd build && cmake ..
- name: build
run: cmake --build build -j 2
linux-x64-cpu-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: update
run: sudo apt-get update
- name: depends
run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev
- name: configure
env:
CC: clang
CXX: clang++
run: mkdir build && cd build && cmake -DTENGINE_BUILD_TESTS=ON -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX ..
- name: build
run: cmake --build build -j 2
linux-x64-cpu-tools-convert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: update
run: |
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler
- name: configure
run: mkdir build && cd build && cmake -DTENGINE_BUILD_CONVERT_TOOL=ON ..
- name: build
run: cmake --build build -j 2
linux-x64-cpu-tools-quant:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: update
run: |
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev
- name: configure
run: mkdir build && cd build && cmake -DTENGINE_BUILD_QUANT_TOOL=ON ..
- name: build
run: cmake --build build -j2