blob: 0226604d84bfb254ca65169bc2036a7223e91128 [file] [log] [blame]
Stuart Monteith3bc3d182017-11-02 11:00:29 +00001- job:
2 name: jdkX-build-image
3 project-type: matrix
4 defaults: global
5 description: |
6 * Configures and builds jdkX (ie, bin/java, bin/javac, et al) for various configurations.<br>
7 * The source tarball is copied from the jdkX-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
Stuart Monteith0906fb72017-11-10 13:55:58 +000017 - job-workspace
Stuart Monteith3bc3d182017-11-02 11:00:29 +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 Monteith87f38472018-10-03 10:32:45 +010023 node: j12-qrep-01
Stuart Monteith3bc3d182017-11-02 11:00:29 +000024 display-name: 'OpenJDK JDK - Configure and build OpenJDK JDK'
25 axes:
26 - axis:
27 type: user-defined
Stuart Monteith3bc3d182017-11-02 11:00:29 +000028 name: BUILD_TYPE
29 values:
30 - release
31 - axis:
32 type: slave
33 name: label
34 values:
Stuart Monteith87f38472018-10-03 10:32:45 +010035 - j12-qrep-01
Stuart Monteith3bc3d182017-11-02 11:00:29 +000036 execution-strategy:
37 sequential: true
38 wrappers:
39 - workspace-cleanup:
40 dirmatch: false
41 - timestamps
42 - matrix-tie-parent:
Stuart Monteith87f38472018-10-03 10:32:45 +010043 node: j12-qrep-01
Stuart Monteith3bc3d182017-11-02 11:00:29 +000044 builders:
45 - copyartifact:
46 project: jdkX-update-src-tree
47 filter: 'out/jdkX.tar.gz'
48 target: incoming
49 flatten: true
Stuart Monteith3bc3d182017-11-02 11:00:29 +000050 - shell: |
51 #!/bin/bash
52
53 set -exu
54
Stuart Monteith3bc3d182017-11-02 11:00:29 +000055 ccache_build_opts=--disable-ccache
56
Stuart Monteith571d52b2019-02-06 14:02:08 +000057 rm -rf jdk* primordial-jdk* build* out
Stuart Monteith3bc3d182017-11-02 11:00:29 +000058
Stuart Monteith9f5fe5e2020-04-27 20:54:46 +010059 cd $HOME/srv/jdk-cache/jdk14
Stuart Monteith3bc3d182017-11-02 11:00:29 +000060 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/jdkX.tar.gz
68
69 shopt -s nullglob
70
Stuart Monteith571d52b2019-02-06 14:02:08 +000071 # Configure and build.
72 mkdir -p build-stage1 build-stage2 out
Stuart Monteith3bc3d182017-11-02 11:00:29 +000073
74 two_stage_build=0
75
76 which java
77 java -version
78
79 if [ $two_stage_build = 1 ]; then
80 pushd build-stage1
Stuart Monteith087485e2018-10-16 16:25:21 +010081 sh ../jdkX/configure } --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/primordial-jdkX ${ccache_build_opts}
Stuart Monteith3bc3d182017-11-02 11:00:29 +000082 make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native
83 popd
84
85 pushd build-stage2
Stuart Monteith087485e2018-10-16 16:25:21 +010086 sh ../jdkX/configure --with-debug-level=${BUILD_TYPE} --with-boot-jdk=${WORKSPACE}/build-stage1/images/jdk ${ccache_build_opts}
Stuart Monteitha60a3f02019-07-10 15:11:02 +010087 make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest
Stuart Monteith3bc3d182017-11-02 11:00:29 +000088 popd
89 else
90 pushd build-stage2
Stuart Monteith087485e2018-10-16 16:25:21 +010091 sh ../jdkX/configure --with-debug-level=${BUILD_TYPE} ${ccache_build_opts}
Stuart Monteitha60a3f02019-07-10 15:11:02 +010092 make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest
Stuart Monteith3bc3d182017-11-02 11:00:29 +000093 popd
94 fi
95
96 # Archive the result
Stuart Monteith087485e2018-10-16 16:25:21 +010097 artifact_name=jdkX-${BUILD_TYPE}
Stuart Monteith3bc3d182017-11-02 11:00:29 +000098 tar -C build-stage2/images/jdk --exclude=\*.diz --transform="s!^./!$artifact_name/!" -acf out/${artifact_name}.tar.gz .
99
Stuart Monteitha60a3f02019-07-10 15:11:02 +0100100 # Copy gtest materials to the correct place.
Stuart Monteithbd95e222019-07-11 10:08:46 +0100101 ( cd build-stage2
Stuart Monteith91d5ff32019-07-12 10:28:05 +0100102 mkdir support/test/hotspot/jtreg/native/lib/server
103 cp -r hotspot/variant-server/libjvm/gtest/gtestLauncher hotspot/variant-server/libjvm/gtest/libjvm.so support/test/hotspot/jtreg/native/lib/server
Stuart Monteithbd95e222019-07-11 10:08:46 +0100104 )
Stuart Monteitha60a3f02019-07-10 15:11:02 +0100105
Stuart Monteith3bc3d182017-11-02 11:00:29 +0000106 # Archive test support files.
107 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
108 publishers:
109 - archive:
110 artifacts: 'out/*.tar.gz'
111 - email:
112 recipients: 'stuart.monteith@linaro.org fathi.boudra@linaro.org'