forked from modelbox-ai/modelbox
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (64 loc) · 1.63 KB
/
unit-test-pull-requests-on-device.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
name: Pull-Requests Unit Test On Device
on:
workflow_dispatch:
inputs:
PullRequestId:
description: Pull Request ID
default: ""
required: true
maxParallel:
type: choice
description: Max Parallel
default: 4
options:
- 1
- 2
- 4
- 6
- 8
WithWebUI:
type: choice
description: build with webui or not
options:
- OFF
- ON
WithClangTidy:
type: choice
description: build with clang-tidy or not
options:
- OFF
- ON
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ${{ matrix.devices }}
strategy:
max-parallel: 2
matrix:
devices:
- tensorrt
- pytorch
- tensorflow
- ubuntu-d310p
steps:
- uses: actions/checkout@v3
with:
ref: pull/${{github.event.inputs.PullRequestId}}/head
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_WEBUI=${{github.event.inputs.WithWebUI}} -DCLANG_TIDY=${{github.event.inputs.WithClangTidy}} -DCLANG_TIDY_AS_ERROR=on
- name: Build
working-directory: build
run: |
make package -j${{github.event.inputs.maxParallel}}
- name: Test
working-directory: build
run: |
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}') || true
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1
make build-test -j${{github.event.inputs.maxParallel}}
unset LD_LIBRARY_PATH
make unittest