Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 1 | - 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 Monteith | 1f5aa99 | 2018-10-03 17:05:22 +0100 | [diff] [blame] | 17 | - job-workspace |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 18 | - build-discarder: |
| 19 | days-to-keep: 30 |
| 20 | num-to-keep: 10 |
| 21 | artifact-num-to-keep: 5 |
Riku Voipio | b7c49aa | 2020-12-01 15:15:24 +0200 | [diff] [blame] | 22 | disabled: true |
Stuart Monteith | 1f5aa99 | 2018-10-03 17:05:22 +0100 | [diff] [blame] | 23 | node: j12-qrep-01 |
Stuart Monteith | acb1ddc | 2016-11-22 15:14:53 +0000 | [diff] [blame] | 24 | display-name: 'OpenJDK 8 - Configure and build OpenJDK 8 Release' |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 25 | 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 Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 39 | name: BUILD_TYPE |
| 40 | values: |
| 41 | - release |
| 42 | - axis: |
| 43 | type: slave |
| 44 | name: label |
| 45 | values: |
Stuart Monteith | 1f5aa99 | 2018-10-03 17:05:22 +0100 | [diff] [blame] | 46 | - j12-qrep-01 |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 47 | execution-strategy: |
| 48 | sequential: true |
| 49 | wrappers: |
| 50 | - workspace-cleanup: |
| 51 | dirmatch: false |
| 52 | - timestamps |
| 53 | - matrix-tie-parent: |
Stuart Monteith | 1f5aa99 | 2018-10-03 17:05:22 +0100 | [diff] [blame] | 54 | node: j12-qrep-01 |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 55 | builders: |
| 56 | - copyartifact: |
| 57 | project: jdk8-update-src-tree |
| 58 | filter: 'out/jdk8u.tar.gz' |
| 59 | target: incoming |
| 60 | flatten: true |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 61 | target: incoming |
| 62 | flatten: true |
| 63 | - shell: | |
| 64 | #!/bin/bash |
| 65 | |
| 66 | set -exu |
| 67 | |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 68 | # Generate files names dependent on year/month. |
| 69 | RELEASE=$(date +%y%m) |
Stuart Monteith | 087485e | 2018-10-16 16:25:21 +0100 | [diff] [blame] | 70 | JDKDIR=jdk8u-${BUILD_TYPE}-${RELEASE} |
Stuart Monteith | 0ba0f20 | 2016-11-22 16:57:17 +0000 | [diff] [blame] | 71 | JDK_SRCDIR=jdk8u-src-${RELEASE} |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 72 | |
| 73 | ccache_build_opts=--disable-ccache |
| 74 | |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 75 | rm -rf jdk* primordial-jdk* build* out |
Stuart Monteith | 239e763 | 2019-02-08 10:15:08 +0000 | [diff] [blame] | 76 | mkdir -p build-stage1 build-stage2 out |
Stuart Monteith | f41db9f | 2016-11-22 15:29:54 +0000 | [diff] [blame] | 77 | |
Stuart Monteith | 05af87b | 2019-01-21 21:59:25 +0000 | [diff] [blame] | 78 | cd $HOME/srv/jdk-cache/jdk8u |
Stuart Monteith | 1f5aa99 | 2018-10-03 17:05:22 +0100 | [diff] [blame] | 79 | export JAVA_HOME=${PWD} |
| 80 | |
| 81 | export PATH=${JAVA_HOME}/bin:${PATH} |
| 82 | |
| 83 | cd ${WORKSPACE} |
Stuart Monteith | 087485e | 2018-10-16 16:25:21 +0100 | [diff] [blame] | 84 | |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 85 | # Extract sources from upstream job |
Stuart Monteith | a45119c | 2018-01-17 16:54:23 +0000 | [diff] [blame] | 86 | rm -rf jdk8u |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 87 | tar xf incoming/jdk8u.tar.gz |
| 88 | |
Stuart Monteith | dfd94a5 | 2016-11-22 17:29:24 +0000 | [diff] [blame] | 89 | mv jdk8u $JDK_SRCDIR |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 90 | # Tar up the source before sullying it with a build. |
Stuart Monteith | 0ba0f20 | 2016-11-22 16:57:17 +0000 | [diff] [blame] | 91 | tar --exclude=.hg\* -acf out/jdk8u-src-${RELEASE}.tar.xz $JDK_SRCDIR |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 92 | |
Stuart Monteith | 0ba0f20 | 2016-11-22 16:57:17 +0000 | [diff] [blame] | 93 | mv $JDK_SRCDIR $JDKDIR |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 94 | shopt -s nullglob |
| 95 | |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 96 | # Configure and build. |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 97 | two_stage_build=0 |
| 98 | |
| 99 | which java |
| 100 | java -version |
| 101 | |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 102 | 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 Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 110 | if [ $two_stage_build = 1 ]; then |
| 111 | pushd build-stage1 |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 112 | 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 Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 114 | make images |
| 115 | popd |
| 116 | |
| 117 | pushd build-stage2 |
Stuart Monteith | 087485e | 2018-10-16 16:25:21 +0100 | [diff] [blame] | 118 | sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} \ |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 119 | --with-boot-jdk=${WORKSPACE}/build-stage1/images/j2sdk-image \ |
| 120 | ${ccache_build_opts} \ |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 121 | --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ |
| 122 | --with-extra-cflags="$EXTRA_CFLAGS" \ |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 123 | --with-user-release-suffix="Linaro-$RELEASE" \ |
| 124 | --with-milestone="release" |
| 125 | make images |
| 126 | popd |
| 127 | else |
| 128 | pushd build-stage2 |
Stuart Monteith | 087485e | 2018-10-16 16:25:21 +0100 | [diff] [blame] | 129 | sh ../$JDKDIR/configure --with-debug-level=${BUILD_TYPE} \ |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 130 | ${ccache_build_opts} \ |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 131 | --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ |
| 132 | --with-extra-cflags="$EXTRA_CFLAGS" \ |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 133 | --with-user-release-suffix="Linaro-$RELEASE" \ |
| 134 | --with-milestone="release" |
| 135 | make images |
| 136 | popd |
| 137 | fi |
| 138 | |
| 139 | # Archive the result |
Stuart Monteith | 087485e | 2018-10-16 16:25:21 +0100 | [diff] [blame] | 140 | artifact_name=jdk8u-${BUILD_TYPE}-${RELEASE} |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 141 | |
| 142 | # This is different from ordinary builds. |
Stuart Monteith | 0ba0f20 | 2016-11-22 16:57:17 +0000 | [diff] [blame] | 143 | tar -C build-stage2/images --exclude=\*.diz --transform="s!^j2sdk-image!$artifact_name!" -acf out/${artifact_name}.tar.xz j2sdk-image |
Stuart Monteith | ffbfebd | 2016-11-21 17:58:53 +0000 | [diff] [blame] | 144 | publishers: |
| 145 | - archive: |
| 146 | artifacts: 'out/*.tar.xz' |
| 147 | - email: |
| 148 | recipients: 'stuart.monteith@linaro.org fathi.boudra@linaro.org' |