blob: 7a3fb0986fea312bd75905492c4629838fe45550 [file] [log] [blame]
Stuart Monteith20f0edb2019-01-21 10:42:06 +00001- 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 Voipiob7c49aa2020-12-01 15:15:24 +020022 disabled: true
Stuart Monteith20f0edb2019-01-21 10:42:06 +000023 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 Monteith571d52b2019-02-06 14:02:08 +000057 rm -rf jdk* primordial-jdk* build* out
Stuart Monteith20f0edb2019-01-21 10:42:06 +000058
Stuart Monteith05af87b2019-01-21 21:59:25 +000059 cd $HOME/srv/jdk-cache/jdk11
Stuart Monteith20f0edb2019-01-21 10:42:06 +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/jdk12.tar.gz
68
69 shopt -s nullglob
70
71
72
Stuart Monteith571d52b2019-02-06 14:02:08 +000073 # Configure and build.
74 mkdir -p build-stage1 build-stage2 out
Stuart Monteith20f0edb2019-01-21 10:42:06 +000075
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 Monteitha60a3f02019-07-10 15:11:02 +010089 make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest
Stuart Monteith20f0edb2019-01-21 10:42:06 +000090 popd
91 else
92 pushd build-stage2
93 sh ../jdk12/configure --with-debug-level=${BUILD_TYPE} ${ccache_build_opts} --disable-warnings-as-errors
Stuart Monteitha60a3f02019-07-10 15:11:02 +010094 make images build-test-hotspot-jtreg-native build-test-jdk-jtreg-native test-image-hotspot-gtest
Stuart Monteith20f0edb2019-01-21 10:42:06 +000095 popd
96 fi
97
98 # Archive the result
Stuart Monteith20f0edb2019-01-21 10:42:06 +000099 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 Monteitha60a3f02019-07-10 15:11:02 +0100102 # Copy gtest materials to the correct place.
Stuart Monteithbd95e222019-07-11 10:08:46 +0100103 ( cd build-stage2
Stuart Monteith91d5ff32019-07-12 10:28:05 +0100104 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 Monteithbd95e222019-07-11 10:08:46 +0100106 )
Stuart Monteitha60a3f02019-07-10 15:11:02 +0100107
Stuart Monteith20f0edb2019-01-21 10:42:06 +0000108 # 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'