blob: b68ed57869dd621cda8e6a8eacc9130c92d8203b (
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
|
- job:
name: android-gcc-toolchain
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-read
- job-extended-read
- job-build
- job-cancel
- build-discarder:
days-to-keep: 60
num-to-keep: 60
artifact-num-to-keep: 1
parameters:
- string:
name: GCCVER
default: '6.1.0'
description: 'GCC version (e.g. x.y.z or x.y-YYYY.MM for TCWG releases)'
disabled: false
node: docker-utopic-aosp
display-name: 'GCC based AOSP toolchain'
triggers:
- gerrit:
server-name: __ANY__
trigger-on:
- change-merged-event
projects:
- project-compare-type: 'PLAIN'
project-pattern: 'people/bernhard.rosenkranzer/android-ndk-build'
branches:
- branch-compare-type: 'PLAIN'
branch-pattern: 'master'
file-paths:
- compare-type: 'PLAIN'
pattern: 'init-and-build.sh'
wrappers:
- timestamps
- timeout:
timeout: 500
scm:
- git:
url: https://git.linaro.org/people/bernhard.rosenkranzer/android-ndk-build.git
refspec: +refs/heads/master:refs/remotes/origin/master
name: origin
branches:
- refs/heads/master
basedir: android-ndk-build
skip-tag: true
shallow-clone: true
clean:
after: true
wipe-workspace: false
builders:
- linaro-publish-token
- shell: |
#!/bin/bash
# Install build dependencies
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y \
autoconf automake bash bison build-essential bzip2 chrpath \
coreutils cpio flex g++ gawk gcc git gzip libffi-dev libncurses5-dev \
make realpath sed tar texi2html texinfo unzip wget python-requests
test -d ${HOME}/bin || mkdir -p ${HOME}/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo
chmod a+x ${HOME}/bin/repo
export PATH=${HOME}/bin:${PATH}
# Set some reasonable defaults
git config --global user.email "ci_notify@linaro.org"
git config --global user.name "Linaro CI"
# Set up our build environment
cd ${WORKSPACE}/android-ndk-build
GCCVER=${GCCVER} OURDIR="${WORKSPACE}/android-ndk-build" ./init-and-build.sh 2>&1 |tee ${WORKSPACE}/build.log || :
if [ ! -e ${WORKSPACE}/android-ndk-build/ndk/out/dist/gcc-arm-linux-x86_64.tar.bz2 ]; then
echo "ARMv7 crosscompiler failed to build"
exit 1
fi
if [ ! -e ${WORKSPACE}/android-ndk-build/ndk/out/dist/gcc-arm64-linux-x86_64.tar.bz2 ]; then
echo "ARMv8 crosscompiler failed to build"
exit 1
fi
# Let's save some space and assign better filenames
cd ${WORKSPACE}/android-ndk-build/ndk/out/dist
bunzip2 gcc-arm-linux-x86_64.tar.bz2
mv gcc-arm-linux-x86_64.tar gcc-${GCCVER}-arm-linux-x86_64.tar
bunzip2 gcc-arm64-linux-x86_64.tar.bz2
mv gcc-arm64-linux-x86_64.tar gcc-${GCCVER}-arm64-linux-x86_64.tar
xz -9ef *.tar
# And remove stuff we don't need
rm -rf *.tar.bz2 *.zip logs
# Publish
wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python ${HOME}/bin/linaro-cp.py \
--api_version 3 \
--link-latest \
${WORKSPACE}/android-ndk-build/ndk/out/dist android/${JOB_NAME}/${BUILD_NUMBER}
publishers:
- archive:
artifacts: '*.log'
- email:
recipients: 'bernhard.rosenkranzer@linaro.org'
|