Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 1 | - job: |
| 2 | name: jdk12-build-image |
| 3 | project-type: matrix |
| 4 | defaults: global |
| 5 | description: | |
| 6 | * Configures and builds jdk12 (ie, bin/java, bin/javac, et al) for various configurations.<br> |
| 7 | * The source tarball is copied from the jdk12-update-src-tree job.<br> |
| 8 | * <b>Note:</b> we are no longer building -fastdebug variants as there is not enough time to test the images. |
| 9 | properties: |
| 10 | - authorization: |
| 11 | anonymous: |
| 12 | - job-read |
| 13 | - job-extended-read |
| 14 | openjdk-members: |
| 15 | - job-build |
| 16 | - job-cancel |
| 17 | - job-workspace |
| 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 | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 23 | node: j12-qrep-01 |
| 24 | display-name: 'OpenJDK 12 - Configure and build OpenJDK 12' |
| 25 | axes: |
| 26 | - axis: |
| 27 | type: user-defined |
| 28 | name: BUILD_TYPE |
| 29 | values: |
| 30 | - release |
| 31 | - axis: |
| 32 | type: slave |
| 33 | name: label |
| 34 | values: |
| 35 | - j12-qrep-01 |
| 36 | execution-strategy: |
| 37 | sequential: true |
| 38 | wrappers: |
| 39 | - workspace-cleanup: |
| 40 | dirmatch: false |
| 41 | - timestamps |
| 42 | - matrix-tie-parent: |
| 43 | node: j12-qrep-01 |
| 44 | builders: |
| 45 | - copyartifact: |
| 46 | project: jdk12-update-src-tree |
| 47 | filter: 'out/jdk12.tar.gz' |
| 48 | target: incoming |
| 49 | flatten: true |
| 50 | - shell: | |
| 51 | #!/bin/bash |
| 52 | |
| 53 | set -exu |
| 54 | |
| 55 | ccache_build_opts=--disable-ccache |
| 56 | |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 57 | rm -rf jdk* primordial-jdk* build* out |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 58 | |
Stuart Monteith | 05af87b | 2019-01-21 21:59:25 +0000 | [diff] [blame] | 59 | cd $HOME/srv/jdk-cache/jdk11 |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 60 | export JAVA_HOME=${PWD} |
| 61 | |
| 62 | export PATH=${JAVA_HOME}/bin:${PATH} |
| 63 | |
| 64 | cd ${WORKSPACE} |
| 65 | |
| 66 | # Extract sources from upstream job |
| 67 | tar xf incoming/jdk12.tar.gz |
| 68 | |
| 69 | shopt -s nullglob |
| 70 | |
| 71 | |
| 72 | |
Stuart Monteith | 571d52b | 2019-02-06 14:02:08 +0000 | [diff] [blame] | 73 | # Configure and build. |
| 74 | mkdir -p build-stage1 build-stage2 out |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 75 | |
| 76 | two_stage_build=0 |
| 77 | |
| 78 | which java |
| 79 | java -version |
| 80 | |
| 81 | if [ $two_stage_build = 1 ]; then |
| 82 | pushd build-stage1 |
| 83 | sh ../jdk12/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/primordial-jdk12 ${ccache_build_opts} --disable-warnings-as-errors |
| 84 | make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native |
| 85 | popd |
| 86 | |
| 87 | pushd build-stage2 |
| 88 | sh ../jdk12/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/build-stage1/images/jdk ${ccache_build_opts} --disable-warnings-as-errors |
Stuart Monteith | a60a3f0 | 2019-07-10 15:11:02 +0100 | [diff] [blame] | 89 | make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 90 | popd |
| 91 | else |
| 92 | pushd build-stage2 |
| 93 | sh ../jdk12/configure --with-debug-level=${BUILD_TYPE} ${ccache_build_opts} --disable-warnings-as-errors |
Stuart Monteith | a60a3f0 | 2019-07-10 15:11:02 +0100 | [diff] [blame] | 94 | make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 95 | popd |
| 96 | fi |
| 97 | |
| 98 | # Archive the result |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 99 | artifact_name=jdk12-${BUILD_TYPE} |
| 100 | tar -C build-stage2/images/jdk --exclude=\*.diz --transform="s!^./!$artifact_name/!" -acf out/${artifact_name}.tar.gz . |
| 101 | |
Stuart Monteith | a60a3f0 | 2019-07-10 15:11:02 +0100 | [diff] [blame] | 102 | # Copy gtest materials to the correct place. |
Stuart Monteith | bd95e22 | 2019-07-11 10:08:46 +0100 | [diff] [blame] | 103 | ( cd build-stage2 |
Stuart Monteith | 91d5ff3 | 2019-07-12 10:28:05 +0100 | [diff] [blame] | 104 | mkdir support/test/hotspot/jtreg/native/lib/server |
| 105 | cp -r hotspot/variant-server/libjvm/gtest/gtestLauncher hotspot/variant-server/libjvm/gtest/libjvm.so support/test/hotspot/jtreg/native/lib/server |
Stuart Monteith | bd95e22 | 2019-07-11 10:08:46 +0100 | [diff] [blame] | 106 | ) |
Stuart Monteith | a60a3f0 | 2019-07-10 15:11:02 +0100 | [diff] [blame] | 107 | |
Stuart Monteith | 20f0edb | 2019-01-21 10:42:06 +0000 | [diff] [blame] | 108 | # Archive test support files. |
| 109 | tar -C build-stage2/ --exclude=hotspot/jtreg/native/support/\* --transform="s!^support/!${artifact_name}-support/support/!" -acf out/${artifact_name}-support.tar.gz support/test |
| 110 | publishers: |
| 111 | - archive: |
| 112 | artifacts: 'out/*.tar.gz' |
| 113 | - email: |
| 114 | recipients: 'stuart.monteith@linaro.org fathi.boudra@linaro.org' |