author | jjg |
Mon, 22 Oct 2018 13:31:42 -0700 | |
changeset 52217 | 5e3a8f387701 |
parent 52125 | 28375a1de254 |
child 52275 | f39073b97db7 |
child 56978 | 8fbb2fb7589f |
permissions | -rw-r--r-- |
34491 | 1 |
/* |
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
2 |
* Copyright (c) 2015, 2018, 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 |
|
79 |
* |
|
80 |
* |
|
81 |
* The output data generated by this configuration file has the following |
|
82 |
* format: |
|
83 |
* |
|
84 |
* data: { |
|
85 |
* // Identifies the version of this format to the tool reading it |
|
86 |
* format_version: "1.0", |
|
87 |
* |
|
34496 | 88 |
* // Name of base outputdir. JIB assumes the actual output dir is formed |
34491 | 89 |
* // by adding the configuration name: <output_basedir>/<config-name> |
90 |
* output_basedir: "build", |
|
91 |
* // Configure argument to use to specify configuration name |
|
92 |
* configuration_configure_arg: |
|
93 |
* // Make argument to use to specify configuration name |
|
94 |
* configuration_make_arg: |
|
95 |
* |
|
96 |
* profiles: { |
|
97 |
* <profile-name>: { |
|
98 |
* // Name of os the profile is built to run on |
|
99 |
* target_os; <string> |
|
100 |
* // Name of cpu the profile is built to run on |
|
101 |
* target_cpu; <string> |
|
102 |
* // Combination of target_os and target_cpu for convenience |
|
103 |
* target_platform; <string> |
|
104 |
* // Name of os the profile is built on |
|
105 |
* build_os; <string> |
|
106 |
* // Name of cpu the profile is built on |
|
107 |
* build_cpu; <string> |
|
108 |
* // Combination of build_os and build_cpu for convenience |
|
109 |
* build_platform; <string> |
|
110 |
* |
|
111 |
* // List of dependencies needed to build this profile |
|
112 |
* dependencies: <Array of strings> |
|
113 |
* |
|
114 |
* // List of configure args to use for this profile |
|
115 |
* configure_args: <Array of strings> |
|
116 |
* |
|
117 |
* // List of free form labels describing aspects of this profile |
|
118 |
* labels: <Array of strings> |
|
119 |
* } |
|
120 |
* } |
|
121 |
* |
|
122 |
* // Dependencies use a Maven like deployment structure |
|
123 |
* dependencies: { |
|
124 |
* <dependency-name>: { |
|
125 |
* // Organization part of path defining this dependency |
|
126 |
* organization: <string> |
|
127 |
* // File extension for this dependency |
|
128 |
* ext: <string> |
|
129 |
* // Module part of path for defining this dependency, |
|
130 |
* // defaults to <dependency-name> |
|
131 |
* module: <string> |
|
132 |
* // Revision part of path for defining this dependency |
|
133 |
* revision: <string> |
|
134 |
* |
|
135 |
* // List of configure args to add when using this dependency, |
|
136 |
* // defaults to |
|
137 |
* // "--with-<dependency-name>=input.get("<dependency-name", "install_path")" |
|
138 |
* configure_args: <array of strings> |
|
139 |
* |
|
140 |
* // Name of environment variable to set when using this dependency |
|
141 |
* // when running make |
|
142 |
* environment_name: <string> |
|
143 |
* // Value of environment variable to set when using this dependency |
|
144 |
* // when running make |
|
145 |
* environment_value: <string> |
|
146 |
* |
|
147 |
* // Value to add to the PATH variable when using this dependency, |
|
148 |
* // applies to both make and configure |
|
149 |
* environment_path: <string> |
|
150 |
* } |
|
151 |
* |
|
152 |
* <dependency-name>: { |
|
153 |
* // For certain dependencies where a legacy distribution mechanism is |
|
154 |
* // already in place, the "javare" server layout is also supported |
|
155 |
* // Indicate that an alternate server source and layout should be used |
|
156 |
* server: "javare" |
|
157 |
* |
|
158 |
* // For "javare", a combination of module, revision, |
|
159 |
* // build number (optional), files and checksum file is possible for |
|
160 |
* // artifacts following the standard layout. |
|
161 |
* module: <string> |
|
162 |
* revision: <string> |
|
163 |
* build_number: <string> |
|
164 |
* checksum_file: <string> |
|
165 |
* file: <string> |
|
166 |
* |
|
167 |
* // For other files, use checksum path and path instead |
|
168 |
* checksum_path: <string> |
|
169 |
* path: <string> |
|
170 |
* } |
|
171 |
* } |
|
172 |
* } |
|
173 |
*/ |
|
174 |
||
175 |
/** |
|
176 |
* Main entry to generate the profile configuration |
|
177 |
* |
|
178 |
* @param input External data to use for generating the configuration |
|
179 |
* @returns {{}} Profile configuration |
|
180 |
*/ |
|
34496 | 181 |
var getJibProfiles = function (input) { |
34491 | 182 |
|
183 |
var data = {}; |
|
184 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
185 |
// 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
|
186 |
// 1.1 signifies that the publish, publish-src and get-src features are usable. |
50239 | 187 |
// 1.2 signifies that artifact uploads should fail on missing artifacts by default. |
188 |
data.format_version = "1.2"; |
|
34491 | 189 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
190 |
// 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
|
191 |
data.organization = ""; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
192 |
data.product = "jdk"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
193 |
data.version = getVersion(); |
34491 | 194 |
|
34496 | 195 |
// The base directory for the build output. JIB will assume that the |
34491 | 196 |
// actual build directory will be <output_basedir>/<configuration> |
197 |
data.output_basedir = "build"; |
|
198 |
// The configure argument to use to specify the name of the configuration |
|
199 |
data.configuration_configure_arg = "--with-conf-name="; |
|
200 |
// The make argument to use to specify the name of the configuration |
|
201 |
data.configuration_make_arg = "CONF_NAME="; |
|
202 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
203 |
// Exclude list to use when Jib creates a source bundle |
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
204 |
data.src_bundle_excludes = "./build .build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg"; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
205 |
// 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
|
206 |
// contains just the jib configuration files. |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
207 |
data.conf_bundle_includes = "*/conf/jib-profiles.* make/autoconf/version-numbers" |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
208 |
|
34491 | 209 |
// Define some common values |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
210 |
var common = getJibProfilesCommon(input, data); |
34491 | 211 |
// Generate the profiles part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
212 |
data.profiles = getJibProfilesProfiles(input, common, data); |
34491 | 213 |
// Generate the dependencies part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
214 |
data.dependencies = getJibProfilesDependencies(input, common, data); |
34491 | 215 |
|
216 |
return data; |
|
217 |
}; |
|
218 |
||
219 |
/** |
|
220 |
* Generates some common values |
|
221 |
* |
|
222 |
* @param input External data to use for generating the configuration |
|
223 |
* @returns Common values |
|
224 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
225 |
var getJibProfilesCommon = function (input, data) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
226 |
var common = {}; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
227 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
228 |
common.organization = "jpg.infra.builddeps"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
229 |
common.build_id = getBuildId(input); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
230 |
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
|
231 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
232 |
// List of the main profile names used for iteration |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
233 |
common.main_profile_names = [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
234 |
"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
|
235 |
"solaris-sparcv9", "windows-x64", "windows-x86", |
50472 | 236 |
"linux-aarch64", "linux-arm32", "linux-arm64", "linux-arm-vfp-hflt", |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
237 |
"linux-arm-vfp-hflt-dyn" |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
238 |
]; |
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 |
// 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
|
241 |
common.main_profile_base = { |
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
242 |
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
243 |
default_make_targets: ["product-bundles", "test-bundles"], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
244 |
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
|
245 |
"--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 | 246 |
"--disable-manpages", |
50590
5fa19bad622d
8204973: Add build support for filtering translations
erikj
parents:
50543
diff
changeset
|
247 |
versionArgs(input, common)) |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
248 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
249 |
// Extra settings for debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
250 |
common.debug_suffix = "-debug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
251 |
common.debug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
252 |
configure_args: ["--enable-debug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
253 |
labels: "debug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
254 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
255 |
// Extra settings for slowdebug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
256 |
common.slowdebug_suffix = "-slowdebug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
257 |
common.slowdebug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
258 |
configure_args: ["--with-debug-level=slowdebug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
259 |
labels: "slowdebug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
260 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
261 |
// Extra settings for openjdk only profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
262 |
common.open_suffix = "-open"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
263 |
common.open_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
264 |
configure_args: ["--enable-openjdk-only"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
265 |
labels: "open" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
266 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
267 |
|
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
268 |
common.configure_args_64bit = ["--with-target-bits=64"]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
269 |
common.configure_args_32bit = ["--with-target-bits=32"]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
270 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
271 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
272 |
* 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
|
273 |
* @param o - Object containing data for artifacts |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
274 |
*/ |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
275 |
common.main_profile_artifacts = function (o) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
276 |
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
50511 | 277 |
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
|
278 |
var pf = o.platform |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
279 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
280 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
281 |
jdk: { |
50511 | 282 |
local: "bundles/\\(jdk.*bin." + jdk_suffix + "\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
283 |
remote: [ |
50511 | 284 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin." + jdk_suffix, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
285 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
286 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
287 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
288 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
289 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
290 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
291 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
292 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
293 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
294 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
295 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
296 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
297 |
}, |
47440
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
298 |
test_demos: { |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
299 |
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
|
300 |
remote: [ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
301 |
"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
|
302 |
"bundles/" + pf + "/\\1" |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
303 |
], |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
304 |
exploded: "images/test" |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
305 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
306 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
307 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
308 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
309 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
310 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
311 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
312 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
313 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
314 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
315 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
316 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
317 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
318 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
319 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
320 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
321 |
* 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
|
322 |
* @param o - Object containing data for artifacts |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
323 |
*/ |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
324 |
common.debug_profile_artifacts = function (o) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
325 |
var jdk_subdir = "jdk-" + data.version + "/fastdebug"; |
50511 | 326 |
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
|
327 |
var pf = o.platform |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
328 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
329 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
330 |
jdk: { |
50511 | 331 |
local: "bundles/\\(jdk.*bin-debug." + jdk_suffix + "\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
332 |
remote: [ |
50511 | 333 |
"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
|
334 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
335 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
336 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
337 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
338 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
339 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
340 |
local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
341 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
342 |
"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
|
343 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
344 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
345 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
346 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
347 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
348 |
local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
349 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
350 |
"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
|
351 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
352 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
353 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
354 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
355 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
356 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
357 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
358 |
}; |
34491 | 359 |
|
49976
19829b375d08
8200083: Bump bootjdk requirement for JDK 11 to JDK 10
erikj
parents:
49575
diff
changeset
|
360 |
common.boot_jdk_version = "10"; |
47365 | 361 |
common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk-" |
362 |
+ common.boot_jdk_version |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
363 |
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : ""); |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
364 |
|
34491 | 365 |
return common; |
366 |
}; |
|
367 |
||
368 |
/** |
|
369 |
* Generates the profiles part of the configuration. |
|
370 |
* |
|
371 |
* @param input External data to use for generating the configuration |
|
372 |
* @param common The common values |
|
373 |
* @returns {{}} Profiles part of the configuration |
|
374 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
375 |
var getJibProfilesProfiles = function (input, common, data) { |
34491 | 376 |
// Main SE profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
377 |
var profiles = { |
34491 | 378 |
|
379 |
"linux-x64": { |
|
380 |
target_os: "linux", |
|
381 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
382 |
dependencies: ["devkit", "graphviz", "pandoc", "graalunit_lib"], |
44727 | 383 |
configure_args: concat(common.configure_args_64bit, |
384 |
"--enable-full-docs", "--with-zlib=system"), |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
385 |
default_make_targets: ["docs-bundles"], |
34491 | 386 |
}, |
387 |
||
388 |
"linux-x86": { |
|
389 |
target_os: "linux", |
|
390 |
target_cpu: "x86", |
|
391 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
392 |
dependencies: ["devkit"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
393 |
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
|
394 |
"--with-jvm-variants=minimal,server", "--with-zlib=system"), |
34491 | 395 |
}, |
396 |
||
397 |
"macosx-x64": { |
|
398 |
target_os: "macosx", |
|
399 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
400 |
dependencies: ["devkit", "graalunit_lib"], |
45875 | 401 |
configure_args: concat(common.configure_args_64bit, "--with-zlib=system", |
49523 | 402 |
"--with-macosx-version-max=10.9.0"), |
34491 | 403 |
}, |
404 |
||
405 |
"solaris-x64": { |
|
406 |
target_os: "solaris", |
|
407 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
408 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
409 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
410 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 411 |
}, |
412 |
||
413 |
"solaris-sparcv9": { |
|
414 |
target_os: "solaris", |
|
415 |
target_cpu: "sparcv9", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
416 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
417 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
418 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 419 |
}, |
420 |
||
421 |
"windows-x64": { |
|
422 |
target_os: "windows", |
|
423 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
424 |
dependencies: ["devkit", "graalunit_lib"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
425 |
configure_args: concat(common.configure_args_64bit), |
34491 | 426 |
}, |
427 |
||
428 |
"windows-x86": { |
|
429 |
target_os: "windows", |
|
430 |
target_cpu: "x86", |
|
431 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
432 |
dependencies: ["devkit"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
433 |
configure_args: concat(common.configure_args_32bit), |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
434 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
435 |
|
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
436 |
"linux-aarch64": { |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
437 |
target_os: "linux", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
438 |
target_cpu: "aarch64", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
439 |
build_cpu: "x64", |
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
440 |
dependencies: ["devkit", "build_devkit", "cups"], |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
441 |
configure_args: [ |
49525
4d98473ed33e
8200727: linux-aarch64 profile should use bundled freetype
ihse
parents:
49523
diff
changeset
|
442 |
"--openjdk-target=aarch64-linux-gnu", "--with-freetype=bundled", |
50543 | 443 |
"--disable-warnings-as-errors", "--with-cpu-port=aarch64", |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
444 |
], |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
445 |
}, |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
446 |
|
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
447 |
"linux-arm64": { |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
448 |
target_os: "linux", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
449 |
target_cpu: "aarch64", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
450 |
build_cpu: "x64", |
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
451 |
dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"], |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
452 |
configure_args: [ |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
453 |
"--with-cpu-port=arm64", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
454 |
"--with-jvm-variants=server", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
455 |
"--openjdk-target=aarch64-linux-gnu", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
456 |
"--enable-headless-only" |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
457 |
], |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
458 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
459 |
|
50472 | 460 |
"linux-arm32": { |
461 |
target_os: "linux", |
|
462 |
target_cpu: "arm", |
|
463 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
464 |
dependencies: ["devkit", "build_devkit", "cups"], |
50472 | 465 |
configure_args: [ |
466 |
"--openjdk-target=arm-linux-gnueabihf", "--with-freetype=bundled", |
|
467 |
"--with-abi-profile=arm-vfp-hflt", "--disable-warnings-as-errors" |
|
468 |
], |
|
469 |
}, |
|
470 |
||
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
471 |
"linux-arm-vfp-hflt": { |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
472 |
target_os: "linux", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
473 |
target_cpu: "arm", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
474 |
build_cpu: "x64", |
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
475 |
dependencies: ["devkit", "build_devkit", "cups"], |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
476 |
configure_args: [ |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
477 |
"--with-jvm-variants=minimal1,client", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
478 |
"--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI", |
49575
3a2172d8613a
8201439: Enable linux-arm-vfp-hflt profile to be configured with jib again
erikj
parents:
49525
diff
changeset
|
479 |
"--with-fontconfig=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI", |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
480 |
"--openjdk-target=arm-linux-gnueabihf", |
49575
3a2172d8613a
8201439: Enable linux-arm-vfp-hflt profile to be configured with jib again
erikj
parents:
49525
diff
changeset
|
481 |
"--with-abi-profile=arm-vfp-hflt", |
3a2172d8613a
8201439: Enable linux-arm-vfp-hflt profile to be configured with jib again
erikj
parents:
49525
diff
changeset
|
482 |
"--with-freetype=bundled" |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
483 |
], |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
484 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
485 |
|
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
486 |
// Special version of the SE profile adjusted to be testable on arm64 hardware. |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
487 |
"linux-arm-vfp-hflt-dyn": { |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
488 |
configure_args: "--with-stdc++lib=dynamic" |
34491 | 489 |
} |
490 |
}; |
|
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
491 |
// Let linux-arm-vfp-hflt-dyn inherit everything from linux-arm-vfp-hflt |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
492 |
profiles["linux-arm-vfp-hflt-dyn"] = concatObjects( |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
493 |
profiles["linux-arm-vfp-hflt-dyn"], profiles["linux-arm-vfp-hflt"]); |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
494 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
495 |
// Add the base settings to all the main profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
496 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
497 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
498 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
499 |
|
34491 | 500 |
// Generate debug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
501 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
502 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
503 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
504 |
common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
505 |
}); |
36532 | 506 |
// Generate slowdebug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
507 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
508 |
var debugName = name + common.slowdebug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
509 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
510 |
common.slowdebug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
511 |
}); |
49243 | 512 |
// Generate testmake profiles for the main profile of each build host |
513 |
// platform. This profile only runs the makefile tests. |
|
514 |
// Ant is needed to run the idea project generator test. |
|
515 |
var testmakeBase = { |
|
516 |
dependencies: [ "ant" ], |
|
517 |
environment: { |
|
518 |
"ANT_HOME": input.get("ant", "install_path") + "/apache-ant-1.7.1" |
|
519 |
} |
|
520 |
}; |
|
521 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"] |
|
522 |
.forEach(function (name) { |
|
523 |
var maketestName = name + "-testmake"; |
|
524 |
profiles[maketestName] = concatObjects(profiles[name], testmakeBase); |
|
52022
804792ce736f
8210459: Add support for generating compile_commands.json
rwestberg
parents:
51994
diff
changeset
|
525 |
profiles[maketestName].default_make_targets = [ "test-make", "test-compile-commands" ]; |
49243 | 526 |
}); |
34491 | 527 |
|
51994 | 528 |
// Profiles for building the zero jvm variant. These are used for verification. |
42425 | 529 |
var zeroProfiles = { |
530 |
"linux-x64-zero": { |
|
531 |
target_os: "linux", |
|
532 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
533 |
dependencies: ["devkit"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
534 |
configure_args: concat(common.configure_args_64bit, [ |
42425 | 535 |
"--with-zlib=system", |
536 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
537 |
"--enable-libffi-bundling" |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
538 |
]) |
42425 | 539 |
}, |
540 |
||
541 |
"linux-x86-zero": { |
|
542 |
target_os: "linux", |
|
543 |
target_cpu: "x86", |
|
544 |
build_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
545 |
dependencies: ["devkit"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
546 |
configure_args: concat(common.configure_args_32bit, [ |
42425 | 547 |
"--with-zlib=system", |
548 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
549 |
"--enable-libffi-bundling" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
550 |
]) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
551 |
} |
42425 | 552 |
} |
553 |
profiles = concatObjects(profiles, zeroProfiles); |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
554 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
555 |
// 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
|
556 |
Object.keys(zeroProfiles).forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
557 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
558 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
559 |
profiles[debugName] = concatObjects(profiles[name], common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
560 |
}); |
42425 | 561 |
|
50543 | 562 |
// Bootcycle profiles runs the build with itself as the boot jdk. This can |
563 |
// be done in two ways. Either using the builtin bootcycle target in the |
|
564 |
// build system. Or by supplying the main jdk build as bootjdk to configure. |
|
565 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
566 |
.forEach(function (name) { |
|
567 |
var bootcycleName = name + "-bootcycle"; |
|
568 |
var bootcyclePrebuiltName = name + "-bootcycle-prebuilt"; |
|
569 |
// The base bootcycle profile just changes the default target |
|
570 |
// compared to the base profile |
|
571 |
profiles[bootcycleName] = clone(profiles[name]); |
|
572 |
profiles[bootcycleName].default_make_targets = [ "bootcycle-images" ]; |
|
573 |
// The prebuilt bootcycle variant modifies the boot jdk argument |
|
574 |
var bootcyclePrebuiltBase = { |
|
575 |
dependencies: [ name + ".jdk" ], |
|
576 |
configure_args: "--with-boot-jdk=" + input.get(name + ".jdk", "home_path"), |
|
577 |
} |
|
578 |
profiles[bootcyclePrebuiltName] = concatObjects(profiles[name], |
|
579 |
bootcyclePrebuiltBase); |
|
580 |
var bootJdkIndex = profiles[bootcyclePrebuiltName].dependencies.indexOf("boot_jdk"); |
|
581 |
delete profiles[bootcyclePrebuiltName].dependencies[bootJdkIndex]; |
|
582 |
profiles[bootcyclePrebuiltName].default_make_targets = [ "product-images" ]; |
|
583 |
}); |
|
584 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
585 |
// |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
586 |
// Define artifacts for profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
587 |
// |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
588 |
// Macosx bundles are named osx |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
589 |
// tar.gz. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
590 |
var artifactData = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
591 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
592 |
platform: "linux-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
593 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
594 |
"linux-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
595 |
platform: "linux-x86", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
596 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
597 |
"macosx-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
598 |
platform: "osx-x64", |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
599 |
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
600 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
601 |
"solaris-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
602 |
platform: "solaris-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
603 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
604 |
"solaris-sparcv9": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
605 |
platform: "solaris-sparcv9", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
606 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
607 |
"windows-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
608 |
platform: "windows-x64", |
50511 | 609 |
jdk_suffix: "zip", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
610 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
611 |
"windows-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
612 |
platform: "windows-x86", |
50511 | 613 |
jdk_suffix: "zip", |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
614 |
}, |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
615 |
"linux-aarch64": { |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
616 |
platform: "linux-aarch64", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
617 |
}, |
50472 | 618 |
"linux-arm32": { |
619 |
platform: "linux-arm32", |
|
620 |
}, |
|
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
621 |
"linux-arm64": { |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
622 |
platform: "linux-arm64-vfp-hflt", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
623 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
624 |
"linux-arm-vfp-hflt": { |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
625 |
platform: "linux-arm32-vfp-hflt", |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
626 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
627 |
"linux-arm-vfp-hflt-dyn": { |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
628 |
platform: "linux-arm32-vfp-hflt-dyn", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
629 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
630 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
631 |
// Generate common artifacts for all main profiles |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
632 |
Object.keys(artifactData).forEach(function (name) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
633 |
profiles[name] = concatObjects(profiles[name], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
634 |
common.main_profile_artifacts(artifactData[name])); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
635 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
636 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
637 |
// Generate common artifacts for all debug profiles |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
638 |
Object.keys(artifactData).forEach(function (name) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
639 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
640 |
profiles[debugName] = concatObjects(profiles[debugName], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
641 |
common.debug_profile_artifacts(artifactData[name])); |
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 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
644 |
profilesArtifacts = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
645 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
646 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
647 |
doc_api_spec: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
648 |
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
649 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
650 |
"bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
651 |
"bundles/linux-x64/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
652 |
], |
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 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
655 |
} |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
656 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
657 |
profiles = concatObjects(profiles, profilesArtifacts); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
658 |
|
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
659 |
// 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
|
660 |
// 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
|
661 |
common.main_profile_names.forEach(function (name) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
662 |
var openName = name + common.open_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
663 |
profiles[openName] = concatObjects(profiles[name], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
664 |
common.open_profile_base); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
665 |
for (artifactName in profiles[openName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
666 |
var artifact = profiles[openName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
667 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
668 |
"bundles\/", "bundles/openjdk/GPL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
669 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
670 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
671 |
var debugName = name + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
672 |
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
|
673 |
profiles[openDebugName] = concatObjects(profiles[debugName], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
674 |
common.open_profile_base); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
675 |
for (artifactName in profiles[openDebugName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
676 |
var artifact = profiles[openDebugName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
677 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
678 |
"bundles\/", "bundles/openjdk/GPL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
679 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
680 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
681 |
}); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
682 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
683 |
// 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
|
684 |
// 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
|
685 |
common.main_profile_names.forEach(function (name) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
686 |
var riName = name + "-ri"; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
687 |
var riDebugName = riName + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
688 |
var openName = name + common.open_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
689 |
var openDebugName = openName + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
690 |
profiles[riName] = clone(profiles[openName]); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
691 |
profiles[riDebugName] = clone(profiles[openDebugName]); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
692 |
// 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
|
693 |
for (artifactName in profiles[riName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
694 |
var artifact = profiles[riName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
695 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
696 |
"\/GPL\/", "/BCL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
697 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
698 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
699 |
}); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
700 |
|
48212
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
701 |
// 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
|
702 |
// 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
|
703 |
common.main_profile_names.forEach(function (name) { |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
704 |
var openName = name + common.open_suffix; |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
705 |
profiles[openName].artifacts["jdk"].remote = replaceAll( |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
706 |
"\/jdk-", "/openjdk-", |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
707 |
replaceAll("\/\\1", "/open\\1", |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
708 |
profiles[openName].artifacts["jdk"].remote)); |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
709 |
}); |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
710 |
|
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
711 |
// Enable ZGC in linux-x64-open builds |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
712 |
[ "linux-x64-open" ].forEach(function (name) { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
713 |
var configureArgs = { configure_args: [ "--with-jvm-features=zgc" ] }; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
714 |
var debugName = name + common.debug_suffix; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
715 |
profiles[name] = concatObjects(profiles[name], configureArgs); |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
716 |
profiles[debugName] = concatObjects(profiles[debugName], configureArgs); |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
717 |
}); |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50511
diff
changeset
|
718 |
|
50807
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
719 |
// Generate cmp-baseline profiles for each main profile and their |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
720 |
// 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
|
721 |
// 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
|
722 |
common.main_profile_names.forEach(function (name) { |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
723 |
[ "", common.open_suffix ].forEach(function (suffix) { |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
724 |
var cmpBaselineName = name + suffix + "-cmp-baseline"; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
725 |
profiles[cmpBaselineName] = clone(profiles[name + suffix]); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
726 |
// Only compare the images target. This should pressumably be expanded |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
727 |
// to include more build targets when possible. |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
728 |
profiles[cmpBaselineName].default_make_targets = [ "images" ]; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
729 |
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ]; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
730 |
// Do not inherit artifact definitions from base profile |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
731 |
delete profiles[cmpBaselineName].artifacts; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
732 |
}); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
733 |
}); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
734 |
|
51994 | 735 |
// Profiles used to run tests. |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
736 |
var testOnlyProfiles = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
737 |
"run-test": { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
738 |
target_os: input.build_os, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
739 |
target_cpu: input.build_cpu, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
740 |
dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
741 |
labels: "test", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
742 |
environment: { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
743 |
"JT_JAVA": common.boot_jdk_home |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
744 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
745 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
746 |
}; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
747 |
profiles = concatObjects(profiles, testOnlyProfiles); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
748 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
749 |
// 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
|
750 |
var testedProfile = input.testedProfile; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
751 |
if (testedProfile == null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
752 |
testedProfile = input.build_os + "-" + input.build_cpu; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
753 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
754 |
var testOnlyProfilesPrebuilt = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
755 |
"run-test-prebuilt": { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
756 |
target_os: input.build_os, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
757 |
target_cpu: input.build_cpu, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
758 |
dependencies: [ "jtreg", "gnumake", "boot_jdk", "jib", testedProfile + ".jdk", |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
759 |
testedProfile + ".test" |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
760 |
], |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
761 |
src: "src.conf", |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
762 |
make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true" ], |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
763 |
environment: { |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
764 |
"BOOT_JDK": common.boot_jdk_home, |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
765 |
"JDK_IMAGE_DIR": input.get(testedProfile + ".jdk", "home_path"), |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
766 |
"TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path") |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
767 |
}, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
768 |
labels: "test" |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
769 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
770 |
}; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
771 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
772 |
// 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
|
773 |
// variable is valid and if so, add the appropriate target_* values from |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
774 |
// the tested profile. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
775 |
if (input.profile == "run-test-prebuilt") { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
776 |
if (profiles[testedProfile] == null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
777 |
error("testedProfile is not defined: " + testedProfile); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
778 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
779 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
780 |
if (profiles[testedProfile] != null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
781 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"] |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
782 |
= profiles[testedProfile]["target_os"]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
783 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"] |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
784 |
= profiles[testedProfile]["target_cpu"]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
785 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
786 |
profiles = concatObjects(profiles, testOnlyProfilesPrebuilt); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
787 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
788 |
// 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
|
789 |
// 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
|
790 |
if (input.build_os == "macosx") { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
791 |
macosxRunTestExtra = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
792 |
dependencies: [ "devkit" ], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
793 |
environment_path: input.get("devkit", "install_path") |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
794 |
+ "/Xcode.app/Contents/Developer/usr/bin" |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
795 |
}; |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
796 |
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
|
797 |
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
|
798 |
} |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
799 |
// 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
|
800 |
if (input.build_os == "windows") { |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
801 |
windowsRunTestPrebuiltExtra = { |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
802 |
dependencies: [ testedProfile + ".jdk_symbols" ], |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
803 |
environment: { |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
804 |
"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
|
805 |
} |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
806 |
}; |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
807 |
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
|
808 |
windowsRunTestPrebuiltExtra); |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
809 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
810 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
811 |
// 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
|
812 |
// 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
|
813 |
// 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
|
814 |
// 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
|
815 |
// 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
|
816 |
// 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
|
817 |
// 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
|
818 |
// 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
|
819 |
// 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
|
820 |
// |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
821 |
// 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
|
822 |
// 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
|
823 |
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
|
824 |
var runTestPrebuiltSrcFullExtra = { |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
825 |
dependencies: "src.full", |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
826 |
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
|
827 |
} |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
828 |
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
|
829 |
runTestPrebuiltSrcFullExtra); |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
830 |
} |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
831 |
|
34491 | 832 |
// Generate the missing platform attributes |
833 |
profiles = generatePlatformAttributes(profiles); |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
834 |
profiles = generateDefaultMakeTargetsConfigureArg(common, profiles); |
34491 | 835 |
return profiles; |
836 |
}; |
|
837 |
||
838 |
/** |
|
839 |
* Generate the dependencies part of the configuration |
|
840 |
* |
|
841 |
* @param input External data to use for generating the configuration |
|
842 |
* @param common The common values |
|
843 |
* @returns {{}} Dependencies part of configuration |
|
844 |
*/ |
|
34496 | 845 |
var getJibProfilesDependencies = function (input, common) { |
34491 | 846 |
|
847 |
var devkit_platform_revisions = { |
|
49516
a6aca02cf01a
8200375: Change to GCC 7.3.0 for building Linux at Oracle
erikj
parents:
49412
diff
changeset
|
848 |
linux_x64: "gcc7.3.0-OEL6.4+1.0", |
50702
2c9e2ec54a11
8205424: Change to Xcode 9.4 for building on Macosx at Oracle
erikj
parents:
50590
diff
changeset
|
849 |
macosx_x64: "Xcode9.4-MacOSX10.13+1.0", |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
34496
diff
changeset
|
850 |
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
|
851 |
solaris_sparcv9: "SS12u6-Solaris11u3+1.0", |
50273
737a17045ffe
8203795: Change default compiler on Windows to VS2017
erikj
parents:
50239
diff
changeset
|
852 |
windows_x64: "VS2017-15.5.5+1.0", |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
853 |
linux_aarch64: (input.profile != null && input.profile.indexOf("arm64") >= 0 |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
854 |
? "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0" |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
855 |
: "gcc7.3.0-Fedora27+1.0"), |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
856 |
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0 |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
857 |
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0" |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
858 |
: (input.profile != null && input.profile.indexOf("arm32") >= 0 |
50472 | 859 |
? "gcc7.3.0-Fedora27+1.0" |
860 |
: "arm-linaro-4.7+1.0" |
|
861 |
) |
|
862 |
) |
|
34491 | 863 |
}; |
864 |
||
865 |
var devkit_platform = (input.target_cpu == "x86" |
|
866 |
? input.target_os + "_x64" |
|
867 |
: input.target_platform); |
|
868 |
||
47364 | 869 |
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os) |
870 |
+ "-" + input.build_cpu; |
|
871 |
||
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
872 |
var makeBinDir = (input.build_os == "windows" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
873 |
? input.get("gnumake", "install_path") + "/cygwin/bin" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
874 |
: input.get("gnumake", "install_path") + "/bin"); |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
875 |
|
34491 | 876 |
var dependencies = { |
877 |
||
878 |
boot_jdk: { |
|
47364 | 879 |
server: "jpg", |
880 |
product: "jdk", |
|
47365 | 881 |
version: common.boot_jdk_version, |
49976
19829b375d08
8200083: Bump bootjdk requirement for JDK 11 to JDK 10
erikj
parents:
49575
diff
changeset
|
882 |
build_number: "46", |
47365 | 883 |
file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_" |
47364 | 884 |
+ boot_jdk_platform + "_bin.tar.gz", |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
885 |
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
|
886 |
environment_path: common.boot_jdk_home + "/bin" |
34491 | 887 |
}, |
888 |
||
889 |
devkit: { |
|
890 |
organization: common.organization, |
|
891 |
ext: "tar.gz", |
|
892 |
module: "devkit-" + devkit_platform, |
|
893 |
revision: devkit_platform_revisions[devkit_platform] |
|
894 |
}, |
|
895 |
||
896 |
build_devkit: { |
|
897 |
organization: common.organization, |
|
898 |
ext: "tar.gz", |
|
899 |
module: "devkit-" + input.build_platform, |
|
900 |
revision: devkit_platform_revisions[input.build_platform] |
|
901 |
}, |
|
902 |
||
903 |
cups: { |
|
904 |
organization: common.organization, |
|
905 |
ext: "tar.gz", |
|
906 |
revision: "1.0118+1.0" |
|
907 |
}, |
|
908 |
||
909 |
jtreg: { |
|
910 |
server: "javare", |
|
36506 | 911 |
revision: "4.2", |
51280 | 912 |
build_number: "b13", |
34491 | 913 |
checksum_file: "MD5_VALUES", |
36506 | 914 |
file: "jtreg_bin-4.2.zip", |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
915 |
environment_name: "JT_HOME", |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
916 |
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin" |
34491 | 917 |
}, |
918 |
||
919 |
gnumake: { |
|
920 |
organization: common.organization, |
|
921 |
ext: "tar.gz", |
|
922 |
revision: "4.0+1.0", |
|
923 |
||
924 |
module: (input.build_os == "windows" |
|
925 |
? "gnumake-" + input.build_osenv_platform |
|
926 |
: "gnumake-" + input.build_platform), |
|
927 |
||
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
928 |
configure_args: "MAKE=" + makeBinDir + "/make", |
34491 | 929 |
|
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
930 |
environment: { |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
931 |
"MAKE": makeBinDir + "/make" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
932 |
}, |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
933 |
|
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
934 |
environment_path: makeBinDir |
34491 | 935 |
}, |
936 |
||
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
937 |
autoconf: { |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
938 |
organization: common.organization, |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
939 |
ext: "tar.gz", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
940 |
revision: "2.69+1.0.1", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
941 |
module: (input.build_os == "windows" |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
942 |
? "autoconf-" + input.build_osenv_platform |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
943 |
: "autoconf-" + input.build_platform), |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
944 |
configure_args: "", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
945 |
environment_path: input.get("autoconf", "install_path") |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
946 |
}, |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
947 |
|
44727 | 948 |
graphviz: { |
949 |
organization: common.organization, |
|
950 |
ext: "tar.gz", |
|
951 |
revision: "2.38.0-1+1.1", |
|
952 |
module: "graphviz-" + input.target_platform, |
|
45107 | 953 |
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot", |
954 |
environment_path: input.get("graphviz", "install_path") |
|
44727 | 955 |
}, |
44734 | 956 |
|
957 |
pandoc: { |
|
958 |
organization: common.organization, |
|
959 |
ext: "tar.gz", |
|
960 |
revision: "1.17.2+1.0", |
|
961 |
module: "pandoc-" + input.target_platform, |
|
45107 | 962 |
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc", |
963 |
environment_path: input.get("pandoc", "install_path") + "/pandoc" |
|
44734 | 964 |
}, |
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
965 |
|
46196
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
966 |
// 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
|
967 |
jib: { |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
968 |
organization: "com.oracle.java.jib", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
969 |
ext: "zip", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
970 |
classifier: "distribution", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
971 |
revision: "3.0-SNAPSHOT", |
51856
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
51466
diff
changeset
|
972 |
environment_name: "JIB_HOME", |
46196
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
973 |
environment_value: input.get("jib", "install_path") |
51856
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
51466
diff
changeset
|
974 |
+ "/jib-3.0-SNAPSHOT-distribution" |
49243 | 975 |
}, |
976 |
||
977 |
ant: { |
|
978 |
organization: common.organization, |
|
979 |
ext: "zip", |
|
980 |
revision: "1.7.1+1.0", |
|
981 |
configure_args: "", |
|
982 |
}, |
|
983 |
||
50908 | 984 |
graalunit_lib: { |
985 |
organization: common.organization, |
|
986 |
ext: "zip", |
|
987 |
revision: "619_Apr_12_2018", |
|
988 |
module: "graalunit-lib", |
|
989 |
configure_args: "--with-graalunit-lib=" + input.get("graalunit_lib", "install_path"), |
|
990 |
environment_name: "GRAALUNIT_LIB" |
|
991 |
}, |
|
34491 | 992 |
}; |
993 |
||
46192 | 994 |
// Need to add a value for the Visual Studio tools variable to make |
995 |
// jaot be able to pick up the Visual Studio linker in testing. |
|
996 |
if (input.target_os == "windows") { |
|
997 |
dependencies.devkit.environment = { |
|
998 |
VS120COMNTOOLS: input.get("devkit", "install_path") + "/Common7/Tools" |
|
999 |
}; |
|
1000 |
} |
|
1001 |
||
34491 | 1002 |
return dependencies; |
1003 |
}; |
|
1004 |
||
1005 |
/** |
|
1006 |
* Generate the missing platform attributes for profiles |
|
1007 |
* |
|
1008 |
* @param profiles Profiles map to generate attributes on |
|
1009 |
* @returns {{}} New profiles map with platform attributes fully filled in |
|
1010 |
*/ |
|
1011 |
var generatePlatformAttributes = function (profiles) { |
|
1012 |
var ret = concatObjects(profiles, {}); |
|
1013 |
for (var profile in profiles) { |
|
1014 |
if (ret[profile].build_os == null) { |
|
1015 |
ret[profile].build_os = ret[profile].target_os; |
|
1016 |
} |
|
1017 |
if (ret[profile].build_cpu == null) { |
|
1018 |
ret[profile].build_cpu = ret[profile].target_cpu; |
|
1019 |
} |
|
1020 |
ret[profile].target_platform = ret[profile].target_os + "_" + ret[profile].target_cpu; |
|
1021 |
ret[profile].build_platform = ret[profile].build_os + "_" + ret[profile].build_cpu; |
|
1022 |
} |
|
1023 |
return ret; |
|
1024 |
}; |
|
1025 |
||
1026 |
/** |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1027 |
* 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
|
1028 |
* 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
|
1029 |
* 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
|
1030 |
* |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1031 |
* @param common Common values |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1032 |
* @param profiles Profiles map to rewrite profiles for |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1033 |
* @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
|
1034 |
*/ |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1035 |
var generateDefaultMakeTargetsConfigureArg = function (common, profiles) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1036 |
var ret = concatObjects(profiles, {}); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1037 |
for (var profile in ret) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1038 |
if (ret[profile]["default_make_targets"] != null) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1039 |
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
|
1040 |
// 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
|
1041 |
// 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
|
1042 |
var found = false; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1043 |
for (var i in ret[profile].configure_args) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1044 |
var arg = ret[profile].configure_args[i]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1045 |
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
|
1046 |
found = true; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1047 |
ret[profile].configure_args[i] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1048 |
= "--with-default-make-target=" + targetsString; |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1049 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1050 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1051 |
if (!found) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1052 |
ret[profile].configure_args = concat( |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1053 |
ret[profile].configure_args, |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1054 |
"--with-default-make-target=" + targetsString); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1055 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1056 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1057 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1058 |
return ret; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1059 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1060 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1061 |
var getBuildId = function (input) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1062 |
if (input.build_id != null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1063 |
return input.build_id; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1064 |
} else { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1065 |
var topdir = new java.io.File(__DIR__, "../..").getCanonicalFile().getName(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1066 |
var userName = java.lang.System.getProperty("user.name"); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1067 |
return userName + "." + topdir; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1068 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1069 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1070 |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1071 |
/** |
34491 | 1072 |
* Deep clones an object tree. |
1073 |
* |
|
1074 |
* @param o Object to clone |
|
1075 |
* @returns {{}} Clone of o |
|
1076 |
*/ |
|
1077 |
var clone = function (o) { |
|
1078 |
return JSON.parse(JSON.stringify(o)); |
|
1079 |
}; |
|
1080 |
||
1081 |
/** |
|
1082 |
* Concatenates all arguments into a new array |
|
1083 |
* |
|
1084 |
* @returns {Array.<T>} New array containing all arguments |
|
1085 |
*/ |
|
1086 |
var concat = function () { |
|
1087 |
return Array.prototype.concat.apply([], arguments); |
|
1088 |
}; |
|
1089 |
||
1090 |
/** |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1091 |
* 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
|
1092 |
* of them. |
34491 | 1093 |
* |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1094 |
* @param pattern Pattern to look for |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1095 |
* @param replacement Replacement text to insert |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1096 |
* @param a String or Array of Strings to replace |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1097 |
* @returns {Array} Either a new array or a new string depending on the input |
34491 | 1098 |
*/ |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1099 |
var replaceAll = function (pattern, replacement, a) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1100 |
// If a is an array |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1101 |
if (Array === a.constructor) { |
34491 | 1102 |
var newA = []; |
1103 |
for (var i in a) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1104 |
newA.push(a[i].replace(pattern, replacement)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1105 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1106 |
return newA; |
34491 | 1107 |
} else { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1108 |
return a.replace(pattern, replacement); |
34491 | 1109 |
} |
1110 |
}; |
|
1111 |
||
1112 |
/** |
|
1113 |
* Deep concatenation of two objects. For each node encountered, merge |
|
1114 |
* the contents with the corresponding node in the other object tree, |
|
1115 |
* treating all strings as array elements. |
|
1116 |
* |
|
1117 |
* @param o1 Object to concatenate |
|
1118 |
* @param o2 Object to concatenate |
|
1119 |
* @returns {{}} New object tree containing the concatenation of o1 and o2 |
|
1120 |
*/ |
|
1121 |
var concatObjects = function (o1, o2) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1122 |
if (o1 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1123 |
return clone(o2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1124 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1125 |
if (o2 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1126 |
return clone(o1); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1127 |
} |
34491 | 1128 |
var ret = {}; |
1129 |
for (var a in o1) { |
|
1130 |
if (o2[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1131 |
ret[a] = clone(o1[a]); |
34491 | 1132 |
} |
1133 |
} |
|
1134 |
for (var a in o2) { |
|
1135 |
if (o1[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1136 |
ret[a] = clone(o2[a]); |
34491 | 1137 |
} else { |
1138 |
if (typeof o1[a] == 'string') { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1139 |
ret[a] = clone([o1[a]].concat(o2[a])); |
34491 | 1140 |
} else if (Array.isArray(o1[a])) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1141 |
ret[a] = clone(o1[a].concat(o2[a])); |
34491 | 1142 |
} else if (typeof o1[a] == 'object') { |
1143 |
ret[a] = concatObjects(o1[a], o2[a]); |
|
1144 |
} |
|
1145 |
} |
|
1146 |
} |
|
1147 |
return ret; |
|
1148 |
}; |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1149 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1150 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1151 |
* Constructs the numeric version string from reading the |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1152 |
* 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
|
1153 |
* |
48327 | 1154 |
* @param feature Override feature version |
1155 |
* @param interim Override interim version |
|
1156 |
* @param update Override update version |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1157 |
* @param patch Override patch version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1158 |
* @returns {String} The numeric version string |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1159 |
*/ |
48327 | 1160 |
var getVersion = function (feature, interim, update, patch) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1161 |
var version_numbers = getVersionNumbers(); |
48327 | 1162 |
var version = (feature != null ? feature : version_numbers.get("DEFAULT_VERSION_FEATURE")) |
1163 |
+ "." + (interim != null ? interim : version_numbers.get("DEFAULT_VERSION_INTERIM")) |
|
1164 |
+ "." + (update != null ? update : version_numbers.get("DEFAULT_VERSION_UPDATE")) |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1165 |
+ "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); |
43600 | 1166 |
while (version.match(".*\\.0$")) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1167 |
version = version.substring(0, version.length - 2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1168 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1169 |
return version; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1170 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1171 |
|
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1172 |
/** |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1173 |
* 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
|
1174 |
* other version inputs |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1175 |
*/ |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1176 |
var versionArgs = function(input, common) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1177 |
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
|
1178 |
if (input.build_type == "promoted") { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1179 |
args = concat(args, |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1180 |
// This needs to be changed when we start building release candidates |
48773 | 1181 |
// with-version-pre must be set to ea for 'ea' and empty for fcs build |
51466
d222f503b7fe
8209760: merge error: restore ea in make/conf/jib-profiles.js
tbell
parents:
51464
diff
changeset
|
1182 |
"--with-version-pre=ea", |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1183 |
"--without-version-opt"); |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1184 |
} else { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1185 |
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
|
1186 |
} |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1187 |
return args; |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1188 |
} |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1189 |
|
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1190 |
// 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
|
1191 |
// initiated by the function below. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1192 |
var version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1193 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1194 |
/** |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1195 |
* 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
|
1196 |
* |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1197 |
* @returns {java.utilProperties} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1198 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1199 |
var getVersionNumbers = function () { |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1200 |
// Read version information from make/autoconf/version-numbers |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1201 |
if (version_numbers == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1202 |
version_numbers = new java.util.Properties(); |
47217 | 1203 |
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
|
1204 |
version_numbers.load(stream); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1205 |
stream.close(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1206 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1207 |
return version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1208 |
} |