blob: 731827208790271aeff412aa682e05f5972f1324 (
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
|
- job:
name: tcwg-test-release-matrix
project-type: matrix
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 60
num-to-keep: 100
parameters:
- string:
name: tarball_url
default: ''
description: 'The GCC binary tarball to test'
- string:
name: scripts_branch
default: refs/remotes/origin/master
description: 'Scripts revision to use '
- string:
name: build_container_tag
default: 'trusty'
description: 'Distro to use for the container: trusty, xenial.'
- string:
name: release
default:
description: 'Release name'
- string:
name: target_list
default: 'aarch64-elf aarch64-linux-gnu aarch64_be-elf aarch64_be-linux-gnu armv8l-linux-gnueabihf arm-eabi arm-linux-gnueabi arm-linux-gnueabihf armeb-eabi armeb-linux-gnueabi armeb-linux-gnueabihf'
description: 'List of targets to use'
- bool:
name: debug
default: false
description: 'Whether to enable bash debugging output.'
disabled: false
node: tcwg-x86_64-dev-01
retry-count: 3
concurrent: true
display-name: 'TCWG Test Release matrix'
scm:
- git:
url: https://git-us.linaro.org/toolchain/jenkins-scripts.git
refspec: +refs/changes/*:refs/remotes/changes/*
branches:
- ${scripts_branch}
skip-tag: true
shallow-clone: true
wipe-workspace: true
axes:
- axis:
type: slave
name: label
values:
- tcwg-x86_32-build
- tcwg-x86_64-build
- axis:
type: dynamic
name: target
values:
- target_list
execution-strategy:
sequential: false
wrappers:
- timeout:
timeout: 300
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
- build-name:
name: '#${BUILD_NUMBER}-${ENV,var="release"}-${ENV,var="target"}'
builders:
- shell: |
#!/bin/bash
set -e
if test x${debug} = x"true"; then
shell="/bin/bash -x"
set -x
else
shell="/bin/bash"
fi
if test x"${tarball_url}" = x; then
echo "ERROR: no binary tarball specified!"
exit 1
fi
fullver=$(basename ${tarball_url})
gccver=${fullver%%-*}
case ${label} in
*32*)
host=i686
builder_arch=i386
;;
*64*)
host=x86_64
builder_arch=amd64
;;
*)
echo "Unsupported slave type: ${label}"
exit 1
;;
esac
# Start build container
builder=$(${WORKSPACE}/nodename2hostname.sh $NODE_NAME)
build_container_type=docker
bash -x ${WORKSPACE}/start-container-${build_container_type}.sh --arch ${builder_arch} --distro ${build_container_tag} --session-host ${builder} > build-container.sh
# Define CONTAINER, CONTAINER_CLEANUP, session_host and session_port
. ./build-container.sh
BUILD_CONTAINER="${CONTAINER}"
BUILD_CONTAINER_CLEANUP="${CONTAINER_CLEANUP}"
# Make sure to cleanup build container if something goes wrong
if [ x"${BUILD_CONTAINER_CLEANUP}" != x ]; then
CONTAINERS_CLEANUP="${BUILD_CONTAINER_CLEANUP}"
trap "${CONTAINERS_CLEANUP}" EXIT
fi
# FIXME: temporary hack: hardcode the ".1" in GCC version number
${BUILD_CONTAINER} "cd ${WORKSPACE} && ${shell} ${WORKSPACE}/TestRelease.job --tarball ${tarball_url}/${target}/gcc-linaro-${gccver}.1-${release}-${host}_${target}.tar.xz --workspace ${WORKSPACE}/linux"
# Test the mingw toolchain on 32 bit host only
case ${label} in
*32*)
host=i686-mingw32
${BUILD_CONTAINER} "cd ${WORKSPACE} && ${shell} ${WORKSPACE}/TestRelease.job --tarball ${tarball_url}/${target}/gcc-linaro-${gccver}.1-${release}-${host}_${target}.tar.xz --workspace ${WORKSPACE}/mingw"
;;
esac
exit $?
publishers:
- email-ext:
recipients: 'christophe.lyon@linaro.org'
send-to:
requester
recipients
|