author | erikj |
Tue, 29 Oct 2019 12:01:14 -0700 | |
changeset 58846 | f9ac726ab347 |
parent 58723 | 559c46cd0e8b |
permissions | -rw-r--r-- |
34491 | 1 |
/* |
53423 | 2 |
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
34491 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
/* |
|
34496 | 27 |
* This file defines build profiles for the JIB tool and others. |
34491 | 28 |
* |
29 |
* A build profile defines a set of configuration options and external |
|
30 |
* dependencies that we for some reason or other care about specifically. |
|
31 |
* Typically, build profiles are defined for the build configurations we |
|
32 |
* build regularly. |
|
33 |
* |
|
34 |
* Contract against this file from the tools that use it, is to provide |
|
35 |
* a function on the form: |
|
36 |
* |
|
34496 | 37 |
* getJibProfiles(input) |
34491 | 38 |
* |
39 |
* which returns an object graph describing the profiles and their |
|
40 |
* dependencies. The name of the function is based on the name of this |
|
41 |
* file, minus the extension and the '-', camel cased and prefixed with |
|
42 |
* 'get'. |
|
43 |
* |
|
44 |
* |
|
45 |
* The parameter 'input' is an object that optionally contains some data. |
|
46 |
* Optionally because a tool may read the configuration for different purposes. |
|
47 |
* To initially get a list of available profiles, the active profile may not |
|
48 |
* yet be known for instance. |
|
49 |
* |
|
50 |
* Data that may be set on the input object: |
|
51 |
* |
|
52 |
* input.profile = <name of active profile> |
|
53 |
* |
|
54 |
* If the active profile is set, the following data from it must also |
|
55 |
* be provided: |
|
56 |
* |
|
57 |
* input.profile |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
58 |
* input.build_id |
34491 | 59 |
* input.target_os |
60 |
* input.target_cpu |
|
61 |
* input.build_os |
|
62 |
* input.build_cpu |
|
63 |
* input.target_platform |
|
64 |
* input.build_platform |
|
65 |
* // The build_osenv_* variables describe the unix layer on Windows systems, |
|
66 |
* // i.e. Cygwin, which may also be 32 or 64 bit. |
|
67 |
* input.build_osenv |
|
68 |
* input.build_osenv_cpu |
|
69 |
* input.build_osenv_platform |
|
70 |
* |
|
71 |
* For more complex nested attributes, there is a method "get": |
|
72 |
* |
|
73 |
* input.get("<dependency>", "<attribute>") |
|
74 |
* |
|
75 |
* Valid attributes are: |
|
76 |
* install_path |
|
77 |
* download_path |
|
78 |
* download_dir |
|
53642
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
79 |
* home_path |
34491 | 80 |
* |
81 |
* |
|
82 |
* The output data generated by this configuration file has the following |
|
83 |
* format: |
|
84 |
* |
|
85 |
* data: { |
|
86 |
* // Identifies the version of this format to the tool reading it |
|
87 |
* format_version: "1.0", |
|
88 |
* |
|
34496 | 89 |
* // Name of base outputdir. JIB assumes the actual output dir is formed |
34491 | 90 |
* // by adding the configuration name: <output_basedir>/<config-name> |
91 |
* output_basedir: "build", |
|
92 |
* // Configure argument to use to specify configuration name |
|
93 |
* configuration_configure_arg: |
|
94 |
* // Make argument to use to specify configuration name |
|
95 |
* configuration_make_arg: |
|
96 |
* |
|
97 |
* profiles: { |
|
98 |
* <profile-name>: { |
|
99 |
* // Name of os the profile is built to run on |
|
100 |
* target_os; <string> |
|
101 |
* // Name of cpu the profile is built to run on |
|
102 |
* target_cpu; <string> |
|
103 |
* // Combination of target_os and target_cpu for convenience |
|
104 |
* target_platform; <string> |
|
105 |
* // Name of os the profile is built on |
|
106 |
* build_os; <string> |
|
107 |
* // Name of cpu the profile is built on |
|
108 |
* build_cpu; <string> |
|
109 |
* // Combination of build_os and build_cpu for convenience |
|
110 |
* build_platform; <string> |
|
111 |
* |
|
112 |
* // List of dependencies needed to build this profile |
|
113 |
* dependencies: <Array of strings> |
|
114 |
* |
|
115 |
* // List of configure args to use for this profile |
|
116 |
* configure_args: <Array of strings> |
|
117 |
* |
|
118 |
* // List of free form labels describing aspects of this profile |
|
119 |
* labels: <Array of strings> |
|
120 |
* } |
|
121 |
* } |
|
122 |
* |
|
123 |
* // Dependencies use a Maven like deployment structure |
|
124 |
* dependencies: { |
|
125 |
* <dependency-name>: { |
|
126 |
* // Organization part of path defining this dependency |
|
127 |
* organization: <string> |
|
128 |
* // File extension for this dependency |
|
129 |
* ext: <string> |
|
130 |
* // Module part of path for defining this dependency, |
|
131 |
* // defaults to <dependency-name> |
|
132 |
* module: <string> |
|
133 |
* // Revision part of path for defining this dependency |
|
134 |
* revision: <string> |
|
135 |
* |
|
136 |
* // List of configure args to add when using this dependency, |
|
137 |
* // defaults to |
|
138 |
* // "--with-<dependency-name>=input.get("<dependency-name", "install_path")" |
|
139 |
* configure_args: <array of strings> |
|
140 |
* |
|
141 |
* // Name of environment variable to set when using this dependency |
|
142 |
* // when running make |
|
143 |
* environment_name: <string> |
|
144 |
* // Value of environment variable to set when using this dependency |
|
145 |
* // when running make |
|
146 |
* environment_value: <string> |
|
147 |
* |
|
148 |
* // Value to add to the PATH variable when using this dependency, |
|
149 |
* // applies to both make and configure |
|
150 |
* environment_path: <string> |
|
151 |
* } |
|
152 |
* |
|
153 |
* <dependency-name>: { |
|
154 |
* // For certain dependencies where a legacy distribution mechanism is |
|
155 |
* // already in place, the "javare" server layout is also supported |
|
156 |
* // Indicate that an alternate server source and layout should be used |
|
157 |
* server: "javare" |
|
158 |
* |
|
159 |
* // For "javare", a combination of module, revision, |
|
160 |
* // build number (optional), files and checksum file is possible for |
|
161 |
* // artifacts following the standard layout. |
|
162 |
* module: <string> |
|
163 |
* revision: <string> |
|
164 |
* build_number: <string> |
|
165 |
* checksum_file: <string> |
|
166 |
* file: <string> |
|
167 |
* |
|
168 |
* // For other files, use checksum path and path instead |
|
169 |
* checksum_path: <string> |
|
170 |
* path: <string> |
|
171 |
* } |
|
172 |
* } |
|
173 |
* } |
|
174 |
*/ |
|
175 |
||
176 |
/** |
|
177 |
* Main entry to generate the profile configuration |
|
178 |
* |
|
179 |
* @param input External data to use for generating the configuration |
|
180 |
* @returns {{}} Profile configuration |
|
181 |
*/ |
|
34496 | 182 |
var getJibProfiles = function (input) { |
34491 | 183 |
|
184 |
var data = {}; |
|
185 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
186 |
// Identifies the version of this format to the tool reading it. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
187 |
// 1.1 signifies that the publish, publish-src and get-src features are usable. |
50239 | 188 |
// 1.2 signifies that artifact uploads should fail on missing artifacts by default. |
53642
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
189 |
// 1.3 input.get(<dep>, "home_path") automatically goes down into a single top |
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
190 |
// dir just like default configure_args and environment_path variables. |
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
191 |
data.format_version = "1.3"; |
34491 | 192 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
193 |
// Organization, product and version are used when uploading/publishing build results |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
194 |
data.organization = ""; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
195 |
data.product = "jdk"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
196 |
data.version = getVersion(); |
34491 | 197 |
|
34496 | 198 |
// The base directory for the build output. JIB will assume that the |
34491 | 199 |
// actual build directory will be <output_basedir>/<configuration> |
200 |
data.output_basedir = "build"; |
|
201 |
// The configure argument to use to specify the name of the configuration |
|
202 |
data.configuration_configure_arg = "--with-conf-name="; |
|
203 |
// The make argument to use to specify the name of the configuration |
|
204 |
data.configuration_make_arg = "CONF_NAME="; |
|
205 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
206 |
// Exclude list to use when Jib creates a source bundle |
52415
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
207 |
data.src_bundle_excludes = [ |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
208 |
"build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork", "{,**/}JTreport", |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
209 |
"{,**/}.git" |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
210 |
]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
211 |
// Include list to use when creating a minimal jib source bundle which |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
212 |
// contains just the jib configuration files. |
52415
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
213 |
data.conf_bundle_includes = [ |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
214 |
"make/autoconf/version-numbers", |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
215 |
]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
216 |
|
34491 | 217 |
// Define some common values |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
218 |
var common = getJibProfilesCommon(input, data); |
34491 | 219 |
// Generate the profiles part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
220 |
data.profiles = getJibProfilesProfiles(input, common, data); |
34491 | 221 |
// Generate the dependencies part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
222 |
data.dependencies = getJibProfilesDependencies(input, common, data); |
34491 | 223 |
|
224 |
return data; |
|
225 |
}; |
|
226 |
||
227 |
/** |
|
228 |
* Generates some common values |
|
229 |
* |
|
230 |
* @param input External data to use for generating the configuration |
|
231 |
* @returns Common values |
|
232 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
233 |
var getJibProfilesCommon = function (input, data) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
234 |
var common = {}; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
235 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
236 |
common.organization = "jpg.infra.builddeps"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
237 |
common.build_id = getBuildId(input); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
238 |
common.build_number = input.build_number != null ? input.build_number : "0"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
239 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
240 |
// List of the main profile names used for iteration |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
241 |
common.main_profile_names = [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
242 |
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64", |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
243 |
"solaris-sparcv9", "windows-x64", "windows-x86", |
53831
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
244 |
"linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x" |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
245 |
]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
246 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
247 |
// These are the base setttings for all the main build profiles. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
248 |
common.main_profile_base = { |
52774
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
249 |
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"], |
58846
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
250 |
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
251 |
configure_args: concat(["--enable-jtreg-failure-handler"], |
51207
fc24da4898f1
8207243: Fix translation filtering to also support zh_HK and zh_TW
erikj
parents:
51013
diff
changeset
|
252 |
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK", |
51215 | 253 |
"--disable-manpages", |
52930 | 254 |
"--with-jvm-features=-shenandoahgc", |
50590
5fa19bad622d
8204973: Add build support for filtering translations
erikj
parents:
50543
diff
changeset
|
255 |
versionArgs(input, common)) |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
256 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
257 |
// Extra settings for debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
258 |
common.debug_suffix = "-debug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
259 |
common.debug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
260 |
configure_args: ["--enable-debug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
261 |
labels: "debug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
262 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
263 |
// Extra settings for slowdebug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
264 |
common.slowdebug_suffix = "-slowdebug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
265 |
common.slowdebug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
266 |
configure_args: ["--with-debug-level=slowdebug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
267 |
labels: "slowdebug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
268 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
269 |
// Extra settings for openjdk only profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
270 |
common.open_suffix = "-open"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
271 |
common.open_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
272 |
configure_args: ["--enable-openjdk-only"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
273 |
labels: "open" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
274 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
275 |
|
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
276 |
common.configure_args_64bit = ["--with-target-bits=64"]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
277 |
common.configure_args_32bit = ["--with-target-bits=32"]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
278 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
279 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
280 |
* Define common artifacts template for all main profiles |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
281 |
* @param o - Object containing data for artifacts |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
282 |
*/ |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
283 |
common.main_profile_artifacts = function (o) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
284 |
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
50511 | 285 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
286 |
var pf = o.platform |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
287 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
288 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
289 |
jdk: { |
50511 | 290 |
local: "bundles/\\(jdk.*bin." + jdk_suffix + "\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
291 |
remote: [ |
50511 | 292 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin." + jdk_suffix, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
293 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
294 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
295 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
296 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
297 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
298 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
299 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
300 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
301 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
302 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
303 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
304 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
305 |
}, |
47440
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
306 |
test_demos: { |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
307 |
local: "bundles/\\(jdk.*bin-tests-demos.tar.gz\\)", |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
308 |
remote: [ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
309 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-demos.tar.gz", |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
310 |
"bundles/" + pf + "/\\1" |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
311 |
], |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
312 |
exploded: "images/test" |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
313 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
314 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
315 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
316 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
317 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
318 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
319 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
320 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
321 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
322 |
}, |
58846
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
323 |
static_libs: { |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
324 |
local: "bundles/\\(jdk.*bin-static-libs.tar.gz\\)", |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
325 |
remote: [ |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
326 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-static-libs.tar.gz", |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
327 |
"bundles/" + pf + "/\\1" |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
328 |
], |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
329 |
subdir: jdk_subdir, |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
330 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
331 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
332 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
333 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
334 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
335 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
336 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
337 |
* Define common artifacts template for all debug profiles |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
338 |
* @param o - Object containing data for artifacts |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
339 |
*/ |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
340 |
common.debug_profile_artifacts = function (o) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
341 |
var jdk_subdir = "jdk-" + data.version + "/fastdebug"; |
50511 | 342 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
343 |
var pf = o.platform |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
344 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
345 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
346 |
jdk: { |
50511 | 347 |
local: "bundles/\\(jdk.*bin-debug." + jdk_suffix + "\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
348 |
remote: [ |
50511 | 349 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug." + jdk_suffix, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
350 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
351 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
352 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
353 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
354 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
355 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
356 |
local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
357 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
358 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-debug.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
359 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
360 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
361 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
362 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
363 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
364 |
local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
365 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
366 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
367 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
368 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
369 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
370 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
371 |
}, |
58846
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
372 |
static_libs: { |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
373 |
local: "bundles/\\(jdk.*bin-static-libs-debug.tar.gz\\)", |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
374 |
remote: [ |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
375 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-static-libs-debug.tar.gz", |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
376 |
"bundles/" + pf + "/\\1" |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
377 |
], |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
378 |
subdir: jdk_subdir, |
f9ac726ab347
8232748: Build static versions of certain JDK libraries
erikj
parents:
58723
diff
changeset
|
379 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
380 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
381 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
382 |
}; |
34491 | 383 |
|
58444 | 384 |
common.boot_jdk_version = "13"; |
54288 | 385 |
common.boot_jdk_build_number = "33"; |
53642
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
386 |
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-" |
47365 | 387 |
+ common.boot_jdk_version |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
388 |
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : ""); |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
389 |
|
34491 | 390 |
return common; |
391 |
}; |
|
392 |
||
393 |
/** |
|
394 |
* Generates the profiles part of the configuration. |
|
395 |
* |
|
396 |
* @param input External data to use for generating the configuration |
|
397 |
* @param common The common values |
|
398 |
* @returns {{}} Profiles part of the configuration |
|
399 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
400 |
var getJibProfilesProfiles = function (input, common, data) { |
34491 | 401 |
// Main SE profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
402 |
var profiles = { |
34491 | 403 |
|
404 |
"linux-x64": { |
|
405 |
target_os: "linux", |
|
406 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
407 |
dependencies: ["devkit", "graphviz", "pandoc", "graalunit_lib"], |
44727 | 408 |
configure_args: concat(common.configure_args_64bit, |
53240 | 409 |
"--enable-full-docs", "--with-zlib=system", |
410 |
(isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu", |
|
411 |
"--build=x86_64-unknown-linux-gnu" ] : [])), |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
412 |
default_make_targets: ["docs-bundles"], |
34491 | 413 |
}, |
414 |
||
415 |
"linux-x86": { |
|
416 |
target_os: "linux", |
|
417 |
target_cpu: "x86", |
|
418 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
419 |
dependencies: ["devkit"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
420 |
configure_args: concat(common.configure_args_32bit, |
39190
a6b5b18fd06c
8154209: Remove client VM from default JIB profile on windows-x86 and linux-x86
lmesnik
parents:
37972
diff
changeset
|
421 |
"--with-jvm-variants=minimal,server", "--with-zlib=system"), |
34491 | 422 |
}, |
423 |
||
424 |
"macosx-x64": { |
|
425 |
target_os: "macosx", |
|
426 |
target_cpu: "x64", |
|
52714
2e52aa822c57
8178317: Create man pages using pandoc from markdown sources
ihse
parents:
52595
diff
changeset
|
427 |
dependencies: ["devkit", "pandoc", "graalunit_lib"], |
45875 | 428 |
configure_args: concat(common.configure_args_64bit, "--with-zlib=system", |
49523 | 429 |
"--with-macosx-version-max=10.9.0"), |
34491 | 430 |
}, |
431 |
||
432 |
"solaris-x64": { |
|
433 |
target_os: "solaris", |
|
434 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
435 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
436 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
437 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 438 |
}, |
439 |
||
440 |
"solaris-sparcv9": { |
|
441 |
target_os: "solaris", |
|
442 |
target_cpu: "sparcv9", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
443 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
444 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
445 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 446 |
}, |
447 |
||
448 |
"windows-x64": { |
|
449 |
target_os: "windows", |
|
450 |
target_cpu: "x64", |
|
52917 | 451 |
dependencies: ["devkit", "pandoc", "graalunit_lib"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
452 |
configure_args: concat(common.configure_args_64bit), |
34491 | 453 |
}, |
454 |
||
455 |
"windows-x86": { |
|
456 |
target_os: "windows", |
|
457 |
target_cpu: "x86", |
|
458 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
459 |
dependencies: ["devkit"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
460 |
configure_args: concat(common.configure_args_32bit), |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
461 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
462 |
|
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
463 |
"linux-aarch64": { |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
464 |
target_os: "linux", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
465 |
target_cpu: "aarch64", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
466 |
build_cpu: "x64", |
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
467 |
dependencies: ["devkit", "build_devkit", "cups"], |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
468 |
configure_args: [ |
49525
4d98473ed33e
8200727: linux-aarch64 profile should use bundled freetype
ihse
parents:
49523
diff
changeset
|
469 |
"--openjdk-target=aarch64-linux-gnu", "--with-freetype=bundled", |
52351 | 470 |
"--disable-warnings-as-errors" |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
471 |
], |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
472 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
473 |
|
50472 | 474 |
"linux-arm32": { |
475 |
target_os: "linux", |
|
476 |
target_cpu: "arm", |
|
477 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
478 |
dependencies: ["devkit", "build_devkit", "cups"], |
50472 | 479 |
configure_args: [ |
480 |
"--openjdk-target=arm-linux-gnueabihf", "--with-freetype=bundled", |
|
481 |
"--with-abi-profile=arm-vfp-hflt", "--disable-warnings-as-errors" |
|
482 |
], |
|
483 |
}, |
|
53831
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
484 |
|
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
485 |
"linux-ppc64le": { |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
486 |
target_os: "linux", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
487 |
target_cpu: "ppc64le", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
488 |
build_cpu: "x64", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
489 |
dependencies: ["devkit", "build_devkit", "cups"], |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
490 |
configure_args: [ |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
491 |
"--openjdk-target=ppc64le-linux-gnu", "--with-freetype=bundled", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
492 |
"--disable-warnings-as-errors" |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
493 |
], |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
494 |
}, |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
495 |
|
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
496 |
"linux-s390x": { |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
497 |
target_os: "linux", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
498 |
target_cpu: "s390x", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
499 |
build_cpu: "x64", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
500 |
dependencies: ["devkit", "build_devkit", "cups"], |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
501 |
configure_args: [ |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
502 |
"--openjdk-target=s390x-linux-gnu", "--with-freetype=bundled", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
503 |
"--disable-warnings-as-errors" |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
504 |
], |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
505 |
}, |
34491 | 506 |
}; |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
507 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
508 |
// Add the base settings to all the main profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
509 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
510 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
511 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
512 |
|
34491 | 513 |
// Generate debug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
514 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
515 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
516 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
517 |
common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
518 |
}); |
36532 | 519 |
// Generate slowdebug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
520 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
521 |
var debugName = name + common.slowdebug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
522 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
523 |
common.slowdebug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
524 |
}); |
49243 | 525 |
// Generate testmake profiles for the main profile of each build host |
526 |
// platform. This profile only runs the makefile tests. |
|
527 |
// Ant is needed to run the idea project generator test. |
|
528 |
var testmakeBase = { |
|
529 |
dependencies: [ "ant" ], |
|
530 |
environment: { |
|
53642
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
531 |
"ANT_HOME": input.get("ant", "home_path") |
49243 | 532 |
} |
533 |
}; |
|
534 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"] |
|
535 |
.forEach(function (name) { |
|
536 |
var maketestName = name + "-testmake"; |
|
537 |
profiles[maketestName] = concatObjects(profiles[name], testmakeBase); |
|
52368
ecef74be8e25
8213237: Remove test-compile-commands from jib-profiles.js
ihse
parents:
52357
diff
changeset
|
538 |
profiles[maketestName].default_make_targets = [ "test-make" ]; |
49243 | 539 |
}); |
34491 | 540 |
|
53857 | 541 |
// Generate -gcov profiles |
542 |
[ "linux-x64", "macosx-x64" ].forEach(function (name) { |
|
543 |
var gcovName = name + "-gcov"; |
|
544 |
profiles[gcovName] = clone(profiles[name]); |
|
545 |
profiles[gcovName].default_make_targets = ["product-bundles", "test-bundles"]; |
|
546 |
profiles[gcovName].configure_args = concat(profiles[gcovName].configure_args, |
|
547 |
["--enable-native-coverage", "--disable-warnings-as-errors"]); |
|
548 |
}); |
|
549 |
||
51994 | 550 |
// Profiles for building the zero jvm variant. These are used for verification. |
42425 | 551 |
var zeroProfiles = { |
552 |
"linux-x64-zero": { |
|
553 |
target_os: "linux", |
|
554 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
555 |
dependencies: ["devkit"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
556 |
configure_args: concat(common.configure_args_64bit, [ |
42425 | 557 |
"--with-zlib=system", |
558 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
559 |
"--enable-libffi-bundling" |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
560 |
]) |
42425 | 561 |
}, |
562 |
||
563 |
"linux-x86-zero": { |
|
564 |
target_os: "linux", |
|
565 |
target_cpu: "x86", |
|
566 |
build_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
567 |
dependencies: ["devkit"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
568 |
configure_args: concat(common.configure_args_32bit, [ |
42425 | 569 |
"--with-zlib=system", |
570 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
571 |
"--enable-libffi-bundling" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
572 |
]) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
573 |
} |
42425 | 574 |
} |
575 |
profiles = concatObjects(profiles, zeroProfiles); |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
576 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
577 |
// Add the base settings to the zero profiles and generate debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
578 |
Object.keys(zeroProfiles).forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
579 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
580 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
581 |
profiles[debugName] = concatObjects(profiles[name], common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
582 |
}); |
42425 | 583 |
|
52443
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
584 |
// Define a profile with precompiled headers disabled. This is just used for |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
585 |
// verfication of this build configuration. |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
586 |
var noPchProfiles = { |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
587 |
"linux-x64-debug-nopch": { |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
588 |
target_os: "linux", |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
589 |
target_cpu: "x64", |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
590 |
dependencies: ["devkit"], |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
591 |
configure_args: concat(common.configure_args_64bit, |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
592 |
"--with-zlib=system", "--disable-precompiled-headers"), |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
593 |
}, |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
594 |
}; |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
595 |
profiles = concatObjects(profiles, noPchProfiles); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
596 |
// Add base settings to noPch profiles |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
597 |
Object.keys(noPchProfiles).forEach(function (name) { |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
598 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
599 |
profiles[name] = concatObjects(common.debug_profile_base, profiles[name]); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
600 |
// Override default make target with hotspot as that's the only part of |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
601 |
// the build using precompiled headers. |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
602 |
profiles[name].default_make_targets = ["hotspot"]; |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
603 |
}); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
604 |
|
50543 | 605 |
// Bootcycle profiles runs the build with itself as the boot jdk. This can |
606 |
// be done in two ways. Either using the builtin bootcycle target in the |
|
607 |
// build system. Or by supplying the main jdk build as bootjdk to configure. |
|
608 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
609 |
.forEach(function (name) { |
|
610 |
var bootcycleName = name + "-bootcycle"; |
|
611 |
var bootcyclePrebuiltName = name + "-bootcycle-prebuilt"; |
|
612 |
// The base bootcycle profile just changes the default target |
|
613 |
// compared to the base profile |
|
614 |
profiles[bootcycleName] = clone(profiles[name]); |
|
615 |
profiles[bootcycleName].default_make_targets = [ "bootcycle-images" ]; |
|
616 |
// The prebuilt bootcycle variant modifies the boot jdk argument |
|
617 |
var bootcyclePrebuiltBase = { |
|
618 |
dependencies: [ name + ".jdk" ], |
|
619 |
configure_args: "--with-boot-jdk=" + input.get(name + ".jdk", "home_path"), |
|
620 |
} |
|
621 |
profiles[bootcyclePrebuiltName] = concatObjects(profiles[name], |
|
622 |
bootcyclePrebuiltBase); |
|
623 |
var bootJdkIndex = profiles[bootcyclePrebuiltName].dependencies.indexOf("boot_jdk"); |
|
624 |
delete profiles[bootcyclePrebuiltName].dependencies[bootJdkIndex]; |
|
625 |
profiles[bootcyclePrebuiltName].default_make_targets = [ "product-images" ]; |
|
626 |
}); |
|
627 |
||
53423 | 628 |
// JCov profiles build JCov-instrumented JDK image based on images provided through dependencies. |
629 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
630 |
.forEach(function (name) { |
|
631 |
var jcovName = name + "-jcov"; |
|
632 |
profiles[jcovName] = clone(common.main_profile_base); |
|
633 |
profiles[jcovName].target_os = profiles[name].target_os |
|
634 |
profiles[jcovName].target_cpu = profiles[name].target_cpu |
|
635 |
profiles[jcovName].default_make_targets = [ "jcov-bundles" ]; |
|
636 |
profiles[jcovName].dependencies = concat(profiles[jcovName].dependencies, |
|
637 |
[ name + ".jdk", "devkit" ]); |
|
638 |
profiles[jcovName].configure_args = concat(profiles[jcovName].configure_args, |
|
639 |
["--with-jcov-input-jdk=" + input.get(name + ".jdk", "home_path")]); |
|
640 |
}); |
|
641 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
642 |
// |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
643 |
// Define artifacts for profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
644 |
// |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
645 |
// Macosx bundles are named osx |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
646 |
// tar.gz. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
647 |
var artifactData = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
648 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
649 |
platform: "linux-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
650 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
651 |
"linux-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
652 |
platform: "linux-x86", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
653 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
654 |
"macosx-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
655 |
platform: "osx-x64", |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
656 |
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
657 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
658 |
"solaris-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
659 |
platform: "solaris-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
660 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
661 |
"solaris-sparcv9": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
662 |
platform: "solaris-sparcv9", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
663 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
664 |
"windows-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
665 |
platform: "windows-x64", |
50511 | 666 |
jdk_suffix: "zip", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
667 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
668 |
"windows-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
669 |
platform: "windows-x86", |
50511 | 670 |
jdk_suffix: "zip", |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
671 |
}, |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
672 |
"linux-aarch64": { |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
673 |
platform: "linux-aarch64", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
674 |
}, |
50472 | 675 |
"linux-arm32": { |
676 |
platform: "linux-arm32", |
|
53831
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
677 |
}, |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
678 |
"linux-ppc64le": { |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
679 |
platform: "linux-ppc64le", |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
680 |
}, |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
681 |
"linux-s390x": { |
c419f0c1c355
8218135: Redo: Add ppc64le and s390x profiles to jib-profiles.js
erikj
parents:
53711
diff
changeset
|
682 |
platform: "linux-s390x", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
683 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
684 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
685 |
// Generate common artifacts for all main profiles |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
686 |
Object.keys(artifactData).forEach(function (name) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
687 |
profiles[name] = concatObjects(profiles[name], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
688 |
common.main_profile_artifacts(artifactData[name])); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
689 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
690 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
691 |
// Generate common artifacts for all debug profiles |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
692 |
Object.keys(artifactData).forEach(function (name) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
693 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
694 |
profiles[debugName] = concatObjects(profiles[debugName], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
695 |
common.debug_profile_artifacts(artifactData[name])); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
696 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
697 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
698 |
profilesArtifacts = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
699 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
700 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
701 |
doc_api_spec: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
702 |
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
703 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
704 |
"bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
705 |
"bundles/linux-x64/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
706 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
707 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
708 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
709 |
} |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
710 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
711 |
profiles = concatObjects(profiles, profilesArtifacts); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
712 |
|
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
713 |
// Generate open only profiles for all the main and debug profiles. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
714 |
// Rewrite artifact remote paths by adding "openjdk/GPL". |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
715 |
common.main_profile_names.forEach(function (name) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
716 |
var openName = name + common.open_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
717 |
profiles[openName] = concatObjects(profiles[name], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
718 |
common.open_profile_base); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
719 |
for (artifactName in profiles[openName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
720 |
var artifact = profiles[openName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
721 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
722 |
"bundles\/", "bundles/openjdk/GPL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
723 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
724 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
725 |
var debugName = name + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
726 |
var openDebugName = name + common.open_suffix + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
727 |
profiles[openDebugName] = concatObjects(profiles[debugName], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
728 |
common.open_profile_base); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
729 |
for (artifactName in profiles[openDebugName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
730 |
var artifact = profiles[openDebugName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
731 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
732 |
"bundles\/", "bundles/openjdk/GPL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
733 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
734 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
735 |
}); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
736 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
737 |
// Define the reference implementation profiles. These are basically the same |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
738 |
// as the open profiles, but upload artifacts to a different location. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
739 |
common.main_profile_names.forEach(function (name) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
740 |
var riName = name + "-ri"; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
741 |
var riDebugName = riName + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
742 |
var openName = name + common.open_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
743 |
var openDebugName = openName + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
744 |
profiles[riName] = clone(profiles[openName]); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
745 |
profiles[riDebugName] = clone(profiles[openDebugName]); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
746 |
// Rewrite all remote dirs to "bundles/openjdk/BCL/..." |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
747 |
for (artifactName in profiles[riName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
748 |
var artifact = profiles[riName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
749 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
750 |
"\/GPL\/", "/BCL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
751 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
752 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
753 |
}); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
754 |
|
48212
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
755 |
// For open profiles, the non-debug jdk bundles, need an "open" prefix on the |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
756 |
// remote bundle names, forming the word "openjdk". See JDK-8188789. |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
757 |
common.main_profile_names.forEach(function (name) { |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
758 |
var openName = name + common.open_suffix; |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
759 |
profiles[openName].artifacts["jdk"].remote = replaceAll( |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
760 |
"\/jdk-", "/openjdk-", |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
761 |
replaceAll("\/\\1", "/open\\1", |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
762 |
profiles[openName].artifacts["jdk"].remote)); |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
763 |
}); |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
764 |
|
50807
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
765 |
// Generate cmp-baseline profiles for each main profile and their |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
766 |
// corresponding debug profile. This profile does a compare build run with no |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
767 |
// changes to verify that the compare script has a clean baseline |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
768 |
common.main_profile_names.forEach(function (name) { |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
769 |
[ "", common.open_suffix ].forEach(function (suffix) { |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
770 |
var cmpBaselineName = name + suffix + "-cmp-baseline"; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
771 |
profiles[cmpBaselineName] = clone(profiles[name + suffix]); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
772 |
// Only compare the images target. This should pressumably be expanded |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
773 |
// to include more build targets when possible. |
54325
04f1a0f925db
8220530: Build compare script does not compare the contents of the test image
erikj
parents:
54288
diff
changeset
|
774 |
profiles[cmpBaselineName].default_make_targets = [ "images", "test-image" ]; |
04f1a0f925db
8220530: Build compare script does not compare the contents of the test image
erikj
parents:
54288
diff
changeset
|
775 |
if (name == "linux-x64") { |
04f1a0f925db
8220530: Build compare script does not compare the contents of the test image
erikj
parents:
54288
diff
changeset
|
776 |
profiles[cmpBaselineName].default_make_targets |
04f1a0f925db
8220530: Build compare script does not compare the contents of the test image
erikj
parents:
54288
diff
changeset
|
777 |
= concat(profiles[cmpBaselineName].default_make_targets, "docs"); |
04f1a0f925db
8220530: Build compare script does not compare the contents of the test image
erikj
parents:
54288
diff
changeset
|
778 |
} |
50807
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
779 |
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ]; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
780 |
// Do not inherit artifact definitions from base profile |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
781 |
delete profiles[cmpBaselineName].artifacts; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
782 |
}); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
783 |
}); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
784 |
|
53423 | 785 |
// Artifacts of JCov profiles |
786 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
787 |
.forEach(function (name) { |
|
788 |
var o = artifactData[name] |
|
789 |
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
|
790 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
|
791 |
var pf = o.platform |
|
792 |
var jcovName = name + "-jcov"; |
|
793 |
profiles[jcovName].artifacts = { |
|
794 |
jdk: { |
|
795 |
local: "bundles/\\(jdk-jcov.*bin." + jdk_suffix + "\\)", |
|
796 |
remote: [ |
|
797 |
"bundles/" + pf + "/jdk-jcov-" + data.version + "_" + pf + "_bin." + jdk_suffix |
|
798 |
], |
|
799 |
subdir: jdk_subdir, |
|
800 |
exploded: "images/jdk-jcov" |
|
801 |
} |
|
802 |
}; |
|
803 |
}); |
|
804 |
||
53857 | 805 |
// Artifacts of gcov (native-code-coverage) profiles |
806 |
[ "linux-x64", "macosx-x64" ].forEach(function (name) { |
|
807 |
var o = artifactData[name] |
|
808 |
var pf = o.platform |
|
809 |
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
|
810 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
|
811 |
var gcovName = name + "-gcov"; |
|
812 |
profiles[gcovName].artifacts = { |
|
813 |
jdk: { |
|
814 |
local: "bundles/\\(jdk.*bin." + jdk_suffix + "\\)", |
|
815 |
remote: [ |
|
816 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-gcov." + jdk_suffix, |
|
817 |
], |
|
818 |
subdir: jdk_subdir, |
|
819 |
exploded: "images/jdk", |
|
820 |
}, |
|
821 |
test: { |
|
822 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
|
823 |
remote: [ |
|
824 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-gcov-tests.tar.gz", |
|
825 |
], |
|
826 |
exploded: "images/test" |
|
827 |
}, |
|
828 |
jdk_symbols: { |
|
829 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
|
830 |
remote: [ |
|
831 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-gcov-symbols.tar.gz", |
|
832 |
], |
|
833 |
subdir: jdk_subdir, |
|
834 |
exploded: "images/jdk" |
|
835 |
}, |
|
836 |
}; |
|
837 |
}); |
|
838 |
||
51994 | 839 |
// Profiles used to run tests. |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
840 |
var testOnlyProfiles = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
841 |
"run-test": { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
842 |
target_os: input.build_os, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
843 |
target_cpu: input.build_cpu, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
844 |
dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
845 |
labels: "test", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
846 |
environment: { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
847 |
"JT_JAVA": common.boot_jdk_home |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
848 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
849 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
850 |
}; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
851 |
profiles = concatObjects(profiles, testOnlyProfiles); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
852 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
853 |
// Profiles used to run tests using Jib for internal dependencies. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
854 |
var testedProfile = input.testedProfile; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
855 |
if (testedProfile == null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
856 |
testedProfile = input.build_os + "-" + input.build_cpu; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
857 |
} |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
858 |
var testedProfileJdk = testedProfile + ".jdk"; |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
859 |
// Make it possible to use the test image from a different profile |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
860 |
var testImageProfile; |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
861 |
if (input.testImageProfile != null) { |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
862 |
testImageProfile = input.testImageProfile; |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
863 |
} else if (testedProfile.endsWith("-jcov")) { |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
864 |
testImageProfile = testedProfile.substring(0, testedProfile.length - "-jcov".length); |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
865 |
} else { |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
866 |
testImageProfile = testedProfile; |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
867 |
} |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
868 |
var testedProfileTest = testImageProfile + ".test" |
53857 | 869 |
var testOnlyMake = [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ]; |
870 |
if (testedProfile.endsWith("-gcov")) { |
|
871 |
testOnlyMake = concat(testOnlyMake, "GCOV_ENABLED=true") |
|
872 |
} |
|
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
873 |
var testOnlyProfilesPrebuilt = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
874 |
"run-test-prebuilt": { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
875 |
target_os: input.build_os, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
876 |
target_cpu: input.build_cpu, |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
877 |
dependencies: [ |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
878 |
"jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJdk, |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
879 |
testedProfileTest |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
880 |
], |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
881 |
src: "src.conf", |
53857 | 882 |
make_args: testOnlyMake, |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
883 |
environment: { |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
884 |
"BOOT_JDK": common.boot_jdk_home, |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
885 |
"JDK_IMAGE_DIR": input.get(testedProfileJdk, "home_path"), |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
886 |
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path") |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
887 |
}, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
888 |
labels: "test" |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
889 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
890 |
}; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
891 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
892 |
// If actually running the run-test-prebuilt profile, verify that the input |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
893 |
// variable is valid and if so, add the appropriate target_* values from |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
894 |
// the tested profile. Use testImageProfile value as backup. |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
895 |
if (input.profile == "run-test-prebuilt") { |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
896 |
if (profiles[testedProfile] == null && profiles[testImageProfile] == null) { |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
897 |
error("testedProfile is not defined: " + testedProfile + " " + testImageProfile); |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
898 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
899 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
900 |
if (profiles[testedProfile] != null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
901 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"] |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
902 |
= profiles[testedProfile]["target_os"]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
903 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"] |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
904 |
= profiles[testedProfile]["target_cpu"]; |
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
905 |
} else if (profiles[testImageProfile] != null) { |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
906 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"] |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
907 |
= profiles[testImageProfile]["target_os"]; |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
908 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"] |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
909 |
= profiles[testImageProfile]["target_cpu"]; |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
910 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
911 |
profiles = concatObjects(profiles, testOnlyProfilesPrebuilt); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
912 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
913 |
// On macosx add the devkit bin dir to the path in all the run-test profiles. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
914 |
// This gives us a guaranteed working version of lldb for the jtreg failure handler. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
915 |
if (input.build_os == "macosx") { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
916 |
macosxRunTestExtra = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
917 |
environment_path: input.get("devkit", "install_path") |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
918 |
+ "/Xcode.app/Contents/Developer/usr/bin" |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
919 |
}; |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
920 |
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
921 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
922 |
} |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
923 |
// On windows we want the debug symbols available at test time |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
924 |
if (input.build_os == "windows") { |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
925 |
windowsRunTestPrebuiltExtra = { |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
926 |
dependencies: [ testedProfile + ".jdk_symbols" ], |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
927 |
environment: { |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
928 |
"SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path"), |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
929 |
} |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
930 |
}; |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
931 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
932 |
windowsRunTestPrebuiltExtra); |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
933 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
934 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
935 |
// The profile run-test-prebuilt defines src.conf as the src bundle. When |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
936 |
// running in Mach 5, this reduces the time it takes to populate the |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
937 |
// considerably. But with just src.conf, we cannot actually run any tests, |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
938 |
// so if running from a workspace with just src.conf in it, we need to also |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
939 |
// get src.full as a dependency, and define the work_dir (where make gets |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
940 |
// run) to be in the src.full install path. By running in the install path, |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
941 |
// the same cached installation of the full src can be reused for multiple |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
942 |
// test tasks. Care must however be taken not to polute that work dir by |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
943 |
// setting the appropriate make variables to control output directories. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
944 |
// |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
945 |
// Use the existance of the top level README as indication of if this is |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
946 |
// the full source or just src.conf. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
947 |
if (!new java.io.File(__DIR__, "../../README").exists()) { |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
948 |
var runTestPrebuiltSrcFullExtra = { |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
949 |
dependencies: "src.full", |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
950 |
work_dir: input.get("src.full", "install_path"), |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
951 |
} |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
952 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
953 |
runTestPrebuiltSrcFullExtra); |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
954 |
} |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
955 |
|
34491 | 956 |
// Generate the missing platform attributes |
957 |
profiles = generatePlatformAttributes(profiles); |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
958 |
profiles = generateDefaultMakeTargetsConfigureArg(common, profiles); |
34491 | 959 |
return profiles; |
960 |
}; |
|
961 |
||
962 |
/** |
|
963 |
* Generate the dependencies part of the configuration |
|
964 |
* |
|
965 |
* @param input External data to use for generating the configuration |
|
966 |
* @param common The common values |
|
967 |
* @returns {{}} Dependencies part of configuration |
|
968 |
*/ |
|
34496 | 969 |
var getJibProfilesDependencies = function (input, common) { |
34491 | 970 |
|
971 |
var devkit_platform_revisions = { |
|
58558
67daaa6c8d2b
8232133: Change to GCC 8.3 for building on Linux at Oracle
erikj
parents:
58444
diff
changeset
|
972 |
linux_x64: "gcc8.3.0-OL6.4+1.0", |
53993
271f75d4b494
8219986: Change to Xcode 10.1 for building on Macosx at Oracle
erikj
parents:
53992
diff
changeset
|
973 |
macosx_x64: "Xcode10.1-MacOSX10.14+1.0", |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
34496
diff
changeset
|
974 |
solaris_x64: "SS12u4-Solaris11u1+1.0", |
51899
11fd6c8188d9
8211130: Change to Oracle Developer Studio 12.6 for building on Solaris at Oracle
erikj
parents:
51856
diff
changeset
|
975 |
solaris_sparcv9: "SS12u6-Solaris11u3+1.0", |
58559
06bd38a9bc5a
8232134: Change to Visual Studio 2017 15.9.16 for building on Windows at Oracle
erikj
parents:
58558
diff
changeset
|
976 |
windows_x64: "VS2017-15.9.16+1.0", |
54148
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
977 |
linux_aarch64: "gcc8.2.0-Fedora27+1.0", |
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
978 |
linux_arm: "gcc8.2.0-Fedora27+1.0", |
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
979 |
linux_ppc64le: "gcc8.2.0-Fedora27+1.0", |
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
980 |
linux_s390x: "gcc8.2.0-Fedora27+1.0" |
34491 | 981 |
}; |
982 |
||
983 |
var devkit_platform = (input.target_cpu == "x86" |
|
984 |
? input.target_os + "_x64" |
|
985 |
: input.target_platform); |
|
986 |
||
54148
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
987 |
var devkit_cross_prefix = ""; |
54180 | 988 |
if (input.build_platform != input.target_platform |
989 |
&& input.build_platform != devkit_platform) { |
|
54148
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
990 |
devkit_cross_prefix = input.build_platform + "-to-"; |
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
991 |
} |
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
992 |
|
47364 | 993 |
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os) |
994 |
+ "-" + input.build_cpu; |
|
53240 | 995 |
var boot_jdk_ext = (input.build_os == "windows" ? ".zip" : ".tar.gz") |
996 |
// If running in WSL and building for Windows, it will look like Linux, |
|
997 |
// but we need a Windows boot JDK. |
|
998 |
if (isWsl(input) && input.target_os == "windows") { |
|
999 |
boot_jdk_platform = "windows-" + input.build_cpu; |
|
1000 |
boot_jdk_ext = ".zip"; |
|
1001 |
} |
|
47364 | 1002 |
|
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1003 |
var makeBinDir = (input.build_os == "windows" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1004 |
? input.get("gnumake", "install_path") + "/cygwin/bin" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1005 |
: input.get("gnumake", "install_path") + "/bin"); |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1006 |
|
34491 | 1007 |
var dependencies = { |
1008 |
||
1009 |
boot_jdk: { |
|
47364 | 1010 |
server: "jpg", |
1011 |
product: "jdk", |
|
47365 | 1012 |
version: common.boot_jdk_version, |
54288 | 1013 |
build_number: common.boot_jdk_build_number, |
47365 | 1014 |
file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_" |
53240 | 1015 |
+ boot_jdk_platform + "_bin" + boot_jdk_ext, |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
1016 |
configure_args: "--with-boot-jdk=" + common.boot_jdk_home, |
43288
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
1017 |
environment_path: common.boot_jdk_home + "/bin" |
34491 | 1018 |
}, |
1019 |
||
1020 |
devkit: { |
|
1021 |
organization: common.organization, |
|
1022 |
ext: "tar.gz", |
|
54148
62e4ada7c4c8
8220093: Change to GCC 8.2 for building on Linux at Oracle
erikj
parents:
53993
diff
changeset
|
1023 |
module: "devkit-" + devkit_cross_prefix + devkit_platform, |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
1024 |
revision: devkit_platform_revisions[devkit_platform], |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
1025 |
environment: { |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
1026 |
"DEVKIT_HOME": input.get("devkit", "home_path"), |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
1027 |
} |
34491 | 1028 |
}, |
1029 |
||
1030 |
build_devkit: { |
|
1031 |
organization: common.organization, |
|
1032 |
ext: "tar.gz", |
|
1033 |
module: "devkit-" + input.build_platform, |
|
1034 |
revision: devkit_platform_revisions[input.build_platform] |
|
1035 |
}, |
|
1036 |
||
1037 |
cups: { |
|
1038 |
organization: common.organization, |
|
1039 |
ext: "tar.gz", |
|
1040 |
revision: "1.0118+1.0" |
|
1041 |
}, |
|
1042 |
||
1043 |
jtreg: { |
|
1044 |
server: "javare", |
|
36506 | 1045 |
revision: "4.2", |
53836 | 1046 |
build_number: "b14", |
34491 | 1047 |
checksum_file: "MD5_VALUES", |
36506 | 1048 |
file: "jtreg_bin-4.2.zip", |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
1049 |
environment_name: "JT_HOME", |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
1050 |
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin" |
34491 | 1051 |
}, |
1052 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
1053 |
jmh: { |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
1054 |
organization: common.organization, |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
1055 |
ext: "tar.gz", |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
1056 |
revision: "1.21+1.0" |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
1057 |
}, |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
1058 |
|
52774
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
1059 |
jcov: { |
53711
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1060 |
// Until an official build of JCov is available, use custom |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1061 |
// build to support classfile version 57. |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1062 |
// See CODETOOLS-7902358 for more info. |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1063 |
// server: "jpg", |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1064 |
// product: "jcov", |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1065 |
// version: "3.0", |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1066 |
// build_number: "b07", |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1067 |
// file: "bundles/jcov-3_0.zip", |
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1068 |
organization: common.organization, |
55431
43627549a488
8226359: Switch to JCov build which supports byte code version 58
shurailine
parents:
54789
diff
changeset
|
1069 |
revision: "3.0-58-support+1.0", |
53711
8041cefba76b
8218692: Switch to JCov build which supports byte code version 57
shurailine
parents:
53692
diff
changeset
|
1070 |
ext: "zip", |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
1071 |
environment_name: "JCOV_HOME", |
52774
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
1072 |
}, |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
1073 |
|
34491 | 1074 |
gnumake: { |
1075 |
organization: common.organization, |
|
1076 |
ext: "tar.gz", |
|
1077 |
revision: "4.0+1.0", |
|
1078 |
||
1079 |
module: (input.build_os == "windows" |
|
1080 |
? "gnumake-" + input.build_osenv_platform |
|
1081 |
: "gnumake-" + input.build_platform), |
|
1082 |
||
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1083 |
configure_args: "MAKE=" + makeBinDir + "/make", |
34491 | 1084 |
|
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1085 |
environment: { |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1086 |
"MAKE": makeBinDir + "/make" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1087 |
}, |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1088 |
|
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
1089 |
environment_path: makeBinDir |
34491 | 1090 |
}, |
1091 |
||
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1092 |
autoconf: { |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1093 |
organization: common.organization, |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1094 |
ext: "tar.gz", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1095 |
revision: "2.69+1.0.1", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1096 |
module: (input.build_os == "windows" |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1097 |
? "autoconf-" + input.build_osenv_platform |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1098 |
: "autoconf-" + input.build_platform), |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1099 |
configure_args: "", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1100 |
environment_path: input.get("autoconf", "install_path") |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1101 |
}, |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1102 |
|
44727 | 1103 |
graphviz: { |
1104 |
organization: common.organization, |
|
1105 |
ext: "tar.gz", |
|
1106 |
revision: "2.38.0-1+1.1", |
|
1107 |
module: "graphviz-" + input.target_platform, |
|
45107 | 1108 |
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot", |
1109 |
environment_path: input.get("graphviz", "install_path") |
|
44727 | 1110 |
}, |
44734 | 1111 |
|
1112 |
pandoc: { |
|
1113 |
organization: common.organization, |
|
1114 |
ext: "tar.gz", |
|
52714
2e52aa822c57
8178317: Create man pages using pandoc from markdown sources
ihse
parents:
52595
diff
changeset
|
1115 |
revision: "2.3.1+1.0", |
53240 | 1116 |
module: "pandoc-" + input.build_platform, |
45107 | 1117 |
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc", |
1118 |
environment_path: input.get("pandoc", "install_path") + "/pandoc" |
|
44734 | 1119 |
}, |
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
1120 |
|
46196
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1121 |
// This adds java jib as a dependency for the test artifacts resolver |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1122 |
jib: { |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1123 |
organization: "com.oracle.java.jib", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1124 |
ext: "zip", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1125 |
classifier: "distribution", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1126 |
revision: "3.0-SNAPSHOT", |
51856
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
51466
diff
changeset
|
1127 |
environment_name: "JIB_HOME", |
53642
2336cd378e7f
8218177: Bump jib format_version to support new devkit archive layout
erikj
parents:
53607
diff
changeset
|
1128 |
environment_value: input.get("jib", "home_path") |
49243 | 1129 |
}, |
1130 |
||
1131 |
ant: { |
|
1132 |
organization: common.organization, |
|
1133 |
ext: "zip", |
|
1134 |
revision: "1.7.1+1.0", |
|
1135 |
configure_args: "", |
|
1136 |
}, |
|
1137 |
||
50908 | 1138 |
graalunit_lib: { |
1139 |
organization: common.organization, |
|
1140 |
ext: "zip", |
|
1141 |
revision: "619_Apr_12_2018", |
|
1142 |
module: "graalunit-lib", |
|
1143 |
configure_args: "--with-graalunit-lib=" + input.get("graalunit_lib", "install_path"), |
|
1144 |
environment_name: "GRAALUNIT_LIB" |
|
1145 |
}, |
|
34491 | 1146 |
}; |
1147 |
||
1148 |
return dependencies; |
|
1149 |
}; |
|
1150 |
||
1151 |
/** |
|
1152 |
* Generate the missing platform attributes for profiles |
|
1153 |
* |
|
1154 |
* @param profiles Profiles map to generate attributes on |
|
1155 |
* @returns {{}} New profiles map with platform attributes fully filled in |
|
1156 |
*/ |
|
1157 |
var generatePlatformAttributes = function (profiles) { |
|
1158 |
var ret = concatObjects(profiles, {}); |
|
1159 |
for (var profile in profiles) { |
|
1160 |
if (ret[profile].build_os == null) { |
|
1161 |
ret[profile].build_os = ret[profile].target_os; |
|
1162 |
} |
|
1163 |
if (ret[profile].build_cpu == null) { |
|
1164 |
ret[profile].build_cpu = ret[profile].target_cpu; |
|
1165 |
} |
|
1166 |
ret[profile].target_platform = ret[profile].target_os + "_" + ret[profile].target_cpu; |
|
1167 |
ret[profile].build_platform = ret[profile].build_os + "_" + ret[profile].build_cpu; |
|
1168 |
} |
|
1169 |
return ret; |
|
1170 |
}; |
|
1171 |
||
1172 |
/** |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1173 |
* The default_make_targets attribute on a profile is not a real Jib attribute. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1174 |
* This function rewrites that attribute into the corresponding configure arg. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1175 |
* Calling this function multiple times on the same profiles object is safe. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1176 |
* |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1177 |
* @param common Common values |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1178 |
* @param profiles Profiles map to rewrite profiles for |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1179 |
* @returns {{}} New map of profiles with the make targets converted |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1180 |
*/ |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1181 |
var generateDefaultMakeTargetsConfigureArg = function (common, profiles) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1182 |
var ret = concatObjects(profiles, {}); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1183 |
for (var profile in ret) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1184 |
if (ret[profile]["default_make_targets"] != null) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1185 |
var targetsString = concat(ret[profile].default_make_targets).join(" "); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1186 |
// Iterate over all configure args and see if --with-default-make-target |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1187 |
// is already there and change it, otherwise add it. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1188 |
var found = false; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1189 |
for (var i in ret[profile].configure_args) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1190 |
var arg = ret[profile].configure_args[i]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1191 |
if (arg != null && arg.startsWith("--with-default-make-target=")) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1192 |
found = true; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1193 |
ret[profile].configure_args[i] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1194 |
= "--with-default-make-target=" + targetsString; |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1195 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1196 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1197 |
if (!found) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1198 |
ret[profile].configure_args = concat( |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1199 |
ret[profile].configure_args, |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1200 |
"--with-default-make-target=" + targetsString); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1201 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1202 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1203 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1204 |
return ret; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1205 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1206 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1207 |
var getBuildId = function (input) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1208 |
if (input.build_id != null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1209 |
return input.build_id; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1210 |
} else { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1211 |
var topdir = new java.io.File(__DIR__, "../..").getCanonicalFile().getName(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1212 |
var userName = java.lang.System.getProperty("user.name"); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1213 |
return userName + "." + topdir; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1214 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1215 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1216 |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1217 |
/** |
34491 | 1218 |
* Deep clones an object tree. |
1219 |
* |
|
1220 |
* @param o Object to clone |
|
1221 |
* @returns {{}} Clone of o |
|
1222 |
*/ |
|
1223 |
var clone = function (o) { |
|
1224 |
return JSON.parse(JSON.stringify(o)); |
|
1225 |
}; |
|
1226 |
||
1227 |
/** |
|
1228 |
* Concatenates all arguments into a new array |
|
1229 |
* |
|
1230 |
* @returns {Array.<T>} New array containing all arguments |
|
1231 |
*/ |
|
1232 |
var concat = function () { |
|
1233 |
return Array.prototype.concat.apply([], arguments); |
|
1234 |
}; |
|
1235 |
||
1236 |
/** |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1237 |
* Takes a String or Array of Strings and does a replace operation on each |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1238 |
* of them. |
34491 | 1239 |
* |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1240 |
* @param pattern Pattern to look for |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1241 |
* @param replacement Replacement text to insert |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1242 |
* @param a String or Array of Strings to replace |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1243 |
* @returns {Array} Either a new array or a new string depending on the input |
34491 | 1244 |
*/ |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1245 |
var replaceAll = function (pattern, replacement, a) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1246 |
// If a is an array |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1247 |
if (Array === a.constructor) { |
34491 | 1248 |
var newA = []; |
1249 |
for (var i in a) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1250 |
newA.push(a[i].replace(pattern, replacement)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1251 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1252 |
return newA; |
34491 | 1253 |
} else { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1254 |
return a.replace(pattern, replacement); |
34491 | 1255 |
} |
1256 |
}; |
|
1257 |
||
1258 |
/** |
|
1259 |
* Deep concatenation of two objects. For each node encountered, merge |
|
1260 |
* the contents with the corresponding node in the other object tree, |
|
1261 |
* treating all strings as array elements. |
|
1262 |
* |
|
1263 |
* @param o1 Object to concatenate |
|
1264 |
* @param o2 Object to concatenate |
|
1265 |
* @returns {{}} New object tree containing the concatenation of o1 and o2 |
|
1266 |
*/ |
|
1267 |
var concatObjects = function (o1, o2) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1268 |
if (o1 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1269 |
return clone(o2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1270 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1271 |
if (o2 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1272 |
return clone(o1); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1273 |
} |
34491 | 1274 |
var ret = {}; |
1275 |
for (var a in o1) { |
|
1276 |
if (o2[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1277 |
ret[a] = clone(o1[a]); |
34491 | 1278 |
} |
1279 |
} |
|
1280 |
for (var a in o2) { |
|
1281 |
if (o1[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1282 |
ret[a] = clone(o2[a]); |
34491 | 1283 |
} else { |
1284 |
if (typeof o1[a] == 'string') { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1285 |
ret[a] = clone([o1[a]].concat(o2[a])); |
34491 | 1286 |
} else if (Array.isArray(o1[a])) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1287 |
ret[a] = clone(o1[a].concat(o2[a])); |
34491 | 1288 |
} else if (typeof o1[a] == 'object') { |
1289 |
ret[a] = concatObjects(o1[a], o2[a]); |
|
1290 |
} |
|
1291 |
} |
|
1292 |
} |
|
1293 |
return ret; |
|
1294 |
}; |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1295 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1296 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1297 |
* Constructs the numeric version string from reading the |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1298 |
* make/autoconf/version-numbers file and removing all trailing ".0". |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1299 |
* |
48327 | 1300 |
* @param feature Override feature version |
1301 |
* @param interim Override interim version |
|
1302 |
* @param update Override update version |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1303 |
* @param patch Override patch version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1304 |
* @returns {String} The numeric version string |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1305 |
*/ |
48327 | 1306 |
var getVersion = function (feature, interim, update, patch) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1307 |
var version_numbers = getVersionNumbers(); |
48327 | 1308 |
var version = (feature != null ? feature : version_numbers.get("DEFAULT_VERSION_FEATURE")) |
1309 |
+ "." + (interim != null ? interim : version_numbers.get("DEFAULT_VERSION_INTERIM")) |
|
1310 |
+ "." + (update != null ? update : version_numbers.get("DEFAULT_VERSION_UPDATE")) |
|
54656 | 1311 |
+ "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")) |
1312 |
+ "." + version_numbers.get("DEFAULT_VERSION_EXTRA1") |
|
1313 |
+ "." + version_numbers.get("DEFAULT_VERSION_EXTRA2") |
|
1314 |
+ "." + version_numbers.get("DEFAULT_VERSION_EXTRA3"); |
|
43600 | 1315 |
while (version.match(".*\\.0$")) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1316 |
version = version.substring(0, version.length - 2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1317 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1318 |
return version; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1319 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1320 |
|
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1321 |
/** |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1322 |
* Constructs the common version configure args based on build type and |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1323 |
* other version inputs |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1324 |
*/ |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1325 |
var versionArgs = function(input, common) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1326 |
var args = ["--with-version-build=" + common.build_number]; |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1327 |
if (input.build_type == "promoted") { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1328 |
args = concat(args, |
54789
77e95181b5d6
8223627: jdk-13+20 bundle name contains null instead of ea
erikj
parents:
54751
diff
changeset
|
1329 |
"--with-version-pre=" + version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"), |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1330 |
"--without-version-opt"); |
54751
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1331 |
} else if (input.build_type == "ci") { |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1332 |
var optString = input.build_id_data.ciBuildNumber; |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1333 |
var preString = input.build_id_data.projectName; |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1334 |
if (preString == "jdk") { |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1335 |
preString = version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"); |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1336 |
} |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1337 |
args = concat(args, "--with-version-pre=" + preString, |
5600f5c38b0b
8223464: Improve version string for Oracle CI builds
erikj
parents:
54656
diff
changeset
|
1338 |
"--with-version-opt=" + optString); |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1339 |
} else { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1340 |
args = concat(args, "--with-version-opt=" + common.build_id); |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1341 |
} |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1342 |
return args; |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1343 |
} |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1344 |
|
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1345 |
// Properties representation of the make/autoconf/version-numbers file. Lazily |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1346 |
// initiated by the function below. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1347 |
var version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1348 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1349 |
/** |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1350 |
* Read the make/autoconf/version-numbers file into a Properties object. |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1351 |
* |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1352 |
* @returns {java.utilProperties} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1353 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1354 |
var getVersionNumbers = function () { |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1355 |
// Read version information from make/autoconf/version-numbers |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1356 |
if (version_numbers == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1357 |
version_numbers = new java.util.Properties(); |
47217 | 1358 |
var stream = new java.io.FileInputStream(__DIR__ + "/../autoconf/version-numbers"); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1359 |
version_numbers.load(stream); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1360 |
stream.close(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1361 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1362 |
return version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1363 |
} |
53240 | 1364 |
|
1365 |
/** |
|
1366 |
* Returns true if running in Windows Subsystem for Linux. Jib does not yet |
|
1367 |
* detect wsl as osenv, so fall back on linux with version containing Microsoft. |
|
1368 |
*/ |
|
1369 |
var isWsl = function (input) { |
|
1370 |
return ( input.build_osenv == "wsl" |
|
1371 |
|| (input.build_os == "linux" |
|
1372 |
&& java.lang.System.getProperty("os.version").contains("Microsoft"))); |
|
1373 |
} |
|
58723
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
1374 |
|
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
1375 |
var error = function (s) { |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
1376 |
java.lang.System.err.println("[ERROR] " + s); |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
1377 |
exit(1); |
559c46cd0e8b
8232569: Use test image from different jib profile for testing
erikj
parents:
58559
diff
changeset
|
1378 |
}; |