blob: 25b4a02d4d389ba0dbc1a103f488fff662cfd7cf [file] [log] [blame]
Stuart Monteithffbfebd2016-11-21 17:58:53 +00001- job:
2 name: jdk8-build-release
3 project-type: matrix
4 defaults: global
5 description: |
6 * Configures and builds jdk8u 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 jdk8-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 Monteith1f5aa992018-10-03 17:05:22 +010017 - job-workspace
Stuart Monteithffbfebd2016-11-21 17:58:53 +000018 - 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 Monteith1f5aa992018-10-03 17:05:22 +010023 node: j12-qrep-01
Stuart Monteithacb1ddc2016-11-22 15:14:53 +000024 display-name: 'OpenJDK 8 - Configure and build OpenJDK 8 Release'
Stuart Monteithffbfebd2016-11-21 17:58:53 +000025 scm:
26 - git:
27 url: https://git.linaro.org/leg/openjdk/openjdk8-jenkins-only-build-patches.git
28 refspec: +refs/heads/master:refs/remotes/origin/master
29 name: origin
30 branches:
31 - refs/heads/master
32 basedir: patches
33 skip-tag: true
34 shallow-clone: true
35 wipe-workspace: false
36 axes:
37 - axis:
38 type: user-defined
Stuart Monteithffbfebd2016-11-21 17:58:53 +000039 name: BUILD_TYPE
40 values:
41 - release
42 - axis:
43 type: slave
44 name: label
45 values:
Stuart Monteith1f5aa992018-10-03 17:05:22 +010046 - j12-qrep-01
Stuart Monteithffbfebd2016-11-21 17:58:53 +000047 execution-strategy:
48 sequential: true
49 wrappers:
50 - workspace-cleanup:
51 dirmatch: false
52 - timestamps
53 - matrix-tie-parent:
Stuart Monteith1f5aa992018-10-03 17:05:22 +010054 node: j12-qrep-01
Stuart Monteithffbfebd2016-11-21 17:58:53 +000055 builders:
56 - copyartifact:
57 project: jdk8-update-src-tree
58 filter: 'out/jdk8u.tar.gz'
59 target: incoming
60 flatten: true
Stuart Monteithffbfebd2016-11-21 17:58:53 +000061 target: incoming
62 flatten: true
63 - shell: |
64 #!/bin/bash
65
66 set -exu
67
Stuart Monteithffbfebd2016-11-21 17:58:53 +000068 # Generate files names dependent on year/month.
69 RELEASE=$(date +%y%m)
Stuart Monteith087485e2018-10-16 16:25:21 +010070 JDKDIR=jdk8u-${BUILD_TYPE}-${RELEASE}
Stuart Monteith0ba0f202016-11-22 16:57:17 +000071 JDK_SRCDIR=jdk8u-src-${RELEASE}
Stuart Monteithffbfebd2016-11-21 17:58:53 +000072
73 ccache_build_opts=--disable-ccache
74
Stuart Monteith571d52b2019-02-06 14:02:08 +000075 rm -rf jdk* primordial-jdk* build* out
Stuart Monteith239e7632019-02-08 10:15:08 +000076 mkdir -p build-stage1 build-stage2 out
Stuart Monteithf41db9f2016-11-22 15:29:54 +000077
Stuart Monteith05af87b2019-01-21 21:59:25 +000078 cd $HOME/srv/jdk-cache/jdk8u
Stuart Monteith1f5aa992018-10-03 17:05:22 +010079 export JAVA_HOME=${PWD}
80
81 export PATH=${JAVA_HOME}/bin:${PATH}
82
83 cd ${WORKSPACE}
Stuart Monteith087485e2018-10-16 16:25:21 +010084
Stuart Monteithffbfebd2016-11-21 17:58:53 +000085 # Extract sources from upstream job
Stuart Monteitha45119c2018-01-17 16:54:23 +000086 rm -rf jdk8u
Stuart Monteithffbfebd2016-11-21 17:58:53 +000087 tar xf incoming/jdk8u.tar.gz
88
Stuart Monteithdfd94a52016-11-22 17:29:24 +000089 mv jdk8u $JDK_SRCDIR
Stuart Monteithffbfebd2016-11-21 17:58:53 +000090 # Tar up the source before sullying it with a build.
Stuart Monteith0ba0f202016-11-22 16:57:17 +000091 tar --exclude=.hg\* -acf out/jdk8u-src-${RELEASE}.tar.xz $JDK_SRCDIR
Stuart Monteithffbfebd2016-11-21 17:58:53 +000092
Stuart Monteith0ba0f202016-11-22 16:57:17 +000093 mv $JDK_SRCDIR $JDKDIR
Stuart Monteithffbfebd2016-11-21 17:58:53 +000094 shopt -s nullglob
95
Stuart Monteithffbfebd2016-11-21 17:58:53 +000096 # Configure and build.
Stuart Monteithffbfebd2016-11-21 17:58:53 +000097 two_stage_build=0
98
99 which java
100 java -version
101
Stuart Monteith571d52b2019-02-06 14:02:08 +0000102 EXTRA_CFLAGS="-Wno-error -fno-delete-null-pointer-checks \
103 -fno-lifetime-dse -Wno-deprecated-declarations \
104 -Wno-maybe-uninitialized -Wno-misleading-indentation \
105 -Wno-shift-negative-value"
106 EXTRA_CPP_FLAGS="-Wno-error -std=gnu++98 \
107 -fno-delete-null-pointer-checks -fno-lifetime-dse \
108 -Wno-deprecated-declarations -Wno-maybe-uninitialized \
109 -Wno-misleading-indentation -Wno-shift-negative-value"
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000110 if [ $two_stage_build = 1 ]; then
111 pushd build-stage1
Stuart Monteith571d52b2019-02-06 14:02:08 +0000112 sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/primordial-jdk7 ${ccache_build_opts} \
113 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" --with-extra-cflags="$EXTRA_CFLAGS"
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000114 make images
115 popd
116
117 pushd build-stage2
Stuart Monteith087485e2018-10-16 16:25:21 +0100118 sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} \
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000119 --with-boot-jdk=${WORKSPACE}/build-stage1/images/j2sdk-image \
120 ${ccache_build_opts} \
Stuart Monteith571d52b2019-02-06 14:02:08 +0000121 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
122 --with-extra-cflags="$EXTRA_CFLAGS" \
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000123 --with-user-release-suffix="Linaro-$RELEASE" \
124 --with-milestone="release"
125 make images
126 popd
127 else
128 pushd build-stage2
Stuart Monteith087485e2018-10-16 16:25:21 +0100129 sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} \
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000130 ${ccache_build_opts} \
Stuart Monteith571d52b2019-02-06 14:02:08 +0000131 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
132 --with-extra-cflags="$EXTRA_CFLAGS" \
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000133 --with-user-release-suffix="Linaro-$RELEASE" \
134 --with-milestone="release"
135 make images
136 popd
137 fi
138
139 # Archive the result
Stuart Monteith087485e2018-10-16 16:25:21 +0100140 artifact_name=jdk8u-${BUILD_TYPE}-${RELEASE}
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000141
142 # This is different from ordinary builds.
Stuart Monteith0ba0f202016-11-22 16:57:17 +0000143 tar -C build-stage2/images --exclude=\*.diz --transform="s!^j2sdk-image!$artifact_name!" -acf out/${artifact_name}.tar.xz j2sdk-image
Stuart Monteithffbfebd2016-11-21 17:58:53 +0000144 publishers:
145 - archive:
146 artifacts: 'out/*.tar.xz'
147 - email:
148 recipients: 'stuart.monteith@linaro.org fathi.boudra@linaro.org'