blob: 7bf9659736316ce09b6e249f3839d9e9c783a7eb (
plain)
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
|
- job:
name: armnn-ci-build
display-name: 'Arm NN - CI Build'
concurrent: true
project-type: freestyle
defaults: global
description: |
Updates source and builds ArmNN frequently to ensure builds are successful.
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-read
- job-extended-read
- job-build
- job-cancel
- build-discarder:
days-to-keep: 90
num-to-keep: 90
- github:
url: https://git.mlplatform.org/ml/armnn.git
triggers:
- gerrit:
override-votes: true
gerrit-build-failed-verified-value: -1
trigger-on:
- patchset-created-event:
exclude-drafts: true
exclude-trivial-rebase: true
exclude-no-code-change: true
- comment-added-contains-event:
comment-contains-value: 'TRIGGER BUILD'
projects:
- project-compare-type: 'PLAIN'
project-pattern: 'ml/armnn'
branches:
- branch-compare-type: 'PLAIN'
branch-pattern: 'master'
#silent: true
skip-vote:
successful: true
failed: false
server-name: review.mlplatform.org
parameters:
- string:
name: LAVA_SERVER
default: 'https://validation.linaro.org/RPC2/'
- string:
name: GIT_COM_ID
disabled: false
node: docker-bionic-arm64-armnn
wrappers:
- timestamps
- credentials-binding:
- text:
credential-id: QA_REPORTS_TOKEN
variable: QA_REPORTS_TOKEN
builders:
- shell: |
git clone https://github.com/K1504296/armnn-ci.git
cd armnn-ci && bash -ex arm-builders.sh
- shell: |
#!/bin/bash -e
echo "DEVICE_TYPE=${DEVICE_TYPE}" > device_type_parameters
- inject:
properties-file: device_type_parameters
- linaro-publish-token
- shell: |
#!/bin/bash
set -ex
sudo apt-get install -y jq
if [ -z "$GIT_COM_ID" ]
then
LAVA_ID=${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}
ARMNN_TAR_LOCATION=https://snapshots.linaro.org/components/armnn/${BUILD_NUMBER}/armnn.tar.xz
else
LAVA_ID=$GIT_COM_ID
ARMNN_TAR_LOCATION=https://snapshots.linaro.org/components/armnn-master/${BUILD_NUMBER}/armnn.tar.xz
fi
jq -n --arg 'LAVA_ID' $LAVA_ID \
--arg 'ARMNN_TAR_LOCATION' $ARMNN_TAR_LOCATION \
--arg 'BUILD_NUMBER' $BUILD_NUMBER \
'{LAVA_ID:$LAVA_ID, ARMNN_TAR_LOCATION:$ARMNN_TAR_LOCATION, BUILD_NUMBER:$BUILD_NUMBER}' > out/buildInfo.json
# Publish
test -d ${HOME}/bin || mkdir ${HOME}/bin
if [ -z "$GIT_COM_ID" ]
then
wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python3 ${HOME}/bin/linaro-cp.py \
--link-latest \
out/ components/armnn/${BUILD_NUMBER}
else
wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python3 ${HOME}/bin/linaro-cp.py \
--link-latest \
out/ components/armnn-master/${BUILD_NUMBER}
fi
- shell: |
#!/bin/bash -ex
export DEVICE_TYPE=hi960-hikey
if [ -z "$GIT_COM_ID" ]
then
LAVA_ID=${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}
ARMNN_TAR_LOCATION=https://snapshots.linaro.org/components/armnn/${BUILD_NUMBER}/armnn.tar.xz
else
LAVA_ID=$GIT_COM_ID
ARMNN_TAR_LOCATION=https://snapshots.linaro.org/components/armnn-master/${BUILD_NUMBER}/armnn.tar.xz
fi
cat << EOF > ${WORKSPACE}/submit_for_testing_parameters
LAVA_JOB_PRIORITY=50
PROJECT_NAME=armnn
PROJECT=projects/armnn/
ARMNN_TARBALL_URL=${ARMNN_TAR_LOCATION}
BOOT_URL=http://snapshots.linaro.org/96boards/hikey/linaro/debian/30/boot-linaro-stretch-developer-hikey-20190420-30.img.gz
BOOT_URL_COMP=gz
ROOTFS_URL=http://snapshots.linaro.org/96boards/hikey/linaro/debian/30/rootfs-linaro-stretch-developer-hikey-20190420-30.img.gz
ROOTFS_URL_COMP=gz
DEPLOY_OS=debian
OS_INFO=debian
DEVICE_TYPE=${DEVICE_TYPE}
BUILD_NUMBER=${BUILD_NUMBER}
EOF
git clone --depth 1 https://github.com/Linaro/lava-test-plans.git
curl \
--header "Auth-Token: $QA_REPORTS_TOKEN" \
--form patch_source=gerrit-ssh-mlplatform \
--form patch_id=${GERRIT_CHANGE_NUMBER}:${GERRIT_PATCHSET_NUMBER} \
https://qa-reports.linaro.org/api/createbuild/armnn/armnn/$LAVA_ID
# submit tests to LAVA
rm -rf venv | true
virtualenv -p python3 venv
source ./venv/bin/activate
# fix for setuptools v50
export SETUPTOOLS_USE_DISTUTILS="stdlib"
cd lava-test-plans
pip3 install -r requirements.txt
./submit_for_testing.py --variables ${WORKSPACE}/submit_for_testing_parameters \
--device-type ${DEVICE_TYPE} \
--test-plan armnn \
--qa-server-team armnn \
--qa-server-project armnn \
--lava-server ${LAVA_SERVER} \
--build-id ${LAVA_ID}
export DEVICE_TYPE=synquacer
cat << EOF > ${WORKSPACE}/submit_for_testing_parameters
LAVA_JOB_PRIORITY=50
PROJECT_NAME=armnn
PROJECT=projects/armnn/
AUTO_LOGIN_PASSWORD_PROMPT='Password:'
AUTO_LOGIN_PASSWORD='Linaro123'
ARMNN_TARBALL_URL=${ARMNN_TAR_LOCATION}
KERNEL_URL=http://images.validation.linaro.org/synquacer/hc/vmlinuz
RAMDISK_URL=http://images.validation.linaro.org/synquacer/hc/initrd.img
RAMDISK_URL_COMP=gz
ROOTFS_URL=http://images.validation.linaro.org/synquacer/hc/rootfs.tar.xz
ROOTFS_URL_COMP=xz
DEPLOY_OS=debian
OS_INFO=debian
DEVICE_TYPE=${DEVICE_TYPE}
BUILD_NUMBER=${BUILD_NUMBER}
EOF
./submit_for_testing.py --variables ${WORKSPACE}/submit_for_testing_parameters \
--device-type ${DEVICE_TYPE} \
--test-plan armnn \
--qa-server-team armnn \
--qa-server-project armnn \
--lava-server ${LAVA_SERVER} \
--build-id ${LAVA_ID}
export DEVICE_TYPE=dragonboard-845c
cat << EOF > ${WORKSPACE}/submit_for_testing_parameters
LAVA_JOB_PRIORITY=50
PROJECT_NAME=armnn
PROJECT=projects/armnn/
ARMNN_TARBALL_URL=${ARMNN_TAR_LOCATION}
PTABLE_URL=https://images.validation.linaro.org/snapshots.linaro.org/96boards/dragonboard845c/linaro/rescue/28/dragonboard-845c-bootloader-ufs-linux-28/gpt_both0.bin
BOOT_URL=http://images.validation.linaro.org/releases.linaro.org/96boards/dragonboard845c/linaro/debian/19.09/boot-linaro-buster-dragonboard-845c-58.img.gz
BOOT_URL_COMP=gz
ROOTFS_URL=http://images.validation.linaro.org/releases.linaro.org/96boards/dragonboard845c/linaro/debian/19.09/linaro-buster-alip-dragonboard-845c-58.img.gz
ROOTFS_URL_COMP=gz
DEPLOY_OS=debian
OS_INFO=debian
DEVICE_TYPE=${DEVICE_TYPE}
BUILD_NUMBER=${BUILD_NUMBER}
EOF
./submit_for_testing.py --variables ${WORKSPACE}/submit_for_testing_parameters \
--device-type ${DEVICE_TYPE} \
--test-plan armnn \
--qa-server-team armnn \
--qa-server-project armnn \
--lava-server ${LAVA_SERVER} \
--build-id ${LAVA_ID}
|