blob: cf026582145f1990dfb3f9195b4de618e439c234 (
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
|
#!/bin/bash -xe
sudo apt-get update
sudo apt-get install -y python3-requests
# Build scripts
ANDROID_BUILD_DIR="${HOME}/srv/${JOB_NAME}/android"
ART_BUILD_SCRIPTS_DIR="${WORKSPACE}/art-build-scripts"
git clone https://android-git.linaro.org/git/linaro-art/art-build-scripts.git ${ART_BUILD_SCRIPTS_DIR}
cd ${ART_BUILD_SCRIPTS_DIR}/jenkins
# Port forwarding magic to have access to Nexus devices
source /home/buildslave/srv/nexus-config
export ANDROID_SERIAL=${BULLHEAD}
./setup_host.sh
./setup_android.sh
cd ${ANDROID_BUILD_DIR}
alias python=python3
perl scripts/jenkins/test_launcher.pl \
scripts/benchmarks/benchmarks_run_target.sh --skip-run true
tar --exclude-vcs -cJf test-tree.txz \
art/ \
scripts/ \
external-benchmarks/ \
benchmarks/ \
device/generic/art/ \
build/ \
Makefile \
Android.bp \
bootstrap.bash \
prebuilts/build-tools/ \
prebuilts/go/linux-x86/ \
prebuilts/jdk/jdk11/ \
external/golang-protobuf/
readonly out_krait=out/target/product/arm_krait
readonly out_armv8=out/target/product/armv8
readonly out_host=out/host/linux-x86
tar -cJf test-arm-fs.txz ${out_host}/bin/ ${out_host}/framework/ ${out_krait}/data/ \
${out_krait}/system/ ${out_krait}/linkerconfig/ out/target/common
tar -cJf test-armv8-fs.txz ${out_host}/bin/ ${out_host}/framework/ ${out_armv8}/data/ \
${out_armv8}/system/ ${out_armv8}/linkerconfig/ out/target/common
mkdir -p pub
mv ${WORKSPACE}/*.xml *.txz pub/
PUB_DEST=${PUB_DEST:-/android/${JOB_NAME}/${BUILD_NUMBER}}
# Only grant access to artifacts to the linaro-art group.
cat << EOF > ${WORKSPACE}/BUILD-INFO.txt
Format-Version: 0.5
Files-Pattern: *
License-Type: protected
Auth-Groups: linaro-art
EOF
# Publish
test -d ${HOME}/bin || mkdir ${HOME}/bin
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 \
--manifest \
--build-info ${WORKSPACE}/BUILD-INFO.txt \
--link-latest \
--split-job-owner \
--server ${PUBLISH_SERVER} \
./pub/ \
${PUB_DEST} \
--include "^[^/]+[._](img[^/]*|tar[^/]*|xml|sh|config|txz)$" \
--include "^[BHi][^/]+txt$" \
--include "^(MANIFEST|MD5SUMS|changelog.txt)$"
# Construct post-build-lava parameters
cat << EOF > ${WORKSPACE}/post_build_lava_parameters
DEVICE_TYPE=pixel3
TARGET_PRODUCT=pixel
MAKE_TARGETS=droidcore
JOB_NAME=${JOB_NAME}
BUILD_NUMBER=${BUILD_NUMBER}
BUILD_URL=${BUILD_URL}
LAVA_SERVER=validation.linaro.org/RPC2/
GERRIT_CHANGE_NUMBER=${GERRIT_CHANGE_NUMBER}
GERRIT_PATCHSET_NUMBER=${GERRIT_PATCHSET_NUMBER}
GERRIT_CHANGE_URL=${GERRIT_CHANGE_URL}
GERRIT_CHANGE_ID=${GERRIT_CHANGE_ID}
FRONTEND_JOB_NAME=${JOB_NAME}
DOWNLOAD_URL=http://snapshots.linaro.org/android/$JOB_NAME/$BUILD_NUMBER
CUSTOM_JSON_URL=https://git.linaro.org/qa/test-plans.git/plain/android/pixel3/microbenchmarks_32.yaml
SKIP_REPORT=true
QA_REPORTS_TOKEN=${QA_REPORTS_TOKEN}
EOF
|