Stuart Monteith | 53ae798 | 2020-01-13 14:39:09 +0000 | [diff] [blame] | 1 | - job: |
| 2 | name: jdk14-build-image |
| 3 | project-type: matrix |
| 4 | defaults: global |
| 5 | description: | |
| 6 | * Configures and builds jdk14 (ie, bin/java, bin/javac, et al) for various configurations.<br> |
| 7 | * The source tarball is copied from the jdk14-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 | 53ae798 | 2020-01-13 14:39:09 +0000 | [diff] [blame] | 23 | node: j12-qrep-01 |
| 24 | display-name: 'OpenJDK 14 - Configure and build OpenJDK 14' |
| 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: jdk14-update-src-tree |
| 47 | filter: 'out/jdk14.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 | |
| 57 | rm -rf jdk* primordial-jdk* build* out |
| 58 | |
| 59 | cd $HOME/srv/jdk-cache/jdk13 |
| 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/jdk14.tar.gz |
| 68 | |
| 69 | shopt -s nullglob |
| 70 | |
| 71 | |
| 72 | |
| 73 | # Configure and build. |
| 74 | mkdir -p build-stage1 build-stage2 out |
| 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 ../jdk14/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/primordial-jdk14 ${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 ../jdk14/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/build-stage1/images/jdk ${ccache_build_opts} --disable-warnings-as-errors |
| 89 | make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest |
| 90 | popd |
| 91 | else |
| 92 | pushd build-stage2 |
| 93 | sh ../jdk14/configure --with-debug-level=${BUILD_TYPE} ${ccache_build_opts} --disable-warnings-as-errors |
| 94 | make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest |
| 95 | popd |
| 96 | fi |
| 97 | |
| 98 | # Archive the result |
| 99 | artifact_name=jdk14-${BUILD_TYPE} |
| 100 | tar -C build-stage2/images/jdk --exclude=\*.diz --transform="s!^./!$artifact_name/!" -acf out/${artifact_name}.tar.gz . |
| 101 | |
| 102 | # Copy gtest materials to the correct place. |
| 103 | ( cd build-stage2 |
| 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 |
| 106 | ) |
| 107 | |
| 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' |