blob: 98d872602752053528203e74919b57b3d9684722 [file] [log] [blame]
Stuart Monteith6016be52018-04-20 14:23:20 +01001- job:
2 name: jdk11-build-release
3 project-type: matrix
4 defaults: global
5 description: |
6 * Configures and builds jdk11 for release. Run after the source has passed tests.
7 * Tags build with Linaro-YYMM as per normal release procedure.
8 * The source tarball is copied from the jdk11-update-src-tree job.<br>
9 properties:
10 - authorization:
11 anonymous:
12 - job-read
13 - job-extended-read
14 openjdk-members:
15 - job-build
16 - job-cancel
Stuart Monteith571d52b2019-02-06 14:02:08 +000017 - job-workspace
Stuart Monteith6016be52018-04-20 14:23:20 +010018 - build-discarder:
19 days-to-keep: 30
20 num-to-keep: 10
21 artifact-num-to-keep: 5
Riku Voipiob7c49aa2020-12-01 15:15:24 +020022 disabled: true
Stuart Monteith9aba7c32018-10-03 18:16:57 +010023 node: j12-qrep-01
Stuart Monteith17cf7ee2018-11-12 10:14:24 +000024 display-name: 'OpenJDK 11u - Configure and build OpenJDK 11u Release'
Stuart Monteith6016be52018-04-20 14:23:20 +010025 axes:
26 - axis:
27 type: user-defined
Stuart Monteith6016be52018-04-20 14:23:20 +010028 name: BUILD_TYPE
29 values:
30 - release
31 - axis:
32 type: slave
33 name: label
34 values:
Stuart Monteith9aba7c32018-10-03 18:16:57 +010035 - j12-qrep-01
Stuart Monteith6016be52018-04-20 14:23:20 +010036 execution-strategy:
37 sequential: true
38 wrappers:
39 - workspace-cleanup:
40 dirmatch: false
41 - timestamps
42 - matrix-tie-parent:
Stuart Monteith9aba7c32018-10-03 18:16:57 +010043 node: j12-qrep-01
Stuart Monteith6016be52018-04-20 14:23:20 +010044 builders:
45 - copyartifact:
46 project: jdk11-update-src-tree
Stuart Monteith17cf7ee2018-11-12 10:14:24 +000047 filter: 'out/jdk11u.tar.gz'
Stuart Monteith6016be52018-04-20 14:23:20 +010048 target: incoming
49 flatten: true
Stuart Monteith6016be52018-04-20 14:23:20 +010050 - shell: |
51 #!/bin/bash
52
53 set -exu
54
Stuart Monteith6016be52018-04-20 14:23:20 +010055 # Generate files names dependent on year/month.
56 RELEASE=$(date +%y%m)
Stuart Monteith17cf7ee2018-11-12 10:14:24 +000057 JDKDIR=jdk11u-${BUILD_TYPE}-${RELEASE}
58 JDK_SRCDIR=jdk11u-src-${RELEASE}
Stuart Monteith6016be52018-04-20 14:23:20 +010059
60 ccache_build_opts=--disable-ccache
61
Stuart Monteith571d52b2019-02-06 14:02:08 +000062 rm -rf jdk* primordial-jdk* build* out
Stuart Monteith239e7632019-02-08 10:15:08 +000063 mkdir -p build-stage1 build-stage2 out
Stuart Monteith6016be52018-04-20 14:23:20 +010064
Stuart Monteith05af87b2019-01-21 21:59:25 +000065 cd $HOME/srv/jdk-cache/jdk10
Stuart Monteith6016be52018-04-20 14:23:20 +010066 export JAVA_HOME=${PWD}
67
68 export PATH=${JAVA_HOME}/bin:${PATH}
69
70 cd ${WORKSPACE}
71
Stuart Monteith6016be52018-04-20 14:23:20 +010072 # Extract sources from upstream job
Stuart Monteith17cf7ee2018-11-12 10:14:24 +000073 tar xaf incoming/jdk11u.tar.gz
Stuart Monteith6016be52018-04-20 14:23:20 +010074
Stuart Monteith17cf7ee2018-11-12 10:14:24 +000075 mv jdk11u $JDK_SRCDIR
Stuart Monteith6016be52018-04-20 14:23:20 +010076 # Tar up the source before sullying it with a build.
Stuart Monteith17cf7ee2018-11-12 10:14:24 +000077 tar --exclude=.hg\* -acf out/jdk11u-src-${RELEASE}.tar.xz $JDK_SRCDIR
Stuart Monteith6016be52018-04-20 14:23:20 +010078
79 mv $JDK_SRCDIR $JDKDIR
80 shopt -s nullglob
81
Stuart Monteith571d52b2019-02-06 14:02:08 +000082 # Configure and build.
Stuart Monteith6016be52018-04-20 14:23:20 +010083 two_stage_build=0
84
85 which java
86 java -version
87
88 if [ $two_stage_build = 1 ]; then
89 pushd build-stage1
Stuart Monteith087485e2018-10-16 16:25:21 +010090 sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/primordial-jdk11 ${ccache_build_opts}
Stuart Monteith6016be52018-04-20 14:23:20 +010091 make images
92 popd
93
94 pushd build-stage2
Stuart Monteith087485e2018-10-16 16:25:21 +010095 sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} \
Stuart Monteith6016be52018-04-20 14:23:20 +010096 --with-boot-jdk=${WORKSPACE}/build-stage1/images/jdk \
97 ${ccache_build_opts} \
98 --with-version-opt="Linaro-$RELEASE" \
Stuart Monteith6e2a1752018-12-10 10:01:13 +000099 --with-version-pre="release" \
100 --disable-warnings-as-errors
Stuart Monteith6016be52018-04-20 14:23:20 +0100101 make images
102 popd
103 else
104 pushd build-stage2
Stuart Monteith087485e2018-10-16 16:25:21 +0100105 sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} \
Stuart Monteith6016be52018-04-20 14:23:20 +0100106 ${ccache_build_opts} \
107 --with-version-opt="Linaro-$RELEASE" \
Stuart Monteith6e2a1752018-12-10 10:01:13 +0000108 --with-version-pre="release" \
109 --disable-warnings-as-errors
Stuart Monteith6016be52018-04-20 14:23:20 +0100110 make images
111 popd
112 fi
113
114 # Archive the result
Stuart Monteith17cf7ee2018-11-12 10:14:24 +0000115 artifact_name=jdk11u-${BUILD_TYPE}-${RELEASE}
Stuart Monteith6016be52018-04-20 14:23:20 +0100116
117 # This is different from ordinary builds.
118 tar -C build-stage2/images --exclude=\*.debuginfo --transform="s!^jdk!$artifact_name!" -acf out/${artifact_name}.tar.xz jdk
119 publishers:
120 - archive:
121 artifacts: 'out/*.tar.xz'
122 - email:
123 recipients: 'stuart.monteith@linaro.org fathi.boudra@linaro.org'