-
Notifications
You must be signed in to change notification settings - Fork 4
132 lines (118 loc) · 4.76 KB
/
test_examples.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
name: Arduino examples tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-18.04
env:
GH_SERVICE_ACCOUNT_NAME: "tflite-bot"
GH_SERVICE_ACCOUNT_EMAIL: "tflite-bot@antmicro.com"
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
METRICS_VISUALIZER: renode/tools/metrics_analyzer/metrics_visualizer/metrics-visualizer.py
TENSORFLOW_PATH: "${{ github.workspace }}/tflite-micro"
steps:
- name: Configure git
run: |
git config --global user.name $GH_SERVICE_ACCOUNT_NAME
git config --global user.email $GH_SERVICE_ACCOUNT_EMAIL
- name: Checkout repository
uses: actions/checkout@v2
- name: Set Up Python
uses: actions/setup-python@v2
- name: Set Up Renode
run: |
mkdir -p renode
cd renode
wget https://dl.antmicro.com/projects/renode/builds/renode-latest.linux-portable.tar.gz
tar -xzf renode-latest.linux-portable.tar.gz --strip 1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r $GITHUB_WORKSPACE/renode/tests/requirements.txt
pip install -r $GITHUB_WORKSPACE/renode/tools/metrics_analyzer/metrics_visualizer/requirements.txt
./prepare.sh
- name: Test person_detection
run: |
./build.sh person_detection
cd examples/person_detection
$GITHUB_WORKSPACE/renode/test.sh *.robot
mkdir graphs
python $GITHUB_WORKSPACE/$METRICS_VISUALIZER person_detection.dump --no-dialogs -o graphs
- name: Upload person_detection artifacts
uses: actions/upload-artifact@v2
with:
name: person_detection_artifacts
path: |
examples/person_detection/report.html
examples/person_detection/log.html
examples/person_detection/robot_output.xml
examples/person_detection/person_detection.dump
examples/person_detection/graphs
- name: Test magic_wand
run: |
./build.sh magic_wand
cd examples/magic_wand
$GITHUB_WORKSPACE/renode/test.sh *.robot
mkdir ring_graphs
python $GITHUB_WORKSPACE/$METRICS_VISUALIZER magic_wand_ring.dump --no-dialogs -o ring_graphs
mkdir slope_graphs
python $GITHUB_WORKSPACE/$METRICS_VISUALIZER magic_wand_slope.dump --no-dialogs -o slope_graphs
- name: Upload magic_wand artifacts
uses: actions/upload-artifact@v2
with:
name: magic_wand_artifacts
path: |
examples/magic_wand/report.html
examples/magic_wand/log.html
examples/magic_wand/robot_output.xml
examples/magic_wand/*.dump
examples/person_detection/ring_graphs
examples/person_detection/slope_graphs
- name: Test hello_world
run: |
./build.sh hello_world
cd examples/hello_world
$GITHUB_WORKSPACE/renode/test.sh *.robot
mkdir graphs
python $GITHUB_WORKSPACE/$METRICS_VISUALIZER hello_world.dump --no-dialogs -o graphs
- name: Upload hello_world artifacts
uses: actions/upload-artifact@v2
with:
name: hello_world_artifacts
path: |
examples/hello_world/report.html
examples/hello_world/log.html
examples/hello_world/robot_output.xml
examples/hello_world/*.dump
examples/person_detection/graphs
- name: Test micro_speech
run: |
./build.sh micro_speech
cd examples/micro_speech
$GITHUB_WORKSPACE/renode/test.sh *.robot
mkdir graphs
python $GITHUB_WORKSPACE/$METRICS_VISUALIZER micro_speech.dump --no-dialogs -o graphs
- name: Upload micro_speech artifacts
uses: actions/upload-artifact@v2
with:
name: micro_speech_artifacts
path: |
examples/micro_speech/report.html
examples/micro_speech/log.html
examples/micro_speech/robot_output.xml
examples/micro_speech/*.dump
- name: Upload binaries
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
git clone /~https://github.com/antmicro/tensorflow-arduino-examples-binaries.git
cp -r examples/*/binaries/* tensorflow-arduino-examples-binaries
cd tensorflow-arduino-examples-binaries
git add .
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Upload binaries";
git push -u https://$GH_SERVICE_ACCOUNT_NAME:$GH_SERVICE_ACCOUNT_TOKEN@github.com/antmicro/tensorflow-arduino-examples-binaries.git master
else
echo "no changes";
fi